summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2024-08-01 18:48:01 +0200
committerGravatar default2024-08-01 18:48:01 +0200
commit20af5d65f9b09cebe439f29cfbd72c0a6f379cb1 (patch)
treeac7299c427bb0874b2650d7d861a39ef85bc9566
parentNotify Moves, even if they fail. (diff)
downloadpenes-snac2-20af5d65f9b09cebe439f29cfbd72c0a6f379cb1.tar.gz
penes-snac2-20af5d65f9b09cebe439f29cfbd72c0a6f379cb1.tar.xz
penes-snac2-20af5d65f9b09cebe439f29cfbd72c0a6f379cb1.zip
In 'Move' notifications, show the old account below the originator one.
-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)
2531 xs_html_attr("class", "snac-post"), 2531 xs_html_attr("class", "snac-post"),
2532 html_actor_icon(user, actor, NULL, NULL, NULL, 0, 0))); 2532 html_actor_icon(user, actor, NULL, NULL, NULL, 0, 0)));
2533 } 2533 }
2534 else
2535 if (strcmp(type, "Move") == 0) {
2536 const xs_dict *o_msg = xs_dict_get(noti, "msg");
2537 const char *target;
2538
2539 if (xs_type(o_msg) == XSTYPE_DICT && (target = xs_dict_get(o_msg, "target"))) {
2540 xs *old_actor = NULL;
2541
2542 if (valid_status(actor_get(target, &old_actor))) {
2543 xs_html_add(entry,
2544 xs_html_tag("div",
2545 xs_html_attr("class", "snac-post"),
2546 html_actor_icon(user, old_actor, NULL, NULL, NULL, 0, 0)));
2547 }
2548 }
2549 }
2534 else { 2550 else {
2535 xs *md5 = xs_md5_hex(id, strlen(id)); 2551 xs *md5 = xs_md5_hex(id, strlen(id));
2536 2552