]> cat aescling's git repositories - mastodon.git/commitdiff
Fix wrong person being notified after nested reblog call, fix favourites leaking...
authorEugen Rochko <eugen@zeonfederated.com>
Wed, 28 Dec 2016 12:21:12 +0000 (13:21 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Wed, 28 Dec 2016 12:21:12 +0000 (13:21 +0100)
app/models/favourite.rb
app/services/reblog_service.rb

index 2fc3d18cde785248f1bd591ab1da560a01f0bbb4..147105e48a796ff2f7dd2f50baa600ad25e267e4 100644 (file)
@@ -29,6 +29,10 @@ class Favourite < ApplicationRecord
     thread
   end
 
+  def hidden?
+    status.private_visibility?
+  end
+
   before_validation do
     self.status = status.reblog if status.reblog?
   end
index 23b35ffd22a2feb4bb356265ffc91af0cf037fee..0cb51eecd8472e87e2989da4263f1c647cda4528 100644 (file)
@@ -14,9 +14,9 @@ class ReblogService < BaseService
     Pubsubhubbub::DistributionWorker.perform_async(reblog.stream_entry.id)
 
     if reblogged_status.local?
-      NotifyService.new.call(reblogged_status.account, reblog)
+      NotifyService.new.call(reblog.reblog.account, reblog)
     else
-      NotificationWorker.perform_async(reblog.stream_entry.id, reblogged_status.account_id)
+      NotificationWorker.perform_async(reblog.stream_entry.id, reblog.reblog.account_id)
     end
 
     reblog