From e3f76a1cb03c2863ce73ac8411e2dffd93f39c43 Mon Sep 17 00:00:00 2001 From: Jeremy Kescher Date: Fri, 2 Dec 2022 08:05:10 +0100 Subject: [PATCH] Add reaction limit to instance serializer --- app/serializers/rest/instance_serializer.rb | 4 ++++ app/serializers/rest/v1/instance_serializer.rb | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/app/serializers/rest/instance_serializer.rb b/app/serializers/rest/instance_serializer.rb index 5ae1099d04..e28c932205 100644 --- a/app/serializers/rest/instance_serializer.rb +++ b/app/serializers/rest/instance_serializer.rb @@ -76,6 +76,10 @@ class REST::InstanceSerializer < ActiveModel::Serializer translation: { enabled: TranslationService.configured?, }, + + reactions: { + max_reactions: StatusReactionValidator::LIMIT, + }, } end diff --git a/app/serializers/rest/v1/instance_serializer.rb b/app/serializers/rest/v1/instance_serializer.rb index 389ec7dffc..0bee371bcb 100644 --- a/app/serializers/rest/v1/instance_serializer.rb +++ b/app/serializers/rest/v1/instance_serializer.rb @@ -96,6 +96,10 @@ class REST::V1::InstanceSerializer < ActiveModel::Serializer min_expiration: PollValidator::MIN_EXPIRATION, max_expiration: PollValidator::MAX_EXPIRATION, }, + + reactions: { + max_reactions: StatusReactionValidator::LIMIT, + }, } end