refactor: clean up relationship fix

This commit is contained in:
Paul Makles
2024-07-27 15:18:07 +02:00
parent f131e8214a
commit cd9e84a337
2 changed files with 2 additions and 6 deletions
+1 -5
View File
@@ -671,13 +671,9 @@ export class WebSocketClient {
}
case "UserRelationship": {
packet.status = packet.user.relationship!;
const user = this.client.users.get(packet.user._id);
if (user) {
user.update({
...packet.user,
relationship: packet.status,
});
user.update(packet.user);
} else {
this.client.users.createObj(packet.user);
}
+1 -1
View File
@@ -127,7 +127,7 @@ export type ClientboundNotification =
data: Partial<User>;
clear?: FieldsUser[];
}
| { type: "UserRelationship"; user: User; status: RelationshipStatus }
| { type: "UserRelationship"; user: User }
| { type: "UserPresence"; id: string; online: boolean }
| {
type: "UserSettingsUpdate";