commit 995ea87
default
·
2025-02-27 16:27:37 +0000 UTC
parent 9cc610f
More hashtag block tweaks.
1 files changed,
+7,
-4
+7,
-4
1@@ -677,17 +677,20 @@ int is_msg_for_me(snac *snac, const xs_dict *c_msg)
2
3 if (xs_match(type, "Like|Announce|EmojiReact")) {
4 const char *object = xs_dict_get(c_msg, "object");
5+ xs *obj = NULL;
6
7- if (xs_is_dict(object))
8+ if (xs_is_dict(object)) {
9+ obj = xs_dup(object);
10 object = xs_dict_get(object, "id");
11+ }
12
13 /* bad object id? reject */
14 if (!xs_is_string(object))
15 return 0;
16
17- xs *obj = NULL;
18- if (!valid_status(object_get(object, &obj)))
19- return 0;
20+ /* try to get the object */
21+ if (!xs_is_dict(obj))
22+ object_get(object, &obj);
23
24 /* if it's about one of our posts, accept it */
25 if (xs_startswith(object, snac->actor))