mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-15 11:21:42 +00:00
89b988cab5
* Wrap methods of ProcessFeedService::ProcessEntry in classes
This is a change same with 425acecfdb
, except
that it has the following changes:
* Revert irrelevant change in find_or_create_conversation
* Fix error handling for RemoteActivity
* Introduce Ostatus name space
17 lines
456 B
Ruby
17 lines
456 B
Ruby
# frozen_string_literal: true
|
|
|
|
class UnblockService < BaseService
|
|
def call(account, target_account)
|
|
return unless account.blocking?(target_account)
|
|
|
|
unblock = account.unblock!(target_account)
|
|
NotificationWorker.perform_async(build_xml(unblock), account.id, target_account.id) unless target_account.local?
|
|
end
|
|
|
|
private
|
|
|
|
def build_xml(block)
|
|
Ostatus::AtomSerializer.render(Ostatus::AtomSerializer.new.unblock_salmon(block))
|
|
end
|
|
end
|