snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit f7ae2521ba76dfa403b182221001c38bf383d0e3
parent 5b7279b6f7b0bff59aba029b12b05c989a3b0059
Author: default <nobody@localhost>
Date:   Sun, 19 Jan 2025 18:54:02 +0100

Don't notify us for our own posts from the relay.

Diffstat:
Mactivitypub.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/activitypub.c b/activitypub.c @@ -889,6 +889,11 @@ void notify(snac *snac, const char *type, const char *utype, const char *actor, /* if it's not an admiration about something by us, done */ if (xs_is_null(objid) || !xs_startswith(objid, snac->actor)) return; + + /* if it's an announce by our own relay, done */ + xs *relay_id = xs_fmt("%s/relay", srv_baseurl); + if (xs_startswith(id, relay_id)) + return; } /* updated poll? */