|
@@ -205,7 +205,10 @@ const seenChat = async (req, res, next) => {
|
|
seen: total,
|
|
seen: total,
|
|
watched: false,
|
|
watched: false,
|
|
});
|
|
});
|
|
- await ChatModel.update(isCompanionChat._id, id, { watched: true });
|
|
|
|
|
|
+ await ChatModel.update(isCompanionChat._id, id, {
|
|
|
|
+ watched: true,
|
|
|
|
+ seenCompanion: total,
|
|
|
|
+ });
|
|
return res.status(200).json({
|
|
return res.status(200).json({
|
|
status: 'success',
|
|
status: 'success',
|
|
code: 200,
|
|
code: 200,
|