summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2023-03-06 14:35:11 +0100
committerGravatar default2023-03-06 14:35:11 +0100
commitb032e3d5224ed76ee1125fecb0d090fe60c313e9 (patch)
tree292d833da2495f98a7115146f9aeb1addb034f38
parentNew function is_msg_for_me(). (diff)
downloadsnac2-b032e3d5224ed76ee1125fecb0d090fe60c313e9.tar.gz
snac2-b032e3d5224ed76ee1125fecb0d090fe60c313e9.tar.xz
snac2-b032e3d5224ed76ee1125fecb0d090fe60c313e9.zip
Fixed is_msg_for_me().
-rw-r--r--activitypub.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/activitypub.c b/activitypub.c
index ee790c7..75cbecf 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -295,7 +295,7 @@ int is_msg_for_me(snac *snac, xs_dict *msg)
295 int ret = 1; 295 int ret = 1;
296 char *type = xs_dict_get(msg, "type"); 296 char *type = xs_dict_get(msg, "type");
297 297
298 if (!xs_is_null(type) && strcmp(type, "Note") == 0) { 298 if (!xs_is_null(type) && strcmp(type, "Create") == 0) {
299 xs *rcpts = recipient_list(snac, msg, 0); 299 xs *rcpts = recipient_list(snac, msg, 0);
300 xs_list *p = rcpts; 300 xs_list *p = rcpts;
301 xs_str *v; 301 xs_str *v;
@@ -307,8 +307,8 @@ int is_msg_for_me(snac *snac, xs_dict *msg)
307 } 307 }
308 308
309 /* if we're not following this fellow, then the answer is NO */ 309 /* if we're not following this fellow, then the answer is NO */
310 char *atto = xs_dict_get(msg, "attributedTo"); 310 char *actor = xs_dict_get(msg, "actor");
311 if (xs_is_null(atto) || !following_check(snac, atto)) 311 if (xs_is_null(actor) || !following_check(snac, actor))
312 ret = 0; 312 ret = 0;
313 } 313 }
314 314