From 64e916578bc61802822a8ff51430fd8dd2baa5ec Mon Sep 17 00:00:00 2001 From: Ali Momen Sani Date: Wed, 19 Apr 2023 16:05:28 +0200 Subject: [PATCH] feat: receive last_read_message_id from server (#1113) * feat: receive last_read_msg_id from server also populate last_read_message_id * make last_read_msg_id optional to resolve some type test failing * fix: last_read_msg_id was changed on server --- src/channel.ts | 1 + src/channel_state.ts | 2 +- src/types.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/channel.ts b/src/channel.ts index c9bfd6417..52b8aa95e 100644 --- a/src/channel.ts +++ b/src/channel.ts @@ -1495,6 +1495,7 @@ export class Channel = Record< string, - { last_read: Date; unread_messages: number; user: UserResponse } + { last_read: Date; unread_messages: number; user: UserResponse; last_read_message_id?: string } >; /** diff --git a/src/types.ts b/src/types.ts index 455495ee9..2bcf83095 100644 --- a/src/types.ts +++ b/src/types.ts @@ -599,6 +599,7 @@ export type ReactionResponse< export type ReadResponse = { last_read: string; user: UserResponse; + last_read_message_id?: string; unread_messages?: number; };