1
0
Fork 0
forked from gitea/nas

Change: #457 サイレンスされているユーザーに、フォロー相手以外への絵文字リアクションを禁止 (#522)

This commit is contained in:
KMY(雪あすか) 2024-02-06 09:29:46 +09:00 committed by GitHub
parent f30b6f55e2
commit 230c621843
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 75 additions and 1 deletions

View file

@ -16,6 +16,8 @@ class EmojiReactService < BaseService
authorize_with account, status, :emoji_reaction?
@status = status
raise Mastodon::ValidationError, I18n.t('reactions.errors.banned') if account.silenced? && !status.account.following?(account)
with_redis_lock("emoji_reaction:#{status.id}") do
shortcode, domain = name.split('@')
domain = nil if TagManager.instance.local_domain?(domain)