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