diff options
| author | 2024-09-12 23:48:16 +0200 | |
|---|---|---|
| committer | 2024-09-12 23:48:16 +0200 | |
| commit | 6869c493a125f9e44de16dc4cc20c426e4364ff1 (patch) | |
| tree | d56c067373ac05b8ac0af732a828fe0f9175f3ff | |
| parent | Updated RELEASE_NOTES. (diff) | |
| download | snac2-6869c493a125f9e44de16dc4cc20c426e4364ff1.tar.gz snac2-6869c493a125f9e44de16dc4cc20c426e4364ff1.tar.xz snac2-6869c493a125f9e44de16dc4cc20c426e4364ff1.zip | |
Minor fix to avoid 'Block' notifications to be invisible.
| -rw-r--r-- | html.c | 7 |
1 files changed, 5 insertions, 2 deletions
| @@ -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); |