Commit bd0c80ebf30414deab823d0fcc8a62a3483b4062

Authored by Adhidarma Hadiwinoto
1 parent f7594efa61
Exists in master

penanganan undefined resource

Showing 1 changed file with 5 additions and 1 deletions Side-by-side Diff

... ... @@ -28,6 +28,10 @@ MatrixUtil.prototype.updateBuddyState = function(jid, state, statusText, resourc
28 28 if (jid == 'undefined') {return; }
29 29 jid = jid.toLowerCase();
30 30  
  31 + if (!resource) {
  32 + resource = 'undefined';
  33 + }
  34 +
31 35 let logger = this.logger;
32 36 let matrix = this.matrix;
33 37  
... ... @@ -131,7 +135,7 @@ MatrixUtil.prototype.updateLastIncoming = function(sender, msg) {
131 135 MatrixUtil.prototype.updateLastOutgoing = function(destination, msg) {
132 136 if (!destination) { return; }
133 137 destination = destination.toLowerCase();
134   -
  138 +
135 139 let matrix = this.matrix;
136 140  
137 141 if (!matrix) {