|
@@ -447,7 +447,8 @@ int is_msg_public(const xs_dict *msg)
|
|
|
int is_msg_for_me(snac *snac, const xs_dict *c_msg)
|
|
|
|
|
|
{
|
|
|
- const char *type = xs_dict_get(c_msg, "type");
|
|
|
+ const char *type = xs_dict_get(c_msg, "type");
|
|
|
+ const char *actor = xs_dict_get(c_msg, "actor");
|
|
|
|
|
|
if (xs_match(type, "Like|Announce")) {
|
|
|
const char *object = xs_dict_get(c_msg, "object");
|
|
@@ -464,12 +465,12 @@ int is_msg_for_me(snac *snac, const xs_dict *c_msg)
|
|
|
return 2;
|
|
|
|
|
|
|
|
|
- return following_check(snac, xs_dict_get(c_msg, "actor"));
|
|
|
+ return following_check(snac, actor);
|
|
|
}
|
|
|
|
|
|
|
|
|
if (xs_match(type, "Undo|Update")) {
|
|
|
- return following_check(snac, xs_dict_get(c_msg, "actor"));
|
|
|
+ return following_check(snac, actor);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -477,6 +478,10 @@ int is_msg_for_me(snac *snac, const xs_dict *c_msg)
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ if (following_check(snac, actor))
|
|
|
+ return 1;
|
|
|
+
|
|
|
xs_dict *msg = xs_dict_get(c_msg, "object");
|
|
|
xs *rcpts = recipient_list(snac, msg, 0);
|
|
|
xs_list *p = rcpts;
|