From 95d32cbe7cfbb0321ac37b57ada23b6c268815e2 Mon Sep 17 00:00:00 2001 From: default Date: Thu, 23 Jan 2025 20:17:38 +0100 Subject: Improved notify repetition code. --- html.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/html.c b/html.c index d325063..3fd1e4b 100644 --- a/html.c +++ b/html.c @@ -2993,7 +2993,9 @@ xs_str *html_notifications(snac *user, int skip, int show) object_get(id, &obj); - if (xs_set_add(&rep, xs_dict_get(obj, "id")) != 1) + const char *msg_id = NULL; + + if (xs_is_dict(obj) && (msg_id = xs_dict_get(obj, "id")) && xs_set_add(&rep, msg_id) != 1) continue; const char *actor_id = xs_dict_get(noti, "actor"); -- cgit v1.2.3