disable toJSON for read states?
1 files changed, 15 insertions, 15 deletions
diff --git a/src/util/entities/ReadState.ts b/src/util/entities/ReadState.ts
index b4638fdf..4d15c6cc 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<ReadState>;
- 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<ReadState>;
+ // 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;
+ // }
}
|