about summary refs log tree commit diff
path: root/app/models/account_migration.rb
diff options
context:
space:
mode:
authorTakeshi Umeda <noel.yoshiba@gmail.com>2019-09-21 16:11:38 +0900
committerEugen Rochko <eugen@zeonfederated.com>2019-09-21 09:11:38 +0200
commitb18aea91e3b7c89338c2b0cd07e037e6557514ee (patch)
tree067b631fe329d07bd251997f2ceba72bb7fdf5fb /app/models/account_migration.rb
parentf497d14b19ce150ee19e6478c9018833e28c7d52 (diff)
Accept acct starting with @ in account migration (#11907)
Diffstat (limited to 'app/models/account_migration.rb')
-rw-r--r--app/models/account_migration.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/account_migration.rb b/app/models/account_migration.rb
index 15830bffb..e2c2cb085 100644
--- a/app/models/account_migration.rb
+++ b/app/models/account_migration.rb
@@ -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