diff options
| author | 2026-01-08 08:40:18 +0100 | |
|---|---|---|
| committer | 2026-01-08 08:40:18 +0100 | |
| commit | 6a2b4bbcecaadab41fd89d5219f328f3e5916ceb (patch) | |
| tree | 312fd9350ca27b2c3d6bd3f52c324f75a1a2526f | |
| parent | Fixed crash. (diff) | |
| download | snac2-6a2b4bbcecaadab41fd89d5219f328f3e5916ceb.tar.gz snac2-6a2b4bbcecaadab41fd89d5219f328f3e5916ceb.tar.xz snac2-6a2b4bbcecaadab41fd89d5219f328f3e5916ceb.zip | |
If disable_emojireact is set to true in server.json, EmojiReacts are dropped on input.
| -rw-r--r-- | activitypub.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c index 617fd30..5e55b8a 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -2578,6 +2578,11 @@ int process_input_message(snac *snac, const xs_dict *msg, const xs_dict *req) | |||
| 2578 | return -1; | 2578 | return -1; |
| 2579 | } | 2579 | } |
| 2580 | 2580 | ||
| 2581 | if (strcmp(type, "EmojiReact") == 0 && xs_is_true(xs_dict_get(srv_config, "disable_emojireact"))) { | ||
| 2582 | srv_log(xs_fmt("Dropping EmojiReact from %s due to admin configuration", actor)); | ||
| 2583 | return -1; | ||
| 2584 | } | ||
| 2585 | |||
| 2581 | const char *object, *utype; | 2586 | const char *object, *utype; |
| 2582 | 2587 | ||
| 2583 | object = xs_dict_get(msg, "object"); | 2588 | object = xs_dict_get(msg, "object"); |