From 95daea0ef7aac14b9b412caa15bf386e0891a027 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 22 Jan 2021 15:49:22 +0100 Subject: [PATCH] Use buffer IDs in endOfHistory --- components/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/app.js b/components/app.js index def6f7a..e774acc 100644 --- a/components/app.js +++ b/components/app.js @@ -954,7 +954,7 @@ export default class App extends Component { if (!this.client.enabledCaps["draft/chathistory"] || !this.client.enabledCaps["server-time"]) { return; } - if (this.endOfHistory.get(buf.name)) { + if (this.endOfHistory.get(buf.id)) { return; } @@ -966,11 +966,11 @@ export default class App extends Component { } // Avoids sending multiple CHATHISTORY commands in parallel - this.endOfHistory.set(buf.name, true); + this.endOfHistory.set(buf.id, true); var params = ["BEFORE", buf.name, "timestamp=" + before, CHATHISTORY_PAGE_SIZE]; this.roundtripChatHistory(params).then((batch) => { - this.endOfHistory.set(buf.name, batch.messages.length < CHATHISTORY_PAGE_SIZE); + this.endOfHistory.set(buf.id, batch.messages.length < CHATHISTORY_PAGE_SIZE); }); }