perf(Presence): prefer boolean client status comparison before activity checks
#10213 backport
This commit is contained in:
@@ -161,11 +161,11 @@ class Presence extends Base {
|
|||||||
this === presence ||
|
this === presence ||
|
||||||
(presence &&
|
(presence &&
|
||||||
this.status === presence.status &&
|
this.status === presence.status &&
|
||||||
this.activities.length === presence.activities.length &&
|
|
||||||
this.activities.every((activity, index) => activity.equals(presence.activities[index])) &&
|
|
||||||
this.clientStatus?.web === presence.clientStatus?.web &&
|
this.clientStatus?.web === presence.clientStatus?.web &&
|
||||||
this.clientStatus?.mobile === presence.clientStatus?.mobile &&
|
this.clientStatus?.mobile === presence.clientStatus?.mobile &&
|
||||||
this.clientStatus?.desktop === presence.clientStatus?.desktop)
|
this.clientStatus?.desktop === presence.clientStatus?.desktop &&
|
||||||
|
this.activities.length === presence.activities.length &&
|
||||||
|
this.activities.every((activity, index) => activity.equals(presence.activities[index])))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user