瀏覽代碼

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

default 1 年之前
父節點
當前提交
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? */