summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-02-25 09:54:10 +0100
committerRory& <root@rory.gay>2026-02-25 09:54:10 +0100
commit1d0e9c3501f6c8a90873b59abda7453787d184e8 (patch)
tree22d00274f39acec606f59af7bb9bc6e871675900 /src
parentUApi work, nix test vm cleanup (diff)
downloadserver-ts-1d0e9c3501f6c8a90873b59abda7453787d184e8.tar.xz
disable toJSON for read states?
Diffstat (limited to 'src')
-rw-r--r--src/util/entities/ReadState.ts30
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; + // } }