summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2023-06-02 10:58:49 +0200
committerGravatar default2023-06-02 10:58:49 +0200
commit84152d67f5c5158b1e75ce67c13e4af696e3f305 (patch)
treebbf853ce17a95661d0fce8f234db450e6b1fcd14
parentFixed bug in vote discarding in notify(). (diff)
downloadpenes-snac2-84152d67f5c5158b1e75ce67c13e4af696e3f305.tar.gz
penes-snac2-84152d67f5c5158b1e75ce67c13e4af696e3f305.tar.xz
penes-snac2-84152d67f5c5158b1e75ce67c13e4af696e3f305.zip
Fixed bug in notify() (the poll id was not set).
-rw-r--r--activitypub.c2
-rw-r--r--html.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c
index c28e52f..67b4739 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -602,7 +602,7 @@ void notify(snac *snac, const char *type, const char *utype, const char *actor,
602 if (strcmp(type, "Follow") == 0) 602 if (strcmp(type, "Follow") == 0)
603 objid = id; 603 objid = id;
604 604
605 notify_add(snac, type, utype, actor, objid); 605 notify_add(snac, type, utype, actor, objid != NULL ? objid : id);
606} 606}
607 607
608 608
diff --git a/html.c b/html.c
index 3e50648..78e164d 100644
--- a/html.c
+++ b/html.c
@@ -1402,7 +1402,7 @@ xs_str *html_notifications(snac *snac)
1402 const char *utype = xs_dict_get(noti, "utype"); 1402 const char *utype = xs_dict_get(noti, "utype");
1403 const char *id = xs_dict_get(noti, "objid"); 1403 const char *id = xs_dict_get(noti, "objid");
1404 1404
1405 if (!valid_status(object_get(id, &obj))) 1405 if (xs_is_null(id) || !valid_status(object_get(id, &obj)))
1406 continue; 1406 continue;
1407 1407
1408 if (is_hidden(snac, id)) 1408 if (is_hidden(snac, id))