mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:35:30 +00:00
fix mail permissions for AP comments which are DMs when comments not allowed
This commit is contained in:
parent
b5d8d006dc
commit
711fc8c5b4
1 changed files with 2 additions and 1 deletions
|
@ -4273,7 +4273,8 @@ class Activity
|
|||
public static function comment_allowed($channel, $item, $parent_item): bool|string
|
||||
{
|
||||
// First check if comment permissions have been granted to this author.
|
||||
$allowed = perm_is_allowed($channel['channel_id'], $item['author_xchan'], 'post_comments');
|
||||
$allowed = perm_is_allowed($channel['channel_id'], $item['author_xchan'],
|
||||
(((int)$item['item_private'] === 2) ? 'post_mail' : 'post_comments'));
|
||||
|
||||
// Allow likes from strangers if permitted to do so. These are difficult (but not impossible) to spam.
|
||||
if ($item['verb'] === 'Like' && PConfig::Get($channel['channel_id'], 'system', 'permit_all_likes') && $item['obj_type'] === 'Note') {
|
||||
|
|
Loading…
Reference in a new issue