commit e4bcdcf
grunfink
·
2026-09-10 14:45:04 +0000 UTC
parent 5d265cf
mastoapi: differentiate between 'mention' and 'status' notifications.
1 files changed,
+7,
-2
+7,
-2
1@@ -2395,8 +2395,13 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
2 if (strcmp(type, "Follow") == 0)
3 type = "follow";
4 else
5- if (strcmp(type, "Create") == 0)
6- type = "mention";
7+ if (strcmp(type, "Create") == 0) {
8+ const xs_dict *obj = xs_dict_get_path(noti, "msg.object");
9+ if (xs_is_dict(obj) && was_mentioned(&snac1, obj))
10+ type = "mention";
11+ else
12+ type = "status";
13+ }
14 else
15 if (strcmp(type, "Update") == 0 && strcmp(utype, "Question") == 0)
16 type = "poll";