diff options
| author | 2022-09-28 07:12:16 +0200 | |
|---|---|---|
| committer | 2022-09-28 07:12:16 +0200 | |
| commit | 045498652fca392e4a1d6eff6fef4a2b577cb2d1 (patch) | |
| tree | a6d5d0fd71421a313821aa47ee1ec0af66f37354 | |
| parent | New function html_msg_icon(). (diff) | |
| download | snac2-045498652fca392e4a1d6eff6fef4a2b577cb2d1.tar.gz snac2-045498652fca392e4a1d6eff6fef4a2b577cb2d1.tar.xz snac2-045498652fca392e4a1d6eff6fef4a2b577cb2d1.zip | |
'Announce' messages also try to bring the announced actor.
| -rw-r--r-- | activitypub.c | 11 |
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) | |||
| 647 | char *who = xs_dict_get(a_msg, "attributedTo"); | 647 | char *who = xs_dict_get(a_msg, "attributedTo"); |
| 648 | 648 | ||
| 649 | if (who && !is_muted(snac, who)) { | 649 | if (who && !is_muted(snac, who)) { |
| 650 | timeline_admire(snac, object, actor, 0); | 650 | /* bring the actor */ |
| 651 | snac_log(snac, xs_fmt("new 'Announce' %s %s", actor, object)); | 651 | xs *who_o = NULL; |
| 652 | |||
| 653 | if (valid_status(actor_request(snac, who, &who_o))) { | ||
| 654 | timeline_admire(snac, object, actor, 0); | ||
| 655 | snac_log(snac, xs_fmt("new 'Announce' %s %s", actor, object)); | ||
| 656 | } | ||
| 657 | else | ||
| 658 | snac_log(snac, xs_fmt("dropped 'Announce' on actor request error %s", who)); | ||
| 652 | } | 659 | } |
| 653 | else | 660 | else |
| 654 | snac_log(snac, xs_fmt("ignored 'Announce' about muted actor %s", who)); | 661 | snac_log(snac, xs_fmt("ignored 'Announce' about muted actor %s", who)); |