|
|
|
@ -116,7 +116,7 @@ const setupConnectionHandler = () => {
|
|
|
|
|
getUserLogger(connectionData.phone).info({ msg: `连接https://web.whatsapp.com/`, connectionData });
|
|
|
|
|
// find Or create
|
|
|
|
|
await addCurrentConnection({
|
|
|
|
|
...objectMapper(connectionData, { phone: [{ key: 'wa_id' }, { key: 'sesson_id' }], channelId: 'channel_id', createTimestamp: 'createtime', version: 'version' }, false),
|
|
|
|
|
...objectMapper(connectionData, { phone: [{ key: 'wa_id' }], channelId: 'channel_id', createTimestamp: 'createtime', version: 'version' }, false),
|
|
|
|
|
service_type: 'baileys',
|
|
|
|
|
status: 'connecting',
|
|
|
|
|
});
|
|
|
|
@ -130,7 +130,7 @@ const setupConnectionHandler = () => {
|
|
|
|
|
getUserLogger(connectionData.whatsAppNo).info({ msg: `已登录`, connectionData });
|
|
|
|
|
await updateConnection(
|
|
|
|
|
{
|
|
|
|
|
...objectMapper(connectionData, { whatsAppNo: [{ key: 'wa_id' }, { key: 'sesson_id' }], channelId: 'channel_id' }),
|
|
|
|
|
...objectMapper(connectionData, { whatsAppNo: [{ key: 'wa_id' }], channelId: 'channel_id' }),
|
|
|
|
|
service_type: 'baileys',
|
|
|
|
|
closetime: null,
|
|
|
|
|
},
|
|
|
|
@ -148,7 +148,7 @@ const setupConnectionHandler = () => {
|
|
|
|
|
sessionStore.removeSession(connectionData.channelId);
|
|
|
|
|
await updateConnection(
|
|
|
|
|
{
|
|
|
|
|
...objectMapper(connectionData, { whatsAppNo: [{ key: 'wa_id' }, { key: 'sesson_id' }], channelId: 'channel_id' }),
|
|
|
|
|
...objectMapper(connectionData, { whatsAppNo: [{ key: 'wa_id' }], channelId: 'channel_id' }),
|
|
|
|
|
service_type: 'baileys',
|
|
|
|
|
},
|
|
|
|
|
{ connect_domain: domain, connect_name: domainName },
|
|
|
|
|