]> cat aescling's git repositories - mastodon.git/commitdiff
Fixed ANOTHER first_or_create bug. Seriously who came up with that API smh
authorEugen Rochko <eugen@zeonfederated.com>
Fri, 18 Mar 2016 22:47:02 +0000 (23:47 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Fri, 18 Mar 2016 22:47:02 +0000 (23:47 +0100)
app/services/process_feed_service.rb

index 8fd0b3e6821cf491e7e1b0dcf0789b777457420c..9b342499d3b927776e2e2e16813cb26fa43b88c6 100644 (file)
@@ -48,7 +48,7 @@ class ProcessFeedService < BaseService
             mentioned_account = Account.find_local(href.path.gsub('/users/', ''))
 
             unless mentioned_account.nil?
-              mentioned_account.mentions.first_or_create(status: status)
+              mentioned_account.mentions.where(status: status).first_or_create(status: status)
             end
           end
         end