Jelajahi Sumber

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

default 1 tahun lalu
induk
melakukan
f7ae2521ba
1 mengubah file dengan 5 tambahan dan 0 penghapusan
  1. 5 0
      activitypub.c

+ 5 - 0
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? */