Converse upstream WIP:

* Fix anonymous mode
This commit is contained in:
John Livingston 2024-07-15 17:42:32 +02:00
parent 1226162b50
commit cbcf51d1eb
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC

View File

@ -17,11 +17,11 @@ export const livechatViewerModePlugin = {
livechat_external_auth_reconnect_mode: undefined livechat_external_auth_reconnect_mode: undefined
}) })
const originalGetDefaultMUCNickname = _converse.getDefaultMUCNickname const originalGetDefaultMUCNickname = _converse.exports.getDefaultMUCNickname
if (!originalGetDefaultMUCNickname) { if (!originalGetDefaultMUCNickname) {
console.error('[livechatViewerModePlugin] getDefaultMUCNickname is not initialized.') console.error('[livechatViewerModePlugin] getDefaultMUCNickname is not initialized.')
} else { } else {
Object.assign(_converse, { Object.assign(_converse.exports, {
getDefaultMUCNickname: function (this: any): any { getDefaultMUCNickname: function (this: any): any {
if (!_converse.api.settings.get('livechat_enable_viewer_mode')) { if (!_converse.api.settings.get('livechat_enable_viewer_mode')) {
return originalGetDefaultMUCNickname.apply(this, arguments) return originalGetDefaultMUCNickname.apply(this, arguments)