Commit f0f7cfab authored by JC Brand's avatar JC Brand

Make the chatbox messages cache key overridable

parent 5b64b5a0
...@@ -295,10 +295,13 @@ converse.plugins.add('converse-chatboxes', { ...@@ -295,10 +295,13 @@ converse.plugins.add('converse-chatboxes', {
this.fetchMessages(); this.fetchMessages();
}, },
getMessagesCacheKey () {
return `converse.messages-${this.get('jid')}-${_converse.bare_jid}`;
},
initMessages () { initMessages () {
this.messages = new this.messagesCollection(); this.messages = new this.messagesCollection();
this.messages.browserStorage = new BrowserStorage.session( this.messages.browserStorage = new BrowserStorage.session(this.getMessagesCacheKey());
`converse.messages-${this.get('jid')}-${_converse.bare_jid}`);
this.messages.chatbox = this; this.messages.chatbox = this;
this.messages.on('change:upload', (message) => { this.messages.on('change:upload', (message) => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment