@runnerpro/backend 1.4.13 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -151,7 +151,7 @@ const getConversationSuggestion = (req, res) => __awaiter(void 0, void 0, void 0
|
|
|
151
151
|
}
|
|
152
152
|
});
|
|
153
153
|
const sendMessage = (req, res, { sendNotification, firebaseMessaging, query, isClient }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
154
|
-
const { text } = req.body;
|
|
154
|
+
const { text, replyMessageId } = req.body;
|
|
155
155
|
const { userid } = req.session;
|
|
156
156
|
const idCliente = isClient ? req.session.userid : req.body.idCliente;
|
|
157
157
|
// Si es entrenador, se marca leído cuando se envía un mensaje
|
|
@@ -164,7 +164,7 @@ const sendMessage = (req, res, { sendNotification, firebaseMessaging, query, isC
|
|
|
164
164
|
isClient,
|
|
165
165
|
query,
|
|
166
166
|
});
|
|
167
|
-
yield query('INSERT INTO [CHAT MESSAGE] ([ID CLIENTE], [ID SENDER], [TEXT], [TEXT PREFERRED LANGUAGE], [PREFERRED LANGUAGE], [TYPE]) VALUES (?, ?, ?, ?, ?,
|
|
167
|
+
yield query('INSERT INTO [CHAT MESSAGE] ([ID CLIENTE], [ID SENDER], [TEXT], [TEXT PREFERRED LANGUAGE], [PREFERRED LANGUAGE], [REPLY MESSAGE ID], [TYPE]) VALUES (?, ?, ?, ?, ?, ?, ?)', [isClient ? userid : idCliente, userid, textSpanish, textPreferredLanguage, preferredLanguage, replyMessageId, 1]);
|
|
168
168
|
if (!isClient) {
|
|
169
169
|
sendNotification({
|
|
170
170
|
firebaseMessaging,
|