snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 78b468f013cc2624a4b9044393eb2c86556c98b7
parent 51c3fc9267aecabfc795a03994c9f48bb324b9cc
Author: default <nobody@localhost>
Date:   Tue,  4 Jul 2023 14:23:12 +0200

More unfollow notification tweaks.

Diffstat:
Mactivitypub.c | 5++++-
Mhtml.c | 2+-
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/activitypub.c b/activitypub.c @@ -686,8 +686,11 @@ void notify(snac *snac, const char *type, const char *utype, const char *actor, enqueue_telegram(body, bot, chat_id); /* finally, store it in the notification folder */ - if (strcmp(type, "Follow") == 0 || strcmp(utype, "Follow") == 0) + if (strcmp(type, "Follow") == 0) objid = id; + else + if (strcmp(utype, "Follow") == 0) + objid = actor; notify_add(snac, type, utype, actor, objid != NULL ? objid : id); } diff --git a/html.c b/html.c @@ -1510,7 +1510,7 @@ xs_str *html_notifications(snac *snac) if (strcmp(type, "Follow") == 0 || strcmp(utype, "Follow") == 0) { 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"); }