diff --git a/CHANGELOG.md b/CHANGELOG.md index 9adf7070..18ba5e21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## v2.1.3 * Fix: 2.1.0 was in fact correct... Did not work on my preprod env because of... a Livebox bug... +* Fix: if the video owner is already owner of the chatroom, he should not be downgraded to admin. ## v2.1.2 diff --git a/server/lib/prosody/config/affiliations.ts b/server/lib/prosody/config/affiliations.ts index b90dadc8..47dea2d1 100644 --- a/server/lib/prosody/config/affiliations.ts +++ b/server/lib/prosody/config/affiliations.ts @@ -33,7 +33,9 @@ async function getVideoAffiliations (options: RegisterServerOptions, video: MVid // don't add the video owner if it is a remote video! const userName = await _getVideoOwnerUsername(options, video) const userJid = userName + '@' + prosodyDomain - r[userJid] = 'admin' + if (!(userJid in r)) { // don't override if already owner! + r[userJid] = 'admin' + } } } catch (error) { peertubeHelpers.logger.error('Failed to get video owner informations:', error)