diff --git a/projects/stream-chat-angular/src/lib/channel.service.ts b/projects/stream-chat-angular/src/lib/channel.service.ts index 93841453..d493d6b5 100644 --- a/projects/stream-chat-angular/src/lib/channel.service.ts +++ b/projects/stream-chat-angular/src/lib/channel.service.ts @@ -19,7 +19,6 @@ import { Channel, ChannelManager, ChannelManagerEventHandlerOverrides, - ChannelManagerOptions, Event, FormatMessageResponse, MemberFilters, @@ -593,7 +592,6 @@ export class ChannelService< this.customChannelQuery = query; this.createChannelManager({ eventHandlerOverrides, - options: managerOptions, }); return this._init(options); @@ -1867,7 +1865,6 @@ export class ChannelService< this.createChannelManager({ eventHandlerOverrides, - options: managerOptions, }); this.clientEventsSubscription = this.chatClientService.events$.subscribe( @@ -1878,21 +1875,17 @@ export class ChannelService< private createChannelManager({ eventHandlerOverrides, - options, }: { eventHandlerOverrides?: ChannelManagerEventHandlerOverrides; - options?: ChannelManagerOptions; }) { this.channelManager = new ChannelManager({ client: this.chatClientService.chatClient, options: { - ...options, allowNotLoadedChannelPromotionForEvent: { 'message.new': false, 'channel.visible': true, 'notification.added_to_channel': true, 'notification.message_new': true, - ...options?.allowNotLoadedChannelPromotionForEvent, }, }, eventHandlerOverrides, diff --git a/projects/stream-chat-angular/src/lib/types.ts b/projects/stream-chat-angular/src/lib/types.ts index c4d124d9..d8301df8 100644 --- a/projects/stream-chat-angular/src/lib/types.ts +++ b/projects/stream-chat-angular/src/lib/types.ts @@ -5,7 +5,6 @@ import type { Channel, ChannelFilters, ChannelManagerEventHandlerOverrides, - ChannelManagerOptions, ChannelMemberResponse, ChannelOptions, ChannelSort, @@ -551,9 +550,10 @@ export type MessageTextContext = { shouldTranslate: boolean; }; +// TODO: add ChannelManagerOptions once it's stable export type ChannelServiceOptions< T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics, -> = ChannelManagerOptions & { +> = { shouldSetActiveChannel?: boolean; eventHandlerOverrides?: ChannelManagerEventHandlerOverrides; };