add a simple guard against unparsed messages when trimming history

pull/1/head
ansuz 5 years ago
parent f86196e40a
commit 5dff6535ed

@ -970,6 +970,15 @@ var trimChannel = function (env, channelName, hash, _cb) {
}
var msg = Util.tryParse(s_msg);
if (!msg) {
Log.error("TRIM_HISTORY_UNPARSED_LINE", {
content: s_msg,
index: i,
});
return void readMore();
}
var msgHash = Extras.getHash(msg[4]);
if (msgHash === hash) {

Loading…
Cancel
Save