Only allow reacting with remote emojis when status is local
Handling remote reactions with foreign emojis would require an extensive rewrite of vanilla code, so instead prevent reactions with remote emojis when the status is not local. Signed-off-by: Plastikmensch <plastikmensch@users.noreply.github.com>
This commit is contained in:
parent
51b00dd034
commit
f4f1cc9eab
|
@ -8,6 +8,8 @@ class ReactService < BaseService
|
|||
authorize_with account, status, :react?
|
||||
|
||||
name, domain = emoji.split('@')
|
||||
return unless domain.nil? || status.local?
|
||||
|
||||
custom_emoji = CustomEmoji.find_by(shortcode: name, domain: domain)
|
||||
reaction = StatusReaction.find_by(account: account, status: status, name: name, custom_emoji: custom_emoji)
|
||||
return reaction unless reaction.nil?
|
||||
|
|
Reference in New Issue