summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2024-09-12 23:48:16 +0200
committerGravatar default2024-09-12 23:48:16 +0200
commit6869c493a125f9e44de16dc4cc20c426e4364ff1 (patch)
treed56c067373ac05b8ac0af732a828fe0f9175f3ff
parentUpdated RELEASE_NOTES. (diff)
downloadsnac2-6869c493a125f9e44de16dc4cc20c426e4364ff1.tar.gz
snac2-6869c493a125f9e44de16dc4cc20c426e4364ff1.tar.xz
snac2-6869c493a125f9e44de16dc4cc20c426e4364ff1.zip
Minor fix to avoid 'Block' notifications to be invisible.
-rw-r--r--html.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/html.c b/html.c
index 06c5ff1..47ab9b8 100644
--- a/html.c
+++ b/html.c
@@ -2552,12 +2552,14 @@ xs_str *html_notifications(snac *user, int skip, int show)
2552 const char *id = xs_dict_get(noti, "objid"); 2552 const char *id = xs_dict_get(noti, "objid");
2553 const char *date = xs_dict_get(noti, "date"); 2553 const char *date = xs_dict_get(noti, "date");
2554 2554
2555 if (xs_is_null(id) || !valid_status(object_get(id, &obj))) 2555 if (xs_is_null(id))
2556 continue; 2556 continue;
2557 2557
2558 if (is_hidden(user, id)) 2558 if (is_hidden(user, id))
2559 continue; 2559 continue;
2560 2560
2561 object_get(id, &obj);
2562
2561 const char *actor_id = xs_dict_get(noti, "actor"); 2563 const char *actor_id = xs_dict_get(noti, "actor");
2562 xs *actor = NULL; 2564 xs *actor = NULL;
2563 2565
@@ -2615,7 +2617,8 @@ xs_str *html_notifications(snac *user, int skip, int show)
2615 } 2617 }
2616 } 2618 }
2617 } 2619 }
2618 else { 2620 else
2621 if (obj != NULL) {
2619 xs *md5 = xs_md5_hex(id, strlen(id)); 2622 xs *md5 = xs_md5_hex(id, strlen(id));
2620 2623
2621 xs_html *h = html_entry(user, obj, 0, 0, md5, 1); 2624 xs_html *h = html_entry(user, obj, 0, 0, md5, 1);