소스 검색

Fix processing of incoming Block activities (#15546)

Unlike locally-issued blocks, they weren't clearing follow
relationships in both directions, follow requests or notifications.

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
pull/15558/head
ThibG 3 달 전
committed by GitHub
부모
커밋
7bed25f3ea
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. +6
    -1
      app/lib/activitypub/activity/block.rb

+ 6
- 1
app/lib/activitypub/activity/block.rb 파일 보기

@@ -11,8 +11,13 @@ class ActivityPub::Activity::Block < ActivityPub::Activity
return
end

UnfollowService.new.call(@account, target_account) if @account.following?(target_account)
UnfollowService.new.call(target_account, @account) if target_account.following?(@account)
RejectFollowService.new.call(target_account, @account) if target_account.requested?(@account)

@account.block!(target_account, uri: @json['id']) unless delete_arrived_first?(@json['id'])
unless delete_arrived_first?(@json['id'])
BlockWorker.perform_async(@account.id, target_account.id)
@account.block!(target_account, uri: @json['id'])
end
end
end

불러오는 중...
취소
저장