diff --git a/projects/stream-chat-angular/src/lib/channel.service.spec.ts b/projects/stream-chat-angular/src/lib/channel.service.spec.ts index e05215bd..dc29b410 100644 --- a/projects/stream-chat-angular/src/lib/channel.service.spec.ts +++ b/projects/stream-chat-angular/src/lib/channel.service.spec.ts @@ -752,7 +752,7 @@ describe('ChannelService', () => { const channels = spy.calls.mostRecent().args[0] as Channel[]; expect(channels.find((c) => c.cid === channel.cid)).toBeUndefined(); - expect(channel.stopWatching).toHaveBeenCalledWith(); + expect(channel.stopWatching).not.toHaveBeenCalledWith(); }); it('should call #customChannelDeletedHandler, if channel is deleted and handler is provided', async () => { diff --git a/projects/stream-chat-angular/src/lib/channel.service.ts b/projects/stream-chat-angular/src/lib/channel.service.ts index 2d665b4c..39e378b5 100644 --- a/projects/stream-chat-angular/src/lib/channel.service.ts +++ b/projects/stream-chat-angular/src/lib/channel.service.ts @@ -1640,7 +1640,7 @@ export class ChannelService< } private handleChannelDeleted(event: Event) { - this.removeChannelsFromChannelList([event.channel!.cid], true); + this.removeChannelsFromChannelList([event.channel!.cid], false); } private handleChannelVisible(event: Event, channel: Channel) {