From 56ee829757409d6ff81ad2826e44ff064e535ddf Mon Sep 17 00:00:00 2001 From: Rajeh Taher Date: Sun, 18 Jan 2026 01:35:42 +0200 Subject: [PATCH] process-message: remove timeout before event emit --- src/Utils/process-message.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Utils/process-message.ts b/src/Utils/process-message.ts index 8cad9245..975bee05 100644 --- a/src/Utils/process-message.ts +++ b/src/Utils/process-message.ts @@ -349,13 +349,11 @@ const processMessage = async ( const webMessageInfo = proto.WebMessageInfo.decode(retryResponse.webMessageInfoBytes!) // wait till another upsert event is available, don't want it to be part of the PDO response message // TODO: parse through proper message handling utilities (to add relevant key fields) - setTimeout(() => { - ev.emit('messages.upsert', { - messages: [webMessageInfo as WAMessage], - type: 'notify', - requestId: response.stanzaId! - }) - }, 500) + ev.emit('messages.upsert', { + messages: [webMessageInfo as WAMessage], + type: 'notify', + requestId: response.stanzaId! + }) } } }