commit 95d32cb

default  ·  2025-01-23 19:17:38 +0000 UTC
parent 0394f83
Improved notify repetition code.
1 files changed,  +3, -1
M html.c
M html.c
+3, -1
 1@@ -2993,7 +2993,9 @@ xs_str *html_notifications(snac *user, int skip, int show)
 2 
 3         object_get(id, &obj);
 4 
 5-        if (xs_set_add(&rep, xs_dict_get(obj, "id")) != 1)
 6+        const char *msg_id = NULL;
 7+
 8+        if (xs_is_dict(obj) && (msg_id = xs_dict_get(obj, "id")) && xs_set_add(&rep, msg_id) != 1)
 9             continue;
10 
11         const char *actor_id = xs_dict_get(noti, "actor");