From a4ae477e062c217dcfcfecae7961611e0b18a7ec Mon Sep 17 00:00:00 2001 From: kanat Date: Thu, 25 Apr 2024 23:39:27 -0400 Subject: [PATCH 1/4] (real-time-indicators) support privacy settings --- src/types.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/types.ts b/src/types.ts index 2db5673b7..205f75c5e 100644 --- a/src/types.ts +++ b/src/types.ts @@ -701,6 +701,7 @@ export type OwnUserBase Date: Fri, 26 Apr 2024 11:59:59 -0400 Subject: [PATCH 2/4] (real-time-indicators) add missing privacy_settings prop --- src/utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils.ts b/src/utils.ts index 9d20e49e6..ebd1dab53 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -86,6 +86,7 @@ export function isOwnUserBaseProperty(property: string) { unread_count: true, unread_threads: true, invisible: true, + privacy_settings: true, roles: true, }; From f3b5581536c2cddb0a41357ffbc267cb726caa79 Mon Sep 17 00:00:00 2001 From: kanat Date: Tue, 30 Apr 2024 10:06:41 -0400 Subject: [PATCH 3/4] do not send typing if indicators are disabled --- src/channel.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/channel.ts b/src/channel.ts index f1370de81..58488caa4 100644 --- a/src/channel.ts +++ b/src/channel.ts @@ -659,6 +659,9 @@ export class Channel); } + _isTypingIndicatorsEnabled(): boolean { + return this.getClient().user?.privacy_settings?.typing_indicators?.enabled ?? true; + } + /** * lastMessage - return the last message, takes into account that last few messages might not be perfectly sorted * From 7782047d055256f5be871ffc82211679ec30f9a4 Mon Sep 17 00:00:00 2001 From: kanat Date: Tue, 30 Apr 2024 10:21:18 -0400 Subject: [PATCH 4/4] address PR comments --- src/channel.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/channel.ts b/src/channel.ts index 58488caa4..5ffb0bcb9 100644 --- a/src/channel.ts +++ b/src/channel.ts @@ -656,9 +656,6 @@ export class Channel