More unfollow notification tweaks.

This commit is contained in:
default 2023-07-04 14:23:12 +02:00
parent 51c3fc9267
commit 78b468f013
2 changed files with 5 additions and 2 deletions

View file

@ -686,8 +686,11 @@ void notify(snac *snac, const char *type, const char *utype, const char *actor,
enqueue_telegram(body, bot, chat_id); enqueue_telegram(body, bot, chat_id);
/* finally, store it in the notification folder */ /* finally, store it in the notification folder */
if (strcmp(type, "Follow") == 0 || strcmp(utype, "Follow") == 0) if (strcmp(type, "Follow") == 0)
objid = id; objid = id;
else
if (strcmp(utype, "Follow") == 0)
objid = actor;
notify_add(snac, type, utype, actor, objid != NULL ? objid : id); notify_add(snac, type, utype, actor, objid != NULL ? objid : id);
} }

2
html.c
View file

@ -1510,7 +1510,7 @@ xs_str *html_notifications(snac *snac)
if (strcmp(type, "Follow") == 0 || strcmp(utype, "Follow") == 0) { if (strcmp(type, "Follow") == 0 || strcmp(utype, "Follow") == 0) {
s = xs_str_cat(s, "<div class=\"snac-post\">\n"); s = xs_str_cat(s, "<div class=\"snac-post\">\n");
s = html_msg_icon(snac, s, obj); s = html_actor_icon(s, actor, NULL, NULL, NULL, 0);
s = xs_str_cat(s, "</div>\n"); s = xs_str_cat(s, "</div>\n");
} }