Add emoji reaction detail status
This commit is contained in:
parent
de951a0ef9
commit
a1485f242d
22 changed files with 393 additions and 16 deletions
|
@ -40,6 +40,13 @@ class Api::V1::Statuses::EmojiReactionsController < Api::BaseController
|
|||
private
|
||||
|
||||
def create_private(emoji)
|
||||
count = EmojiReaction.where(account: current_account, status: @status).count
|
||||
|
||||
if count >= DEFAULT_EMOJI_REACTION_LIMIT
|
||||
bad_request
|
||||
return
|
||||
end
|
||||
|
||||
EmojiReactService.new.call(current_account, @status, emoji)
|
||||
render json: @status, serializer: REST::StatusSerializer
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue