Add support for private pinned posts (#16954)
* Add support for private pinned toots * Allow local user to pin private toots * Change wording to avoid "direct message"local
parent
081e4426f8
commit
d5c9feb7b7
18 changed files with 164 additions and 28 deletions
@ -0,0 +1,24 @@ |
||||
# frozen_string_literal: true |
||||
|
||||
class RemoteAccountRefreshWorker |
||||
include Sidekiq::Worker |
||||
include ExponentialBackoff |
||||
include JsonLdHelper |
||||
|
||||
sidekiq_options queue: 'pull', retry: 3 |
||||
|
||||
def perform(id) |
||||
account = Account.find_by(id: id) |
||||
return if account.nil? || account.local? |
||||
|
||||
ActivityPub::FetchRemoteAccountService.new.call(account.uri) |
||||
rescue Mastodon::UnexpectedResponseError => e |
||||
response = e.response |
||||
|
||||
if response_error_unsalvageable?(response) |
||||
# Give up |
||||
else |
||||
raise e |
||||
end |
||||
end |
||||
end |
Loading…
Reference in new issue