mirror of
https://github.com/friendica/friendica
synced 2025-04-27 19:50:12 +00:00
Post permissions are now copied from the thread parent
This commit is contained in:
parent
999c56a284
commit
8e05c282b1
10 changed files with 141 additions and 33 deletions
|
@ -880,6 +880,10 @@ class Item
|
|||
if (is_int($notify) && in_array($notify, Worker::PRIORITIES)) {
|
||||
$priority = $notify;
|
||||
}
|
||||
|
||||
// Mastodon style API visibility
|
||||
$copy_permissions = ($item['visibility'] ?? 'private') == 'private';
|
||||
unset($item['visibility']);
|
||||
} else {
|
||||
$item['network'] = trim(($item['network'] ?? '') ?: Protocol::PHANTOM);
|
||||
}
|
||||
|
@ -1359,6 +1363,9 @@ class Item
|
|||
|
||||
if ($notify) {
|
||||
DI::contentItem()->postProcessPost($posted_item);
|
||||
if ($copy_permissions && ($posted_item['thr-parent-id'] != $posted_item['uri-id']) && ($posted_item['private'] == self::PRIVATE)) {
|
||||
DI::contentItem()->copyPermissions($posted_item['thr-parent-id'], $posted_item['uri-id']);
|
||||
}
|
||||
} else {
|
||||
Hook::callAll('post_remote_end', $posted_item);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue