summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-08-01 18:48:01 +0200
committerdefault <nobody@localhost>2024-08-01 18:48:01 +0200
commit20af5d65f9b09cebe439f29cfbd72c0a6f379cb1 (patch)
treeac7299c427bb0874b2650d7d861a39ef85bc9566 /html.c
parentf14ea278189947fd53a4029237108319f096e35d (diff)
In 'Move' notifications, show the old account below the originator one.
Diffstat (limited to 'html.c')
-rw-r--r--html.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/html.c b/html.c
index 86ff3f2..e2cc4b9 100644
--- a/html.c
+++ b/html.c
@@ -2531,6 +2531,22 @@ xs_str *html_notifications(snac *user, int skip, int show)
xs_html_attr("class", "snac-post"),
html_actor_icon(user, actor, NULL, NULL, NULL, 0, 0)));
}
+ else
+ if (strcmp(type, "Move") == 0) {
+ const xs_dict *o_msg = xs_dict_get(noti, "msg");
+ const char *target;
+
+ if (xs_type(o_msg) == XSTYPE_DICT && (target = xs_dict_get(o_msg, "target"))) {
+ xs *old_actor = NULL;
+
+ if (valid_status(actor_get(target, &old_actor))) {
+ xs_html_add(entry,
+ xs_html_tag("div",
+ xs_html_attr("class", "snac-post"),
+ html_actor_icon(user, old_actor, NULL, NULL, NULL, 0, 0)));
+ }
+ }
+ }
else {
xs *md5 = xs_md5_hex(id, strlen(id));