From f15eb5a7d49d505ab0077a91f7dfc992b59b4ce8 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Fri, 13 Sep 2013 09:57:14 +0200 Subject: [PATCH] Remove messages from localStorage when calling /clear --- converse.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/converse.js b/converse.js index b5cb56db5..b56ffce36 100644 --- a/converse.js +++ b/converse.js @@ -453,7 +453,7 @@ if (match) { if (match[1] === "clear") { this.$el.find('.chat-content').empty(); - this.model.messages.reset(); + this.model.messages.reset().localStorage._clear(); return; } else if (match[1] === "help") { @@ -2691,7 +2691,7 @@ $.proxy(this.roster.rosterHandler, this.roster), null, 'presence', null); this.rosterview = new this.RosterView({'model':this.roster}); - } + }; this.onConnected = function () { if (this.debug) {