diff --git a/packages/core.gbapp/services/GBMinService.ts b/packages/core.gbapp/services/GBMinService.ts index df7ee938..43cb1f20 100644 --- a/packages/core.gbapp/services/GBMinService.ts +++ b/packages/core.gbapp/services/GBMinService.ts @@ -1195,13 +1195,13 @@ export class GBMinService { } } else if (context.activity.type === 'message') { - let pid = WhatsappDirectLine.pidByNumber[user.userSystemId]; + let pid = WhatsappDirectLine.pidByNumber[context.activity.from.id]; // Required for F0 handling of persisted conversations. GBLogEx.info( min, - `Human: pid:${pid} ${context.activity.text} (type: ${context.activity.type}, name: ${context.activity.name}, channelId: ${context.activity.channelId})` + `Human: pid:${pid} ${context.activity.from.id} ${GBUtil.toYAML(WhatsappDirectLine.pidByNumber)} ${context.activity.text} (type: ${context.activity.type}, name: ${context.activity.name}, channelId: ${context.activity.channelId})` ); diff --git a/packages/whatsapp.gblib/services/WhatsappDirectLine.ts b/packages/whatsapp.gblib/services/WhatsappDirectLine.ts index 0de2e5e3..ad179d84 100644 --- a/packages/whatsapp.gblib/services/WhatsappDirectLine.ts +++ b/packages/whatsapp.gblib/services/WhatsappDirectLine.ts @@ -536,9 +536,7 @@ export class WhatsappDirectLine extends GBService { let response; if (GBConfigService.get('STORAGE_NAME')) { response = await client.apis.Conversations.Conversations_StartConversation( - { userSystemId: user.userSystemId, - userName: user.userName, - pid: pid} + ); } else { response = await client.apis.Conversations.Conversations_StartConversation(