]> cat aescling's git repositories - mastodon.git/commitdiff
strip leading & trailing spaces from remote follow acct (#997) (#2321)
authorcodl <codl@codl.fr>
Sat, 22 Apr 2017 13:08:30 +0000 (15:08 +0200)
committerEugen <eugen@zeonfederated.com>
Sat, 22 Apr 2017 13:08:30 +0000 (15:08 +0200)
app/models/remote_follow.rb

index 13281a4fccabf3ef570bbe2ee4b515abeda9e541..6c291e22cda04c4d95643745e4cfb5e8a56707d7 100644 (file)
@@ -8,6 +8,6 @@ class RemoteFollow
   validates :acct, presence: true
 
   def initialize(attrs = {})
-    @acct = attrs[:acct]
+    @acct = attrs[:acct].strip unless attrs[:acct].nil?
   end
 end