summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2022-10-01 21:01:54 +0200
committerdefault <nobody@localhost>2022-10-01 21:01:54 +0200
commitbe3191ee5d968fd8428e71888d040c4f710f6428 (patch)
tree3d18152617e626cf78105a6e28ce70c997f96934 /activitypub.c
parent8bb758206289ad85ebd4624c2673eef42660df9f (diff)
Fixed crash.
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c
index 3aaef57..9fee973 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -90,10 +90,11 @@ int timeline_request(snac *snac, char *id, char *referrer)
status = activitypub_request(snac, id, &object);
if (valid_status(status)) {
- char *actor = xs_dict_get(object, "actor");
+ char *actor = xs_dict_get(object, "attributedTo");
/* request (and drop) the actor for this entry */
- actor_request(snac, actor, NULL);
+ if (!xs_is_null(actor))
+ actor_request(snac, actor, NULL);
/* does it have an ancestor? */
char *in_reply_to = xs_dict_get(object, "inReplyTo");