Dont add chat admin for remote videos.
This commit is contained in:
parent
b38fb172fa
commit
bda306b461
@ -26,9 +26,12 @@ async function getVideoAffiliations (options: RegisterServerOptions, video: MVid
|
|||||||
// Adding an 'admin' affiliation for video owner
|
// Adding an 'admin' affiliation for video owner
|
||||||
// NB: if it fails, we want previous results to be returned...
|
// NB: if it fails, we want previous results to be returned...
|
||||||
try {
|
try {
|
||||||
|
if (!video.remote) {
|
||||||
|
// don't add the video owner if it is a remote video!
|
||||||
const userName = await _getVideoOwnerUsername(options, video)
|
const userName = await _getVideoOwnerUsername(options, video)
|
||||||
const userJid = userName + '@localhost'
|
const userJid = userName + '@localhost'
|
||||||
r[userJid] = 'admin'
|
r[userJid] = 'admin'
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
peertubeHelpers.logger.error('Failed to get video owner informations:', error)
|
peertubeHelpers.logger.error('Failed to get video owner informations:', error)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user