From b18aea91e3b7c89338c2b0cd07e037e6557514ee Mon Sep 17 00:00:00 2001
From: Takeshi Umeda <noel.yoshiba@gmail.com>
Date: Sat, 21 Sep 2019 16:11:38 +0900
Subject: [PATCH] Accept acct starting with @ in account migration (#11907)

---
 app/models/account_migration.rb | 5 +++++
 1 file changed, 5 insertions(+)

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