Przeglądaj źródła

Reject messages not for me.

default 3 lat temu
rodzic
commit
35995d03be
1 zmienionych plików z 3 dodań i 4 usunięć
  1. 3 4
      activitypub.c

+ 3 - 4
activitypub.c

@@ -942,11 +942,10 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
         utype = "(null)";
 
     /* reject messages that are not for this user */
-    int d = is_msg_for_me(snac, msg);
-    snac_debug(snac, 0, xs_fmt("---> %s %d", xs_dict_get(msg, "id"), d));
-
-    if (!d) {
+    if (!is_msg_for_me(snac, msg)) {
         snac_debug(snac, 0, xs_fmt("message from %s not for us", actor));
+
+        return 1;
     }
 
     /* bring the actor */