Forráskód Böngészése

Remove messages from localStorage when calling /clear

JC Brand 11 éve
szülő
commit
f15eb5a7d4
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      converse.js

+ 2 - 2
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) {