mirror of
https://github.com/friendica/friendica
synced 2025-04-26 13:50:11 +00:00
Added processing of incoming block notices
This commit is contained in:
parent
79526564ca
commit
c0b3c527d6
6 changed files with 99 additions and 4 deletions
|
@ -670,8 +670,7 @@ class Receiver
|
|||
|
||||
case 'as:Block':
|
||||
if (in_array($object_data['object_type'], self::ACCOUNT_TYPES)) {
|
||||
// Used by Mastodon to announce that the sender has blocked the account
|
||||
self::storeUnhandledActivity(false, $type, $object_data, $activity, $body, $uid, $trust_source, $push, $signer);
|
||||
ActivityPub\Processor::blockPerson($object_data);
|
||||
} else {
|
||||
self::storeUnhandledActivity(true, $type, $object_data, $activity, $body, $uid, $trust_source, $push, $signer);
|
||||
}
|
||||
|
@ -728,6 +727,9 @@ class Receiver
|
|||
} elseif (($object_data['object_type'] == 'as:Accept') &&
|
||||
in_array($object_data['object_object_type'], self::ACCOUNT_TYPES)) {
|
||||
ActivityPub\Processor::rejectFollowUser($object_data);
|
||||
} elseif (($object_data['object_type'] == 'as:Block') &&
|
||||
in_array($object_data['object_object_type'], self::ACCOUNT_TYPES)) {
|
||||
ActivityPub\Processor::unblockPerson($object_data);
|
||||
} elseif (in_array($object_data['object_type'], array_merge(self::ACTIVITY_TYPES, ['as:Announce'])) &&
|
||||
in_array($object_data['object_object_type'], array_merge(['as:Tombstone'], self::CONTENT_TYPES))) {
|
||||
ActivityPub\Processor::undoActivity($object_data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue