summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mastoapi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 46a6eab..426e692 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -1424,12 +1424,16 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
1424 if (!xs_match(type, "Note|Question|Page|Article")) 1424 if (!xs_match(type, "Note|Question|Page|Article"))
1425 continue; 1425 continue;
1426 1426
1427 const char *from; 1427 const char *from = NULL;
1428 if (strcmp(type, "Page") == 0) 1428 if (strcmp(type, "Page") == 0)
1429 from = xs_dict_get(msg, "audience"); 1429 from = xs_dict_get(msg, "audience");
1430 else 1430
1431 if (from == NULL)
1431 from = xs_dict_get(msg, "attributedTo"); 1432 from = xs_dict_get(msg, "attributedTo");
1432 1433
1434 if (from == NULL)
1435 continue;
1436
1433 /* is this message from a person we don't follow? */ 1437 /* is this message from a person we don't follow? */
1434 if (strcmp(from, snac1.actor) && !following_check(&snac1, from)) { 1438 if (strcmp(from, snac1.actor) && !following_check(&snac1, from)) {
1435 /* discard if it was not boosted */ 1439 /* discard if it was not boosted */