From 8fa91f7c4abfd90250416923eaae9a09d040870b Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 13 Aug 2020 12:18:52 +0200 Subject: [PATCH] Don't send CHATHISTORY command if server doesn't support it --- components/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/app.js b/components/app.js index 55c0f87..d8aa5a8 100644 --- a/components/app.js +++ b/components/app.js @@ -472,7 +472,7 @@ export default class App extends Component { } var receipt = this.getReceipt(channel, ReceiptType.READ); - if (msg.prefix.name == this.client.nick && receipt) { + if (msg.prefix.name == this.client.nick && receipt && this.client.enabledCaps["draft/chathistory"] && this.client.enabledCaps["server-time"]) { var after = receipt; var before = { time: msg.tags.time || irc.formatDate(new Date()) }; this.fetchHistoryBetween(channel, after, before, CHATHISTORY_MAX_SIZE).catch((err) => {