]> cat aescling's git repositories - mastodon.git/commitdiff
Accept acct starting with @ in account migration (#11907)
authorTakeshi Umeda <noel.yoshiba@gmail.com>
Sat, 21 Sep 2019 07:11:38 +0000 (16:11 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Sat, 21 Sep 2019 07:11:38 +0000 (09:11 +0200)
app/models/account_migration.rb

index 15830bffbd06820cede9d22fc2ba9521fcc27b8b..e2c2cb0850727999302a710628f77129827edcd3 100644 (file)
@@ -46,6 +46,11 @@ class AccountMigration < ApplicationRecord
     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