Merge pull request #4149 from annando/send_participation

Follow up to PR 4147
2022.09-rc
Hypolite Petovan 2017-12-29 14:06:27 -06:00 zatwierdzone przez GitHub
commit 6bd19e7dab
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 8 dodań i 3 usunięć

Wyświetl plik

@ -3243,9 +3243,14 @@ class Diaspora
// Fetch some user id to have a valid handle to transmit the participation. // 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. // In fact it doesn't matter which user sends this - but it is needed by the protocol.
$condition = ['verified' => true, 'blocked' => false, 'account_removed' => false, 'account_expired' => false]; // If the item belongs to a user, we take this user id.
$first_user = dba::select('user', ['uid'], $condition, ['limit' => 1]); if ($item['uid'] == 0) {
$owner = User::getOwnerDataById($first_user['uid']); $condition = ['verified' => true, 'blocked' => false, 'account_removed' => false, 'account_expired' => false];
$first_user = dba::select('user', ['uid'], $condition, ['limit' => 1]);
$owner = User::getOwnerDataById($first_user['uid']);
} else {
$owner = User::getOwnerDataById($item['uid']);
}
$author = self::myHandle($owner); $author = self::myHandle($owner);