Log in with external Peertube account (#348):

* For anonymous users: new "log in using an external account" dialog, with the "remote Peertube account" options
* ConverseJS: using global vars for custom localized string (injected
  using Webpack)
This commit is contained in:
John Livingston
2024-04-08 19:02:56 +02:00
parent c55fabc972
commit 8fc8e3032b
15 changed files with 328 additions and 29 deletions

View File

@ -8,7 +8,10 @@ import type { AuthentInfos } from './auth'
* @returns default parameters to provide to ConverseJS.
*/
function defaultConverseParams (
{ forceReadonly, theme, assetsPath, room, forceDefaultHideMucParticipants, autofocus }: InitConverseJSParams
{
forceReadonly, theme, assetsPath, room, forceDefaultHideMucParticipants, autofocus,
peertubeVideoOriginalUrl, peertubeVideoUUID
}: InitConverseJSParams
): any {
const mucShowInfoMessages = forceReadonly
? [
@ -87,7 +90,10 @@ function defaultConverseParams (
colorize_username: true,
// This is a specific settings, that is used in ConverseJS customization, to force avatars loading in readonly mode.
livechat_load_all_vcards: !!forceReadonly
livechat_load_all_vcards: !!forceReadonly,
livechat_peertube_video_original_url: peertubeVideoOriginalUrl,
livechat_peertube_video_uuid: peertubeVideoUUID
}
// TODO: params.clear_messages_on_reconnection = true when muc_mam will be available.

View File

@ -6,7 +6,9 @@ export const livechatViewerModePlugin = {
const _converse = this._converse
_converse.api.settings.extend({
livechat_enable_viewer_mode: false
livechat_enable_viewer_mode: false,
livechat_peertube_video_original_url: undefined,
livechat_peertube_video_uuid: undefined
})
const originalGetDefaultMUCNickname = _converse.getDefaultMUCNickname