@runnerpro/backend 1.14.3 → 1.14.5
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.
|
@@ -50,14 +50,14 @@ const conversationRoute = (_a) => {
|
|
|
50
50
|
},
|
|
51
51
|
});
|
|
52
52
|
router.get('/conversation', (req, res, next) => getConversation(req, res, params).catch((error) => (0, index_1.err)(req, res, error, next)));
|
|
53
|
+
router.post('/conversation/send-emoji', (req, res, next) => sendEmoji(req, res, params).catch((error) => (0, index_1.err)(req, res, error, next)));
|
|
54
|
+
router.delete('/conversation/emoji/:id', (req, res, next) => deleteEmoji(req, res).catch((error) => (0, index_1.err)(req, res, error, next)));
|
|
53
55
|
router.delete('/conversation/:id', (req, res, next) => deleteConversationMessage(req, res, params).catch((error) => (0, index_1.err)(req, res, error, next)));
|
|
54
56
|
router.put('/conversation/:id', (req, res, next) => editConversationMessage(req, res, params).catch((error) => (0, index_1.err)(req, res, error, next)));
|
|
55
57
|
router.get('/conversation/image/:id', (req, res, next) => getConversationImage(req, res, params).catch((error) => (0, index_1.err)(req, res, error, next)));
|
|
56
58
|
router.get('/conversation/thumbnail/:id', (req, res, next) => getConversationThumbnail(req, res, params).catch((error) => (0, index_1.err)(req, res, error, next)));
|
|
57
59
|
router.get('/conversation/file/:id', (req, res, next) => getConversationFile(req, res, params).catch((error) => (0, index_1.err)(req, res, error, next)));
|
|
58
60
|
router.post('/conversation/send', (req, res, next) => sendMessage(req, res, params).catch((error) => (0, index_1.err)(req, res, error, next)));
|
|
59
|
-
router.post('/conversation/send-emoji', (req, res, next) => sendEmoji(req, res, params).catch((error) => (0, index_1.err)(req, res, error, next)));
|
|
60
|
-
router.delete('/conversation/emoji/:id', (req, res, next) => deleteEmoji(req, res).catch((error) => (0, index_1.err)(req, res, error, next)));
|
|
61
61
|
router.post('/conversation/send-file', uploadFile.single('file'), (req, res, next) => sendFile(req, res, params).catch((error) => (0, index_1.err)(req, res, error, next)));
|
|
62
62
|
router.post('/conversation/read', (req, res, next) => readMessage(req, res, params).catch((error) => (0, index_1.err)(req, res, error, next)));
|
|
63
63
|
};
|
|
@@ -106,7 +106,9 @@ const getConversation = (req, res, { isClient }) => __awaiter(void 0, void 0, vo
|
|
|
106
106
|
yield markReadMessage({ isClient, idCliente });
|
|
107
107
|
});
|
|
108
108
|
const fillReacciones = (message, reacciones) => {
|
|
109
|
-
message.reacciones = reacciones
|
|
109
|
+
message.reacciones = reacciones
|
|
110
|
+
.filter((r) => Number(r.idChat) === Number(message.id))
|
|
111
|
+
.map((r) => (Object.assign(Object.assign({}, r), { isClient: r.idSender === message.idCliente })));
|
|
110
112
|
};
|
|
111
113
|
const deleteConversationMessage = (req, res, { isClient }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
112
114
|
const { id } = req.params;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../../src/chat/api/conversation.ts"],"names":[],"mappings":"AAkBA,QAAA,MAAM,iBAAiB,0BAA2B,GAAG,
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../../src/chat/api/conversation.ts"],"names":[],"mappings":"AAkBA,QAAA,MAAM,iBAAiB,0BAA2B,GAAG,SA0BpD,CAAC;AAofF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|