mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-22 08:20:36 +01:00
fix: deleted chat messages (#11962)
* fix: deleted chat messages * fix spec
This commit is contained in:
committed by
GitHub
parent
b25793cd41
commit
1a1fd64d9a
@@ -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;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user