From 9c73e49db7298d227828b9b9ca32ed9d69c6d57e Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 19 Sep 2021 10:53:19 +0000 Subject: [PATCH] Make posts on the profile page writable --- include/conversation.php | 4 ++-- src/Object/Thread.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 1cb2c745cc..507add97d6 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -312,7 +312,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o . "'; \r\n"; } } elseif ($mode === 'profile') { - $items = conversation_add_children($items, false, $order, $uid); + $items = conversation_add_children($items, false, $order, local_user()); if (!$update) { $tab = 'posts'; @@ -400,7 +400,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o $formSecurityToken = BaseModule::getFormSecurityToken('contact_action'); if (!empty($items)) { - if (in_array($mode, ['community', 'contacts'])) { + if (in_array($mode, ['community', 'contacts', 'profile'])) { $writable = true; } else { $writable = ($items[0]['uid'] == 0) && in_array($items[0]['network'], Protocol::FEDERATED); diff --git a/src/Object/Thread.php b/src/Object/Thread.php index 7d59759a0d..a2504a2ad1 100644 --- a/src/Object/Thread.php +++ b/src/Object/Thread.php @@ -80,7 +80,7 @@ class Thread break; case 'profile': $this->profile_owner = $a->getProfileOwner(); - $this->writable = Security::canWriteToUserWall($this->profile_owner); + $this->writable = Security::canWriteToUserWall($this->profile_owner) || $writable; break; case 'display': $this->profile_owner = $a->getProfileOwner();