@runnerpro/backend 1.17.11 → 1.17.13
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.
|
@@ -80,9 +80,9 @@ const getConversation = (req, res, { isClient }) => __awaiter(void 0, void 0, vo
|
|
|
80
80
|
WHERE "CHAT MESSAGE"."ID CLIENTE" = ? AND (${isClient} = FALSE OR "CHAT MESSAGE"."SHOW CLIENT" = TRUE)
|
|
81
81
|
ORDER BY "CHAT MESSAGE"."DATE" DESC
|
|
82
82
|
LIMIT 100`, [idCliente]);
|
|
83
|
-
const reacciones = yield (0, index_1.query)('SELECT [ID], [EMOJI], [ID CHAT], [ID SENDER] FROM [CHAT MESSAGE REACCION] WHERE [ID CHAT] IN (?)', [
|
|
83
|
+
const reacciones = messages.length > 0 ? yield (0, index_1.query)('SELECT [ID], [EMOJI], [ID CHAT], [ID SENDER] FROM [CHAT MESSAGE REACCION] WHERE [ID CHAT] IN (?)', [
|
|
84
84
|
messages.map((m) => m.id),
|
|
85
|
-
]);
|
|
85
|
+
]) : [];
|
|
86
86
|
messages = messages.reverse();
|
|
87
87
|
// Si el cliente no habla español, se muestran los mensajes en el idioma del cliente. El entrenador siempre ve los mensajes en español que están en la columna [TEXT]
|
|
88
88
|
if (header.preferredLanguage !== common_1.LANGUAGES.ES && isClient) {
|