|
@@ -74,6 +74,7 @@ const editMessage = async (req, res, next) => {
|
|
|
{
|
|
|
message: userMessage.fullType === null ? message : userMessage.message,
|
|
|
caption,
|
|
|
+ edited: true,
|
|
|
}
|
|
|
);
|
|
|
|
|
@@ -88,6 +89,7 @@ const editMessage = async (req, res, next) => {
|
|
|
replyMessage:
|
|
|
userMessage.fullType === null ? message : userMessage.replyMessage,
|
|
|
replyCaption: caption,
|
|
|
+ edited: true,
|
|
|
}
|
|
|
);
|
|
|
const isChat = await ChatModel.getByField(userMessage.companionId, userId);
|
|
@@ -202,17 +204,12 @@ const removeMessage = async (req, res, next) => {
|
|
|
oldId: userMessage._id,
|
|
|
},
|
|
|
{
|
|
|
+ deleted: true,
|
|
|
replyMessage: null,
|
|
|
- replyName: null,
|
|
|
- replyLastName: null,
|
|
|
replyCaption: null,
|
|
|
forwardMessage: null,
|
|
|
- forwardMessage: null,
|
|
|
- forwardName: null,
|
|
|
- forwardLastName: null,
|
|
|
forwardCaption: null,
|
|
|
fullType: null,
|
|
|
- companionIdForwardToAndFrom: null,
|
|
|
oldId: null,
|
|
|
}
|
|
|
);
|
|
@@ -226,17 +223,12 @@ const removeMessage = async (req, res, next) => {
|
|
|
oldId: companionMessage._id,
|
|
|
},
|
|
|
{
|
|
|
+ deleted: true,
|
|
|
replyMessage: null,
|
|
|
- replyName: null,
|
|
|
- replyLastName: null,
|
|
|
replyCaption: null,
|
|
|
forwardMessage: null,
|
|
|
- forwardMessage: null,
|
|
|
- forwardName: null,
|
|
|
- forwardLastName: null,
|
|
|
forwardCaption: null,
|
|
|
fullType: null,
|
|
|
- companionIdForwardToAndFrom: null,
|
|
|
oldId: null,
|
|
|
}
|
|
|
);
|
|
@@ -312,17 +304,12 @@ const removeSelected = async (req, res, next) => {
|
|
|
oldId: userMessage._id,
|
|
|
},
|
|
|
{
|
|
|
+ deleted: true,
|
|
|
replyMessage: null,
|
|
|
- replyName: null,
|
|
|
- replyLastName: null,
|
|
|
replyCaption: null,
|
|
|
forwardMessage: null,
|
|
|
- forwardMessage: null,
|
|
|
- forwardName: null,
|
|
|
- forwardLastName: null,
|
|
|
forwardCaption: null,
|
|
|
fullType: null,
|
|
|
- companionIdForwardToAndFrom: null,
|
|
|
oldId: null,
|
|
|
}
|
|
|
);
|
|
@@ -336,17 +323,12 @@ const removeSelected = async (req, res, next) => {
|
|
|
oldId: companionMessage._id,
|
|
|
},
|
|
|
{
|
|
|
+ deleted: true,
|
|
|
replyMessage: null,
|
|
|
- replyName: null,
|
|
|
- replyLastName: null,
|
|
|
replyCaption: null,
|
|
|
forwardMessage: null,
|
|
|
- forwardMessage: null,
|
|
|
- forwardName: null,
|
|
|
- forwardLastName: null,
|
|
|
forwardCaption: null,
|
|
|
fullType: null,
|
|
|
- companionIdForwardToAndFrom: null,
|
|
|
oldId: null,
|
|
|
}
|
|
|
);
|