From 1d0e9c3501f6c8a90873b59abda7453787d184e8 Mon Sep 17 00:00:00 2001 From: Rory& Date: Wed, 25 Feb 2026 09:54:10 +0100 Subject: [PATCH] disable toJSON for read states? --- src/util/entities/ReadState.ts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/util/entities/ReadState.ts b/src/util/entities/ReadState.ts index b4638fdf5..4d15c6cc8 100644 --- a/src/util/entities/ReadState.ts +++ b/src/util/entities/ReadState.ts @@ -75,19 +75,19 @@ export class ReadState extends BaseClass { @Column({ default: 0 }) flags: ReadStateFlags; - toJSON() { - const res = { ...this } as Partial; - if (this.read_state_type === ReadStateType.CHANNEL) { - delete res.badge_count; - delete res.last_acked_id; - } else { - delete res.mention_count; // mutually exclusive with badge_count - delete res.last_message_id; // mutually exclusive with last_acked_id - // these only apply to channels: - delete res.last_pin_timestamp; - delete res.flags; - // delete res.last_viewed; // TODO - } - return res; - } + // toJSON() { + // const res = { ...this } as Partial; + // if (this.read_state_type === ReadStateType.CHANNEL) { + // delete res.badge_count; + // delete res.last_acked_id; + // } else { + // delete res.mention_count; // mutually exclusive with badge_count + // delete res.last_message_id; // mutually exclusive with last_acked_id + // // these only apply to channels: + // delete res.last_pin_timestamp; + // delete res.flags; + // // delete res.last_viewed; // TODO + // } + // return res; + // } }