Skip to content

Commit

Permalink
build changes and fix presence bug
Browse files Browse the repository at this point in the history
  • Loading branch information
amishshah committed Dec 9, 2015
1 parent ffe2359 commit d9b9d1d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/Client/InternalClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -1505,9 +1505,9 @@ var InternalClient = (function () {

if (presenceUser.equals(user)) {
// a real presence update
client.emit("presence", user, data.status, data.game_id);
user.status = data.status;
user.gameID = data.game_id;
client.emit("presence", user, data.status, data.game_id);
} else {
// a name change or avatar change
client.emit("userUpdated", user, presenceUser);
Expand Down
5 changes: 1 addition & 4 deletions lib/Util/Equality.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ var Equality = (function () {
}

Equality.prototype.equals = function equals(object) {
if (object && object[this.eqDiscriminator] == this[this.eqDiscriminator]) {
return true;
}
return false;
return object && object[this.eqDiscriminator] === this[this.eqDiscriminator];
};

Equality.prototype.equalsStrict = function equalsStrict(object) {
Expand Down
2 changes: 1 addition & 1 deletion src/Client/InternalClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -1387,9 +1387,9 @@ export default class InternalClient {

if (presenceUser.equals(user)) {
// a real presence update
client.emit("presence", user, data.status, data.game_id);
user.status = data.status;
user.gameID = data.game_id;
client.emit("presence", user, data.status, data.game_id);

} else {
// a name change or avatar change
Expand Down

0 comments on commit d9b9d1d

Please sign in to comment.