@runnerpro/backend 1.4.11 → 1.4.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.
@@ -183,6 +183,7 @@ const sendMessage = (req, res, { sendNotification, firebaseMessaging, query, isC
183
183
  });
184
184
  }
185
185
  catch (error) {
186
+ // eslint-disable-next-line no-console
186
187
  console.error(error);
187
188
  }
188
189
  }
@@ -248,7 +249,7 @@ const readMessage = (req, res, { query, isClient }) => __awaiter(void 0, void 0,
248
249
  res.send({ status: 'ok' });
249
250
  });
250
251
  const markReadMessage = ({ isClient, query, idCliente }) => __awaiter(void 0, void 0, void 0, function* () {
251
- const conditionSender = isClient ? ' AND [ID SENDER] != ?' : ' AND [ID SENDER] = ?';
252
+ const conditionSender = isClient ? ' AND [ID SENDER] != ?' : ' AND ([ID SENDER] = ? || [ID SENDER] IS NULL)';
252
253
  yield query('UPDATE [CHAT MESSAGE] SET [READ] = TRUE WHERE [ID CLIENTE] = ? AND [READ] = FALSE ' + conditionSender, [idCliente, idCliente]);
253
254
  yield saveResponseTime({ query, isClient, idCliente });
254
255
  });
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../../src/chat/api/conversation.ts"],"names":[],"mappings":"AAWA,QAAA,MAAM,iBAAiB,0BAA2B,GAAG,SAmBpD,CAAC;AA0SF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../../src/chat/api/conversation.ts"],"names":[],"mappings":"AAWA,QAAA,MAAM,iBAAiB,0BAA2B,GAAG,SAmBpD,CAAC;AA2SF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runnerpro/backend",
3
- "version": "1.4.11",
3
+ "version": "1.4.13",
4
4
  "description": "A collection of common backend functions",
5
5
  "exports": {
6
6
  ".": "./lib/cjs/index.js"