Browse Source

Fix wrong person being notified after nested reblog call, fix favourites leaking private toots in Atom feeds

closed-social-glitch-2
Eugen Rochko 7 years ago
parent
commit
8b94d283fb
2 changed files with 6 additions and 2 deletions
  1. +4
    -0
      app/models/favourite.rb
  2. +2
    -2
      app/services/reblog_service.rb

+ 4
- 0
app/models/favourite.rb View 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

+ 2
- 2
app/services/reblog_service.rb View 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

Loading…
Cancel
Save