Просмотр исходного кода

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

default 1 год назад
Родитель
Сommit
f7ae2521ba
1 измененных файлов с 5 добавлено и 0 удалено
  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? */