summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2022-09-28 07:12:16 +0200
committerdefault <nobody@localhost>2022-09-28 07:12:16 +0200
commit045498652fca392e4a1d6eff6fef4a2b577cb2d1 (patch)
treea6d5d0fd71421a313821aa47ee1ec0af66f37354 /activitypub.c
parentfc6a12514643c9d19d0ddfbda37d79a0ae42f6d2 (diff)
'Announce' messages also try to bring the announced actor.
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c
index fc90fe6..81bfa59 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -647,8 +647,15 @@ void process_message(snac *snac, char *msg, char *req)
char *who = xs_dict_get(a_msg, "attributedTo");
if (who && !is_muted(snac, who)) {
- timeline_admire(snac, object, actor, 0);
- snac_log(snac, xs_fmt("new 'Announce' %s %s", actor, object));
+ /* bring the actor */
+ xs *who_o = NULL;
+
+ if (valid_status(actor_request(snac, who, &who_o))) {
+ timeline_admire(snac, object, actor, 0);
+ snac_log(snac, xs_fmt("new 'Announce' %s %s", actor, object));
+ }
+ else
+ snac_log(snac, xs_fmt("dropped 'Announce' on actor request error %s", who));
}
else
snac_log(snac, xs_fmt("ignored 'Announce' about muted actor %s", who));