diff options
| author | 2026-01-06 15:00:45 +0100 | |
|---|---|---|
| committer | 2026-01-06 15:00:45 +0100 | |
| commit | b6414bd2c48dd54699f3bfbdae10bb0209841f0c (patch) | |
| tree | e6c15f1a2346e69500d8201a8813384843e44c02 | |
| parent | Hide EmojiReacts from muted actors and blocked instances. (diff) | |
| download | snac2-b6414bd2c48dd54699f3bfbdae10bb0209841f0c.tar.gz snac2-b6414bd2c48dd54699f3bfbdae10bb0209841f0c.tar.xz snac2-b6414bd2c48dd54699f3bfbdae10bb0209841f0c.zip | |
mastoapi: hide EmojiReacts from muted actors and block instances.
| -rw-r--r-- | mastoapi.c | 4 |
1 files changed, 4 insertions, 0 deletions
| @@ -1171,6 +1171,10 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg) | |||
| 1171 | const char *content = xs_dict_get(msg, "content"); | 1171 | const char *content = xs_dict_get(msg, "content"); |
| 1172 | const char *actor = xs_dict_get(msg, "actor"); | 1172 | const char *actor = xs_dict_get(msg, "actor"); |
| 1173 | const xs_list *contentl = xs_dict_get(sfrl, content); | 1173 | const xs_list *contentl = xs_dict_get(sfrl, content); |
| 1174 | |||
| 1175 | if ((snac && is_muted(snac, actor)) || is_instance_blocked(actor)) | ||
| 1176 | continue; | ||
| 1177 | |||
| 1174 | /* NOTE: idk when there are no actor, but i encountered that bug. | 1178 | /* NOTE: idk when there are no actor, but i encountered that bug. |
| 1175 | * Probably because of one of my previous attempts. | 1179 | * Probably because of one of my previous attempts. |
| 1176 | * Keeping this just in case, can remove later */ | 1180 | * Keeping this just in case, can remove later */ |