From 65ba85d97b4ea8a2ca02d64e1462e3564fd58b9a Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 3 Feb 2020 17:14:42 -0500 Subject: [PATCH] clear historyKeeper cache when we trim a channel --- lib/commands/channel.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/commands/channel.js b/lib/commands/channel.js index ec4bf3fe6..872a2c445 100644 --- a/lib/commands/channel.js +++ b/lib/commands/channel.js @@ -105,9 +105,8 @@ Channel.removeOwnedChannelHistory = function (Env, channelId, unsafeKey, hash, c }).nThen(function () { Env.msgStore.trimChannel(channelId, hash, function (err) { if (err) { return void cb(err); } - - - // XXX you must also clear the channel's index from historyKeeper cache + // clear historyKeeper's cache for this channel + Env.historyKeeper.channelClose(channelId); }); }); };