mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-06 09:51:24 +00:00
Fix Style/GuardClause
in move worker (#35520)
This commit is contained in:
parent
b5cebf45ea
commit
8d6f033326
|
@ -123,13 +123,13 @@ class MoveWorker
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_account_note_if_needed!(account, id)
|
def add_account_note_if_needed!(account, id)
|
||||||
unless AccountNote.exists?(account: account, target_account: @target_account)
|
return if AccountNote.exists?(account: account, target_account: @target_account)
|
||||||
|
|
||||||
text = I18n.with_locale(account.user_locale.presence || I18n.default_locale) do
|
text = I18n.with_locale(account.user_locale.presence || I18n.default_locale) do
|
||||||
I18n.t(id, acct: @source_account.acct)
|
I18n.t(id, acct: @source_account.acct)
|
||||||
end
|
end
|
||||||
AccountNote.create!(account: account, target_account: @target_account, comment: text)
|
AccountNote.create!(account: account, target_account: @target_account, comment: text)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
def skip_mute_move?(mute)
|
def skip_mute_move?(mute)
|
||||||
mute.account.muting?(@target_account) || mute.account.following?(@target_account)
|
mute.account.muting?(@target_account) || mute.account.following?(@target_account)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user