Prevent duplicate message history disclaimers
This commit is contained in:
parent
b290a27173
commit
9f1304bca8
1 changed files with 9 additions and 0 deletions
|
@ -1666,6 +1666,15 @@
|
|||
},
|
||||
|
||||
async addMessageHistoryDisclaimer() {
|
||||
const lastMessage = this.messageCollection.last();
|
||||
if (
|
||||
lastMessage &&
|
||||
lastMessage.get('type') === 'message-history-unsynced'
|
||||
) {
|
||||
// We do not need another message history disclaimer
|
||||
return lastMessage;
|
||||
}
|
||||
|
||||
const timestamp = Date.now();
|
||||
|
||||
const model = new Whisper.Message({
|
||||
|
|
Loading…
Reference in a new issue