commit 84152d6

default  ·  2023-06-02 08:58:49 +0000 UTC
parent b0337f5
Fixed bug in notify() (the poll id was not set).
2 files changed,  +2, -2
M html.c
+1, -1
1@@ -602,7 +602,7 @@ void notify(snac *snac, const char *type, const char *utype, const char *actor,
2     if (strcmp(type, "Follow") == 0)
3         objid = id;
4 
5-    notify_add(snac, type, utype, actor, objid);
6+    notify_add(snac, type, utype, actor, objid != NULL ? objid : id);
7 }
8 
9 
M html.c
+1, -1
1@@ -1402,7 +1402,7 @@ xs_str *html_notifications(snac *snac)
2         const char *utype = xs_dict_get(noti, "utype");
3         const char *id    = xs_dict_get(noti, "objid");
4 
5-        if (!valid_status(object_get(id, &obj)))
6+        if (xs_is_null(id) || !valid_status(object_get(id, &obj)))
7             continue;
8 
9         if (is_hidden(snac, id))