commit 7cd62dd
default
·
2025-01-22 04:29:25 +0000 UTC
parent 2611c81
Don't account as such announces by our own relay.
1 files changed,
+10,
-5
+10,
-5
1@@ -2274,11 +2274,16 @@ int process_input_message(snac *snac, const xs_dict *msg, const xs_dict *req)
2 xs *who_o = NULL;
3
4 if (valid_status(actor_request(snac, who, &who_o))) {
5- if (timeline_admire(snac, object, actor, 0) == HTTP_STATUS_CREATED)
6- snac_log(snac, xs_fmt("new 'Announce' %s %s", actor, object));
7- else
8- snac_log(snac, xs_fmt("repeated 'Announce' from %s to %s",
9- actor, object));
10+ /* don't account as such announces by our own relay */
11+ xs *this_relay = xs_fmt("%s/relay", srv_baseurl);
12+
13+ if (strcmp(actor, this_relay) != 0) {
14+ if (timeline_admire(snac, object, actor, 0) == HTTP_STATUS_CREATED)
15+ snac_log(snac, xs_fmt("new 'Announce' %s %s", actor, object));
16+ else
17+ snac_log(snac, xs_fmt("repeated 'Announce' from %s to %s",
18+ actor, object));
19+ }
20
21 /* distribute the post with the actor as 'proxy' */
22 list_distribute(snac, actor, a_msg);