diff options
| author | default <nobody@localhost> | 2025-02-27 17:27:37 +0100 |
|---|---|---|
| committer | default <nobody@localhost> | 2025-02-27 17:27:37 +0100 |
| commit | 995ea87a8f60f160c4846e4fbfce4e9ae60273de (patch) | |
| tree | 1a950869a9436cc3c83d60d6e9eadbcd806750f1 | |
| parent | 9cc610f709aea94213eed65c12c44bd35723d6bf (diff) | |
More hashtag block tweaks.
| -rw-r--r-- | activitypub.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/activitypub.c b/activitypub.c index a7b6c0b..5d79593 100644 --- a/activitypub.c +++ b/activitypub.c @@ -677,17 +677,20 @@ int is_msg_for_me(snac *snac, const xs_dict *c_msg) if (xs_match(type, "Like|Announce|EmojiReact")) { const char *object = xs_dict_get(c_msg, "object"); + xs *obj = NULL; - if (xs_is_dict(object)) + if (xs_is_dict(object)) { + obj = xs_dup(object); object = xs_dict_get(object, "id"); + } /* bad object id? reject */ if (!xs_is_string(object)) return 0; - xs *obj = NULL; - if (!valid_status(object_get(object, &obj))) - return 0; + /* try to get the object */ + if (!xs_is_dict(obj)) + object_get(object, &obj); /* if it's about one of our posts, accept it */ if (xs_startswith(object, snac->actor)) |