Skip to content

Commit

Permalink
fix(viber): save inbox conversationId on viber conversation (#4903)
Browse files Browse the repository at this point in the history
  • Loading branch information
enkhtuvshinD committed Jan 19, 2024
1 parent a69289f commit 67d0a28
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/plugin-viber-api/src/viber/messageListen.ts
Expand Up @@ -68,7 +68,7 @@ const messageListen = async (
}

try {
await sendInboxMessage({
const apiConversationResponse = await sendInboxMessage({
subdomain,
action: 'integrations.receive',
data: {
Expand All @@ -84,6 +84,9 @@ const messageListen = async (
isRPC: true,
defaultValue: null,
});

conversation.erxesApiId = apiConversationResponse._id;
await conversation.save();
} catch (e) {
console.error(e);
}
Expand Down

0 comments on commit 67d0a28

Please sign in to comment.