From 4dfd91dbbf6c46a1133a6c25d1503321594957e5 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 21 Feb 2021 11:47:03 +0000 Subject: [PATCH] Use the system user for uid=0 --- src/Protocol/Diaspora.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 79151c140f..950e8dc552 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -3099,18 +3099,7 @@ class Diaspora return; } - // Fetch some user id to have a valid handle to transmit the participation. - // In fact it doesn't matter which user sends this - but it is needed by the protocol. - // If the item belongs to a user, we take this user id. - if ($item['uid'] == 0) { - $condition = ['verified' => true, 'blocked' => false, - 'account_removed' => false, 'account_expired' => false, 'account-type' => User::ACCOUNT_TYPE_PERSON]; - $first_user = DBA::selectFirst('user', ['uid'], $condition, ['order' => ['uid']]); - $owner = User::getOwnerDataById($first_user['uid']); - } else { - $owner = User::getOwnerDataById($item['uid']); - } - + $owner = User::getOwnerDataById($item['uid']); $author = self::myHandle($owner); $message = ["author" => $author,