aboutsummaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-11-17 10:53:47 +0100
committerdefault <nobody@localhost>2024-11-17 10:53:47 +0100
commit442b46abc0afeedfeffba7f5317fa5b350ef9c56 (patch)
treecdae445e62395edcb9eb5f1deddf64bf96379883 /mastoapi.c
parent2416945748994def6a96163a939348a22ad541a3 (diff)
mastoapi: added more checks in the notifications code.
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mastoapi.c b/mastoapi.c
index c9d71b9..f80c730 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -1784,6 +1784,10 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
mn = xs_dict_append(mn, "created_at", xs_dict_get(noti, "date"));
xs *acct = mastoapi_account(&snac1, actor);
+
+ if (acct == NULL)
+ continue;
+
mn = xs_dict_append(mn, "account", acct);
if (strcmp(type, "follow") != 0 && !xs_is_null(objid)) {