diff options
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/activitypub.c b/activitypub.c index 8b44dc8..5517bf4 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -2274,11 +2274,16 @@ int process_input_message(snac *snac, const xs_dict *msg, const xs_dict *req) | |||
| 2274 | xs *who_o = NULL; | 2274 | xs *who_o = NULL; |
| 2275 | 2275 | ||
| 2276 | if (valid_status(actor_request(snac, who, &who_o))) { | 2276 | if (valid_status(actor_request(snac, who, &who_o))) { |
| 2277 | if (timeline_admire(snac, object, actor, 0) == HTTP_STATUS_CREATED) | 2277 | /* don't account as such announces by our own relay */ |
| 2278 | snac_log(snac, xs_fmt("new 'Announce' %s %s", actor, object)); | 2278 | xs *this_relay = xs_fmt("%s/relay", srv_baseurl); |
| 2279 | else | 2279 | |
| 2280 | snac_log(snac, xs_fmt("repeated 'Announce' from %s to %s", | 2280 | if (strcmp(actor, this_relay) != 0) { |
| 2281 | actor, object)); | 2281 | if (timeline_admire(snac, object, actor, 0) == HTTP_STATUS_CREATED) |
| 2282 | snac_log(snac, xs_fmt("new 'Announce' %s %s", actor, object)); | ||
| 2283 | else | ||
| 2284 | snac_log(snac, xs_fmt("repeated 'Announce' from %s to %s", | ||
| 2285 | actor, object)); | ||
| 2286 | } | ||
| 2282 | 2287 | ||
| 2283 | /* distribute the post with the actor as 'proxy' */ | 2288 | /* distribute the post with the actor as 'proxy' */ |
| 2284 | list_distribute(snac, actor, a_msg); | 2289 | list_distribute(snac, actor, a_msg); |