@runnerpro/backend 1.14.15 → 1.14.17
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.
- package/lib/cjs/chat/api/conversation.js +11 -2
- package/lib/cjs/chat/sendMessageChatToClient.js +2 -1
- package/lib/cjs/locale/en.js +3 -0
- package/lib/cjs/locale/es.js +3 -0
- package/lib/cjs/locale/fr.js +3 -0
- package/lib/cjs/locale/it.js +3 -0
- package/lib/cjs/types/chat/api/conversation.d.ts.map +1 -1
- package/lib/cjs/types/chat/sendMessageChatToClient.d.ts.map +1 -1
- package/lib/cjs/types/locale/en.d.ts +3 -0
- package/lib/cjs/types/locale/en.d.ts.map +1 -1
- package/lib/cjs/types/locale/es.d.ts +3 -0
- package/lib/cjs/types/locale/es.d.ts.map +1 -1
- package/lib/cjs/types/locale/fr.d.ts +3 -0
- package/lib/cjs/types/locale/fr.d.ts.map +1 -1
- package/lib/cjs/types/locale/it.d.ts +3 -0
- package/lib/cjs/types/locale/it.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -245,7 +245,7 @@ const sendMessage = (req, res, { sendNotification, firebaseMessaging, isClient }
|
|
|
245
245
|
// Cambiar el tono del texto a uno neutro y corregir la ortografía
|
|
246
246
|
cambiarTonoEntrenadorNeutro(text),
|
|
247
247
|
// Si es entrenador, se marca leído cuando se envía un mensaje
|
|
248
|
-
|
|
248
|
+
markReadMessage({ idCliente, isClient }),
|
|
249
249
|
]);
|
|
250
250
|
}
|
|
251
251
|
// Devuelve el texto en el otro idioma si el cliente no habla español y el idioma del cliente
|
|
@@ -265,6 +265,7 @@ const sendMessage = (req, res, { sendNotification, firebaseMessaging, isClient }
|
|
|
265
265
|
sendNotification({
|
|
266
266
|
firebaseMessaging,
|
|
267
267
|
idCliente,
|
|
268
|
+
title: '💬 Nuevo mensaje de tu entrenador',
|
|
268
269
|
body: `Rubén: ${textPreferredLanguage || textSpanish}`,
|
|
269
270
|
screen: common_1.NOTIFICATION_SCREEN_TYPES.CHAT,
|
|
270
271
|
});
|
|
@@ -368,11 +369,19 @@ const sendFile = (req, res, { sendNotification, firebaseMessaging, isClient, buc
|
|
|
368
369
|
}
|
|
369
370
|
fs_1.default.unlinkSync(filePath);
|
|
370
371
|
if (!isClient) {
|
|
372
|
+
let textFile = 'Archivo adjunto';
|
|
373
|
+
if (Number(type) === 4)
|
|
374
|
+
textFile = 'Audio';
|
|
375
|
+
if (req.file.mimetype.includes('video'))
|
|
376
|
+
textFile = 'Vídeo';
|
|
377
|
+
if (req.file.mimetype.includes('image'))
|
|
378
|
+
textFile = 'Imagen';
|
|
371
379
|
const [cliente] = yield (0, index_1.query)('SELECT [PREFERRED LANGUAGE] FROM [CLIENTE] WHERE [ID] = ?', [idCliente]);
|
|
372
380
|
sendNotification({
|
|
373
381
|
firebaseMessaging,
|
|
374
382
|
idCliente,
|
|
375
|
-
|
|
383
|
+
title: (0, index_2.t)('💬 Nuevo mensaje de tu entrenador', cliente.preferredLanguage),
|
|
384
|
+
body: `Rubén: ${(0, index_2.t)(textFile, cliente.preferredLanguage)}`,
|
|
376
385
|
screen: common_1.NOTIFICATION_SCREEN_TYPES.CHAT,
|
|
377
386
|
});
|
|
378
387
|
}
|
|
@@ -44,7 +44,8 @@ const sendMessageChatToClient = (idCliente, text, textPreferredLanguage, preferr
|
|
|
44
44
|
yield (0, index_2.sendNotification)({
|
|
45
45
|
firebaseMessaging: (0, messaging_1.getMessaging)(),
|
|
46
46
|
idCliente,
|
|
47
|
-
|
|
47
|
+
title: '💬 Nuevo mensaje de tu entrenador',
|
|
48
|
+
body: `Rubén: ${textPreferredLanguage || text}`,
|
|
48
49
|
screen: common_1.NOTIFICATION_SCREEN_TYPES.CHAT,
|
|
49
50
|
});
|
|
50
51
|
}
|
package/lib/cjs/locale/en.js
CHANGED
package/lib/cjs/locale/es.js
CHANGED
package/lib/cjs/locale/fr.js
CHANGED
package/lib/cjs/locale/it.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../../src/chat/api/conversation.ts"],"names":[],"mappings":"AAkBA,QAAA,MAAM,iBAAiB,0BAA2B,GAAG,SA0BpD,CAAC;
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../../src/chat/api/conversation.ts"],"names":[],"mappings":"AAkBA,QAAA,MAAM,iBAAiB,0BAA2B,GAAG,SA0BpD,CAAC;AAqgBF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendMessageChatToClient.d.ts","sourceRoot":"","sources":["../../../../src/chat/sendMessageChatToClient.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"sendMessageChatToClient.d.ts","sourceRoot":"","sources":["../../../../src/chat/sendMessageChatToClient.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,uBAAuB,gHA0C5B,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../src/locale/en.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../src/locale/en.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,EAAE;;;;;;CAMP,CAAC;AAEF,OAAO,EAAE,EAAE,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../../../src/locale/es.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../../../src/locale/es.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,EAAE;;;;;;CAMP,CAAC;AAEF,OAAO,EAAE,EAAE,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../../../src/locale/fr.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../../../src/locale/fr.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,EAAE;;;;;;CAMP,CAAC;AAEF,OAAO,EAAE,EAAE,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"it.d.ts","sourceRoot":"","sources":["../../../../src/locale/it.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"it.d.ts","sourceRoot":"","sources":["../../../../src/locale/it.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,EAAE;;;;;;CAMP,CAAC;AAEF,OAAO,EAAE,EAAE,EAAE,CAAC"}
|