Skip to content

Commit

Permalink
Accept acct starting with @ in account migration (mastodon#11907)
Browse files Browse the repository at this point in the history
  • Loading branch information
noellabo authored and hiyuki2578 committed Oct 2, 2019
1 parent 7c9d42c commit 780ecda
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/models/account_migration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ def cooldown_at
created_at + COOLDOWN_PERIOD
end

def acct=(val)
val = val.to_s.strip
super(val.start_with?('@') ? val[1..-1] : val)
end

private

def set_target_account
Expand Down

0 comments on commit 780ecda

Please sign in to comment.