We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b04d37 commit f676d5dCopy full SHA for f676d5d
1 file changed
projects/stream-chat-angular/src/lib/channel.service.ts
@@ -1186,12 +1186,16 @@ export class ChannelService<
1186
private handleNotification(clientEvent: ClientEvent<T>) {
1187
switch (clientEvent.eventType) {
1188
case 'connection.recovered': {
1189
- void this.recoverState().catch((error) =>
1190
- this.chatClientService.chatClient.logger(
1191
- 'warn',
1192
- `Failed to recover state after connection recovery: ${error}`,
1193
- ),
1194
- );
+ if (this.channelManager) {
+ void this.recoverState().catch((error) =>
+ this.chatClientService.chatClient.logger(
+ 'warn',
+ `Failed to recover state after connection recovery: ${error}`,
+ ),
1195
+ );
1196
+ } else {
1197
+ this.reset();
1198
+ }
1199
break;
1200
}
1201
case 'user.updated': {
0 commit comments