Skip to content

Commit fcb5d3b

Browse files
committed
fix: don't expose ChannelManagerOptions to integrators
1 parent 70bffdf commit fcb5d3b

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

projects/stream-chat-angular/src/lib/channel.service.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import {
1919
Channel,
2020
ChannelManager,
2121
ChannelManagerEventHandlerOverrides,
22-
ChannelManagerOptions,
2322
Event,
2423
FormatMessageResponse,
2524
MemberFilters,
@@ -593,7 +592,6 @@ export class ChannelService<
593592
this.customChannelQuery = query;
594593
this.createChannelManager({
595594
eventHandlerOverrides,
596-
options: managerOptions,
597595
});
598596

599597
return this._init(options);
@@ -1867,7 +1865,6 @@ export class ChannelService<
18671865

18681866
this.createChannelManager({
18691867
eventHandlerOverrides,
1870-
options: managerOptions,
18711868
});
18721869

18731870
this.clientEventsSubscription = this.chatClientService.events$.subscribe(
@@ -1878,21 +1875,17 @@ export class ChannelService<
18781875

18791876
private createChannelManager({
18801877
eventHandlerOverrides,
1881-
options,
18821878
}: {
18831879
eventHandlerOverrides?: ChannelManagerEventHandlerOverrides<T>;
1884-
options?: ChannelManagerOptions;
18851880
}) {
18861881
this.channelManager = new ChannelManager({
18871882
client: this.chatClientService.chatClient,
18881883
options: {
1889-
...options,
18901884
allowNotLoadedChannelPromotionForEvent: {
18911885
'message.new': false,
18921886
'channel.visible': true,
18931887
'notification.added_to_channel': true,
18941888
'notification.message_new': true,
1895-
...options?.allowNotLoadedChannelPromotionForEvent,
18961889
},
18971890
},
18981891
eventHandlerOverrides,

projects/stream-chat-angular/src/lib/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import type {
55
Channel,
66
ChannelFilters,
77
ChannelManagerEventHandlerOverrides,
8-
ChannelManagerOptions,
98
ChannelMemberResponse,
109
ChannelOptions,
1110
ChannelSort,
@@ -551,9 +550,10 @@ export type MessageTextContext = {
551550
shouldTranslate: boolean;
552551
};
553552

553+
// TODO: add ChannelManagerOptions once it's stable
554554
export type ChannelServiceOptions<
555555
T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
556-
> = ChannelManagerOptions & {
556+
> = {
557557
shouldSetActiveChannel?: boolean;
558558
eventHandlerOverrides?: ChannelManagerEventHandlerOverrides<T>;
559559
};

0 commit comments

Comments
 (0)