mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-12-24 16:43:36 +00:00
In 'Move' notifications, show the old account below the originator one.
This commit is contained in:
parent
f14ea27818
commit
20af5d65f9
1 changed files with 16 additions and 0 deletions
16
html.c
16
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));
|
||||
|
||||
|
|
Loading…
Reference in a new issue