fix: recurriing network issue
All checks were successful
Queue Release Build / prepare (push) Successful in 18s
Deploy Web Apps / deploy (push) Successful in 6m32s
Queue Release Build / build-windows (push) Successful in 26m8s
Queue Release Build / build-linux (push) Successful in 40m18s
Queue Release Build / finalize (push) Successful in 42s
All checks were successful
Queue Release Build / prepare (push) Successful in 18s
Deploy Web Apps / deploy (push) Successful in 6m32s
Queue Release Build / build-windows (push) Successful in 26m8s
Queue Release Build / build-linux (push) Successful in 40m18s
Queue Release Build / finalize (push) Successful in 42s
This commit is contained in:
@@ -498,6 +498,49 @@ export class MessagesEffects {
|
||||
)
|
||||
);
|
||||
|
||||
incomingSignalingMessages$ = createEffect(() =>
|
||||
this.webrtc.onSignalingMessage.pipe(
|
||||
withLatestFrom(
|
||||
this.store.select(selectCurrentUser),
|
||||
this.store.select(selectCurrentRoom)
|
||||
),
|
||||
mergeMap(([
|
||||
event,
|
||||
currentUser,
|
||||
currentRoom
|
||||
]) => {
|
||||
if (event.type !== 'chat_message') {
|
||||
return EMPTY;
|
||||
}
|
||||
|
||||
const ctx: IncomingMessageContext = {
|
||||
db: this.db,
|
||||
webrtc: this.webrtc,
|
||||
attachments: this.attachments,
|
||||
debugging: this.debugging,
|
||||
currentUser: currentUser ?? null,
|
||||
currentRoom
|
||||
};
|
||||
|
||||
return dispatchIncomingMessage({
|
||||
...event,
|
||||
type: 'chat-message',
|
||||
fromPeerId: event.fromUserId
|
||||
}, ctx).pipe(
|
||||
catchError((error) => {
|
||||
reportDebuggingError(this.debugging, 'messages', 'Failed to process incoming signaling chat message', {
|
||||
eventType: event.type,
|
||||
fromPeerId: event.fromUserId ?? null,
|
||||
roomId: event.serverId ?? null
|
||||
}, error);
|
||||
|
||||
return EMPTY;
|
||||
})
|
||||
);
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
private trackBackgroundOperation(task: Promise<unknown> | unknown, message: string, payload: Record<string, unknown>): void {
|
||||
trackDebuggingTaskFailure(task, this.debugging, 'messages', message, payload);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user