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
ea10f2e1e0
commit
4e15a89b39
1 changed files with 2 additions and 0 deletions
|
@ -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?
|
||||
|
|
Loading…
Add table
Reference in a new issue