snac2

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

commit 84152d67f5c5158b1e75ce67c13e4af696e3f305
parent b0337f55b5c0afe32231f1efffe7aa184319b7e3
Author: default <nobody@localhost>
Date:   Fri,  2 Jun 2023 10:58:49 +0200

Fixed bug in notify() (the poll id was not set).

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

diff --git a/activitypub.c b/activitypub.c @@ -602,7 +602,7 @@ void notify(snac *snac, const char *type, const char *utype, const char *actor, if (strcmp(type, "Follow") == 0) objid = id; - notify_add(snac, type, utype, actor, objid); + notify_add(snac, type, utype, actor, objid != NULL ? objid : id); } diff --git a/html.c b/html.c @@ -1402,7 +1402,7 @@ xs_str *html_notifications(snac *snac) const char *utype = xs_dict_get(noti, "utype"); const char *id = xs_dict_get(noti, "objid"); - if (!valid_status(object_get(id, &obj))) + if (xs_is_null(id) || !valid_status(object_get(id, &obj))) continue; if (is_hidden(snac, id))