Renaming.

This commit is contained in:
John Livingston 2021-08-05 18:48:06 +02:00
parent 0e14ec6649
commit aaea040a4f
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC
2 changed files with 3 additions and 3 deletions

View File

@ -130,7 +130,7 @@ function register ({ registerHook, registerSettingsScript, peertubeHelpers }: Re
// Here we have a channel chat room // Here we have a channel chat room
// The backend should have added informations here // The backend should have added informations here
// (because the Peertube API can't work with channelId...) // (because the Peertube API can't work with channelId...)
const href = getBaseRoute() + '/webchat/room/' + encodeURIComponent(localpart) + '?fromadmin=1' const href = getBaseRoute() + '/webchat/room/' + encodeURIComponent(localpart) + '?forcetype=1'
if (room.channel?.name) { if (room.channel?.name) {
aEl.href = href // here we know that the channel still exists, so we can open the webchat. aEl.href = href // here we know that the channel still exists, so we can open the webchat.
const aVideoEl = document.createElement('a') const aVideoEl = document.createElement('a')
@ -142,7 +142,7 @@ function register ({ registerHook, registerSettingsScript, peertubeHelpers }: Re
} else if (/^[a-zA-A0-9-]+$/.test(localpart)) { } else if (/^[a-zA-A0-9-]+$/.test(localpart)) {
// localpart must be a video uuid. // localpart must be a video uuid.
const uuid = localpart const uuid = localpart
const href = getBaseRoute() + '/webchat/room/' + encodeURIComponent(uuid) + '?fromadmin=1' const href = getBaseRoute() + '/webchat/room/' + encodeURIComponent(uuid) + '?forcetype=1'
const p = fetch('/api/v1/videos/' + uuid, { const p = fetch('/api/v1/videos/' + uuid, {
method: 'GET', method: 'GET',
headers: peertubeHelpers.getAuthHeader() headers: peertubeHelpers.getAuthHeader()

View File

@ -52,7 +52,7 @@ async function initWebchatRouter (options: RegisterServerOptions): Promise<Route
if (chatType === 'builtin-prosody') { if (chatType === 'builtin-prosody') {
const prosodyDomain = await getProsodyDomain(options) const prosodyDomain = await getProsodyDomain(options)
jid = 'anon.' + prosodyDomain jid = 'anon.' + prosodyDomain
if (req.query.fromadmin === '1') { if (req.query.forcetype === '1') {
// We come from the room list in the settings page. // We come from the room list in the settings page.
// Here we don't read the prosody-room-type settings, // Here we don't read the prosody-room-type settings,
// but use the roomKey format. // but use the roomKey format.