summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authorGravatar default2023-05-30 15:01:45 +0200
committerGravatar default2023-05-30 15:01:45 +0200
commitbcc2eb6234ec3a3dfc7bf9c6193c67fcdda4d3a2 (patch)
tree6ba1bfe8e2563a3374d81ae0c94b639196a9c1e0 /mastoapi.c
parentLabel closed polls correctly in the notification area. (diff)
downloadsnac2-bcc2eb6234ec3a3dfc7bf9c6193c67fcdda4d3a2.tar.gz
snac2-bcc2eb6234ec3a3dfc7bf9c6193c67fcdda4d3a2.tar.xz
snac2-bcc2eb6234ec3a3dfc7bf9c6193c67fcdda4d3a2.zip
Show the finished poll notification correctly in mastoapi.
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mastoapi.c b/mastoapi.c
index feeb06f..0155a7c 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -1253,6 +1253,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
1253 continue; 1253 continue;
1254 1254
1255 const char *type = xs_dict_get(noti, "type"); 1255 const char *type = xs_dict_get(noti, "type");
1256 const char *utype = xs_dict_get(noti, "utype");
1256 const char *objid = xs_dict_get(noti, "objid"); 1257 const char *objid = xs_dict_get(noti, "objid");
1257 xs *actor = NULL; 1258 xs *actor = NULL;
1258 xs *entry = NULL; 1259 xs *entry = NULL;
@@ -1279,6 +1280,9 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
1279 if (strcmp(type, "Create") == 0) 1280 if (strcmp(type, "Create") == 0)
1280 type = "mention"; 1281 type = "mention";
1281 else 1282 else
1283 if (strcmp(type, "Update") == 0 && strcmp(utype, "Question") == 0)
1284 type = "poll";
1285 else
1282 continue; 1286 continue;
1283 1287
1284 /* excluded type? */ 1288 /* excluded type? */