Dont add chat admin for remote videos.

This commit is contained in:
John Livingston 2021-05-06 12:42:07 +02:00
parent b38fb172fa
commit bda306b461

View File

@ -26,9 +26,12 @@ async function getVideoAffiliations (options: RegisterServerOptions, video: MVid
// Adding an 'admin' affiliation for video owner
// NB: if it fails, we want previous results to be returned...
try {
if (!video.remote) {
// don't add the video owner if it is a remote video!
const userName = await _getVideoOwnerUsername(options, video)
const userJid = userName + '@localhost'
r[userJid] = 'admin'
}
} catch (error) {
peertubeHelpers.logger.error('Failed to get video owner informations:', error)
}