Remove "room." from from podcast:chat server

This commit is contained in:
Alecks Gates 2023-05-25 22:08:30 -05:00 committed by John Livingston
parent 97a5d4b408
commit e4d6626d6e

View File

@ -44,15 +44,15 @@ async function register (options: RegisterServerOptions): Promise<any> {
const webserverUrl = options.peertubeHelpers.config.getWebserverUrl() const webserverUrl = options.peertubeHelpers.config.getWebserverUrl()
const hostname = (new URL(webserverUrl)).hostname const hostname = (new URL(webserverUrl)).hostname
const embedUrl = `${webserverUrl}/plugins/livechat/router/webchat/room/${encodeURIComponent(video.uuid)}` const embedUrl = `${webserverUrl}/plugins/livechat/router/webchat/room/${encodeURIComponent(video.uuid)}`
const xmppHostname = `room.${hostname}` const xmppRoom = `room.${hostname}`
return result.concat([ return result.concat([
{ {
name: 'podcast:chat', name: 'podcast:chat',
attributes: { attributes: {
server: xmppHostname, server: hostname,
protocol: 'xmpp', protocol: 'xmpp',
space: `${video.uuid}@${xmppHostname}`, space: `${video.uuid}@${xmppRoom}`,
embedUrl: embedUrl embedUrl: embedUrl
} }
} }