diff --git a/packages/restapi/src/lib/pushstream/DataModifier.ts b/packages/restapi/src/lib/pushstream/DataModifier.ts index b835ea278..57cf9b387 100644 --- a/packages/restapi/src/lib/pushstream/DataModifier.ts +++ b/packages/restapi/src/lib/pushstream/DataModifier.ts @@ -203,6 +203,11 @@ export class DataModifier { includeRaw = false, eventType: MessageEventType ): MessageEvent { + + if (data.hasIntent === false && eventType === 'message') { + eventType = MessageEventType.Request; + } + const messageEvent: MessageEvent = { event: eventType, origin: data.messageOrigin, @@ -426,7 +431,7 @@ export class DataModifier { const { senderAddress, signalData, status, chatId }: VideoDataType = JSON.parse(data.payload.data.additionalMeta?.data); - // To maintain backward compatibility, if the rules object is not present in the payload, + // To maintain backward compatibility, if the rules object is not present in the payload, // we create a new rules object with chatId from additionalMeta.data const rules = data.payload.rules ?? { access: {