diff options
| author | 2025-02-27 17:27:37 +0100 | |
|---|---|---|
| committer | 2025-02-27 17:27:37 +0100 | |
| commit | 995ea87a8f60f160c4846e4fbfce4e9ae60273de (patch) | |
| tree | 1a950869a9436cc3c83d60d6e9eadbcd806750f1 /activitypub.c | |
| parent | Cosmetic cleanup of po files. (diff) | |
| download | penes-snac2-995ea87a8f60f160c4846e4fbfce4e9ae60273de.tar.gz penes-snac2-995ea87a8f60f160c4846e4fbfce4e9ae60273de.tar.xz penes-snac2-995ea87a8f60f160c4846e4fbfce4e9ae60273de.zip | |
More hashtag block tweaks.
Diffstat (limited to 'activitypub.c')
| -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) | |||
| 677 | 677 | ||
| 678 | if (xs_match(type, "Like|Announce|EmojiReact")) { | 678 | if (xs_match(type, "Like|Announce|EmojiReact")) { |
| 679 | const char *object = xs_dict_get(c_msg, "object"); | 679 | const char *object = xs_dict_get(c_msg, "object"); |
| 680 | xs *obj = NULL; | ||
| 680 | 681 | ||
| 681 | if (xs_is_dict(object)) | 682 | if (xs_is_dict(object)) { |
| 683 | obj = xs_dup(object); | ||
| 682 | object = xs_dict_get(object, "id"); | 684 | object = xs_dict_get(object, "id"); |
| 685 | } | ||
| 683 | 686 | ||
| 684 | /* bad object id? reject */ | 687 | /* bad object id? reject */ |
| 685 | if (!xs_is_string(object)) | 688 | if (!xs_is_string(object)) |
| 686 | return 0; | 689 | return 0; |
| 687 | 690 | ||
| 688 | xs *obj = NULL; | 691 | /* try to get the object */ |
| 689 | if (!valid_status(object_get(object, &obj))) | 692 | if (!xs_is_dict(obj)) |
| 690 | return 0; | 693 | object_get(object, &obj); |
| 691 | 694 | ||
| 692 | /* if it's about one of our posts, accept it */ | 695 | /* if it's about one of our posts, accept it */ |
| 693 | if (xs_startswith(object, snac->actor)) | 696 | if (xs_startswith(object, snac->actor)) |