fix: deleted chat messages (#11962)

* fix: deleted chat messages

* fix spec
This commit is contained in:
Barış Soner Uşaklı
2023-08-28 12:10:42 -04:00
committed by GitHub
parent b25793cd41
commit 1a1fd64d9a
6 changed files with 25 additions and 13 deletions

View File

@@ -52,6 +52,10 @@ module.exports = function (Messaging) {
if (msg) {
msg.messageId = parseInt(mids[idx], 10);
msg.ip = undefined;
msg.isOwner = msg.fromuid === parseInt(uid, 10);
if (msg.deleted && !msg.isOwner) {
msg.content = `<p>[[modules:chat.message-deleted]]</p>`;
}
}
return msg;
})