Skip to content

Commit aa89148

Browse files
Add session creation for typebot service
1 parent 4c69b05 commit aa89148

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/whatsapp/services/typebot.service.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,20 @@ export class TypebotService {
6969
session.status = status;
7070
}
7171
});
72+
} else {
73+
const session: Session = {
74+
remoteJid: remoteJid,
75+
sessionId: Math.floor(Math.random() * 10000000000).toString(),
76+
status: status,
77+
createdAt: Date.now(),
78+
updateAt: Date.now(),
79+
prefilledVariables: {
80+
remoteJid: remoteJid,
81+
pushName: '',
82+
additionalData: {},
83+
},
84+
};
85+
findData.sessions.push(session);
7286
}
7387

7488
const typebotData = {

0 commit comments

Comments
 (0)