Skip to content

Commit

Permalink
fix: request socket bug fix (#1037)
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammeds1992 authored Jan 18, 2024
1 parent ee392ef commit a28452b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/restapi/src/lib/pushstream/DataModifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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: {
Expand Down

0 comments on commit a28452b

Please sign in to comment.