commit b032e3d

default  ·  2023-03-06 13:35:11 +0000 UTC
parent e3e45b7
Fixed is_msg_for_me().
1 files changed,  +3, -3
+3, -3
 1@@ -295,7 +295,7 @@ int is_msg_for_me(snac *snac, xs_dict *msg)
 2     int ret = 1;
 3     char *type = xs_dict_get(msg, "type");
 4 
 5-    if (!xs_is_null(type) && strcmp(type, "Note") == 0) {
 6+    if (!xs_is_null(type) && strcmp(type, "Create") == 0) {
 7         xs *rcpts = recipient_list(snac, msg, 0);
 8         xs_list *p = rcpts;
 9         xs_str *v;
10@@ -307,8 +307,8 @@ int is_msg_for_me(snac *snac, xs_dict *msg)
11         }
12 
13         /* if we're not following this fellow, then the answer is NO */
14-        char *atto = xs_dict_get(msg, "attributedTo");
15-        if (xs_is_null(atto) || !following_check(snac, atto))
16+        char *actor = xs_dict_get(msg, "actor");
17+        if (xs_is_null(actor) || !following_check(snac, actor))
18             ret = 0;
19     }
20