commit b598cb5

default  ·  2024-03-24 10:30:07 +0000 UTC
parent 58848dd
Reject my own messages in is_msg_for_me().
1 files changed,  +6, -0
+6, -0
 1@@ -625,6 +625,12 @@ int is_msg_for_me(snac *snac, const xs_dict *c_msg)
 2     const char *type  = xs_dict_get(c_msg, "type");
 3     const char *actor = xs_dict_get(c_msg, "actor");
 4 
 5+    if (strcmp(actor, snac->actor) == 0) {
 6+        /* message by myself? (most probably via the shared-inbox) reject */
 7+        snac_debug(snac, 1, xs_fmt("ignoring message by myself"));
 8+        return 0;
 9+    }
10+
11     if (xs_match(type, "Like|Announce")) {
12         const char *object = xs_dict_get(c_msg, "object");
13