summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--activitypub.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/activitypub.c b/activitypub.c
index 8b44dc8..8fa29c9 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);
@@ -2297,7 +2302,7 @@ int process_input_message(snac *snac, const xs_dict *msg, const xs_dict *req)
2297 } 2302 }
2298 else 2303 else
2299 if (strcmp(type, "Update") == 0) { /** **/ 2304 if (strcmp(type, "Update") == 0) { /** **/
2300 if (xs_match(utype, "Person|Service")) { /** **/ 2305 if (xs_match(utype, "Person|Service|Application")) { /** **/
2301 actor_add(actor, xs_dict_get(msg, "object")); 2306 actor_add(actor, xs_dict_get(msg, "object"));
2302 timeline_touch(snac); 2307 timeline_touch(snac);
2303 2308