mirror of
https://github.com/friendica/friendica
synced 2024-12-22 12:40:15 +00:00
Merge pull request #14577 from annando/restrictions
No restrictions check on connector networks
This commit is contained in:
commit
760e98c5d4
1 changed files with 7 additions and 1 deletions
|
@ -1472,6 +1472,12 @@ class Item
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We only have to apply restrictions if the post originates from our server or is federated.
|
||||||
|
// Every other time we can trust the remote system.
|
||||||
|
if (!in_array($item['network'], Protocol::FEDERATED) && !$item['origin']) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (($restrictions & self::CANT_REPLY) && ($item['verb'] == Activity::POST)) {
|
if (($restrictions & self::CANT_REPLY) && ($item['verb'] == Activity::POST)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1796,7 +1802,7 @@ class Item
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($source_uid == 0) && (($item['private'] == self::PRIVATE) || !in_array($item['network'], Protocol::FEDERATED))) {
|
if (($source_uid == 0) && (($item['private'] == self::PRIVATE) || !in_array($item['network'], array_merge(Protocol::FEDERATED, [Protocol::BLUESKY])))) {
|
||||||
Logger::notice('Item is private or not from a federated network. It will not be stored for the user.', ['uri-id' => $uri_id, 'uid' => $uid, 'private' => $item['private'], 'network' => $item['network']]);
|
Logger::notice('Item is private or not from a federated network. It will not be stored for the user.', ['uri-id' => $uri_id, 'uid' => $uid, 'private' => $item['private'], 'network' => $item['network']]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue