commit 442b46a

default  ·  2024-11-17 09:53:47 +0000 UTC
parent 2416945
mastoapi: added more checks in the notifications code.
1 files changed,  +4, -0
+4, -0
 1@@ -1784,6 +1784,10 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
 2                 mn = xs_dict_append(mn, "created_at", xs_dict_get(noti, "date"));
 3 
 4                 xs *acct = mastoapi_account(&snac1, actor);
 5+
 6+                if (acct == NULL)
 7+                    continue;
 8+
 9                 mn = xs_dict_append(mn, "account", acct);
10 
11                 if (strcmp(type, "follow") != 0 && !xs_is_null(objid)) {