hackchat-engine 1.1.22 → 1.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -59,5 +59,5 @@
59
59
  "lintfix": "eslint --fix --ignore-path .gitignore .",
60
60
  "test": "echo \"Error: no test specified\" && exit 1"
61
61
  },
62
- "version": "1.1.22"
62
+ "version": "1.1.23"
63
63
  }
@@ -106,7 +106,8 @@ class User {
106
106
  * Is this the current users record
107
107
  * @type {boolean}
108
108
  */
109
- this.mine = data.isme || false;
109
+ this.mine = data.isme
110
+ || (this.client.myUser ? this.client.myUser.userid === this.userid : false);
110
111
 
111
112
  /**
112
113
  * User's color
@@ -282,13 +283,16 @@ class User {
282
283
  if (typeof data.trip !== 'undefined') this.usertrip = data.trip;
283
284
  if (typeof data.hash !== 'undefined') this.userhash = data.hash;
284
285
  if (typeof data.effect !== 'undefined') this.userEffect = data.effect;
285
-
286
286
  if (typeof data.nick !== 'undefined') this.username = data.nick;
287
287
  if (typeof data.uType !== 'undefined') this.userlevel = data.uType;
288
288
  if (typeof data.isBot !== 'undefined') this.botting = data.isBot;
289
289
  if (typeof data.color !== 'undefined') this.nickColor = data.color;
290
290
  if (typeof data.flair !== 'undefined') this.flair = data.flair;
291
291
  if (typeof data.level !== 'undefined') this.permissionLevel = data.level;
292
+
293
+ if (!this.mine && this.client.myUser && this.client.myUser.userid === this.userid) {
294
+ this.mine = true;
295
+ }
292
296
  }
293
297
 
294
298
  /**