diff options
| author | 2025-01-23 20:17:38 +0100 | |
|---|---|---|
| committer | 2025-01-23 20:17:38 +0100 | |
| commit | 95d32cbe7cfbb0321ac37b57ada23b6c268815e2 (patch) | |
| tree | a76502ecc89870b1b0683503dd290ac72ab1e7c1 | |
| parent | Added some code to supress repeated notifications. (diff) | |
| download | penes-snac2-95d32cbe7cfbb0321ac37b57ada23b6c268815e2.tar.gz penes-snac2-95d32cbe7cfbb0321ac37b57ada23b6c268815e2.tar.xz penes-snac2-95d32cbe7cfbb0321ac37b57ada23b6c268815e2.zip | |
Improved notify repetition code.
| -rw-r--r-- | html.c | 4 |
1 files changed, 3 insertions, 1 deletions
| @@ -2993,7 +2993,9 @@ xs_str *html_notifications(snac *user, int skip, int show) | |||
| 2993 | 2993 | ||
| 2994 | object_get(id, &obj); | 2994 | object_get(id, &obj); |
| 2995 | 2995 | ||
| 2996 | if (xs_set_add(&rep, xs_dict_get(obj, "id")) != 1) | 2996 | const char *msg_id = NULL; |
| 2997 | |||
| 2998 | if (xs_is_dict(obj) && (msg_id = xs_dict_get(obj, "id")) && xs_set_add(&rep, msg_id) != 1) | ||
| 2997 | continue; | 2999 | continue; |
| 2998 | 3000 | ||
| 2999 | const char *actor_id = xs_dict_get(noti, "actor"); | 3001 | const char *actor_id = xs_dict_get(noti, "actor"); |