Fix ConverseJS: livechatWindowTitlePlugin was broken.

This commit is contained in:
John Livingston 2022-01-04 04:23:13 +01:00
parent 75b260bfd5
commit 5296de6a91
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC
2 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,11 @@
# Changelog
## 5.2.3
### Fixes
* Fix ConverseJS: livechatWindowTitlePlugin was broken (window title won't be set to the room name)
## 5.2.1
### Fixes

View File

@ -213,7 +213,7 @@ window.initConverse = async function initConverse ({
dependencies: ['converse-muc-views'],
overrides: {
ChatRoomView: {
renderHeading: function (this: any): any {
requestUpdate: function (this: any): any {
console.log('[livechatWindowTitlePlugin] updating the document title.')
try {
const title = this.model.getDisplayName()
@ -221,9 +221,9 @@ window.initConverse = async function initConverse ({
document.title = title
}
} catch (err) {
console.error('Failed updating the window title', err)
console.error('[livechatWindowTitlePlugin] Failed updating the window title', err)
}
return this.__super__.renderHeading.apply(this, arguments)
return this.__super__.requestUpdate.apply(this)
}
}
}