From 2e72ed369833a4a98eb6736f9853ad676782abc3 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Mon, 1 Nov 2021 08:40:53 -0700 Subject: [PATCH 1/2] IO-1438 Resolve Texting Issue --- server/sms/receive.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/sms/receive.js b/server/sms/receive.js index d05ae725d..d74668728 100644 --- a/server/sms/receive.js +++ b/server/sms/receive.js @@ -78,15 +78,18 @@ exports.receive = async (req, res) => { }); } try { - const r2 = await client.request(queries.RECEIVE_MESSAGE, { - msg: newMessage, - }); if (response.bodyshops[0].conversations[0]) { const r3 = await client.request(queries.INSERT_MESSAGE, { + msg: newMessage, + id: response.bodyshops[0].conversations[0] && response.bodyshops[0].conversations[0].id, }); + } else { + const r2 = await client.request(queries.RECEIVE_MESSAGE, { + msg: newMessage, + }); } logger.log("sms-inbound-success", "DEBUG", "api", null, { From 042b67c5314ad42532283077e5b6b33f2ac808a3 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Mon, 1 Nov 2021 08:57:30 -0700 Subject: [PATCH 2/2] IO-1438 Resolve issue with texting --- server/sms/receive.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/sms/receive.js b/server/sms/receive.js index d74668728..603da5f4a 100644 --- a/server/sms/receive.js +++ b/server/sms/receive.js @@ -81,8 +81,7 @@ exports.receive = async (req, res) => { if (response.bodyshops[0].conversations[0]) { const r3 = await client.request(queries.INSERT_MESSAGE, { msg: newMessage, - - id: + conversationid: response.bodyshops[0].conversations[0] && response.bodyshops[0].conversations[0].id, });