mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +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
@@ -659,6 +659,13 @@ describe('Messaging Library', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should not show deleted message to other users', async () => {
|
||||
const { body } = await callv3API('get', `/chats/${roomId}/messages/${mid}`, {}, 'herp');
|
||||
const message = body.response;
|
||||
assert.strictEqual(message.deleted, 1);
|
||||
assert.strictEqual(message.content, '<p>[[modules:chat.message-deleted]]</p>');
|
||||
});
|
||||
|
||||
it('should error out if a message is deleted again', async () => {
|
||||
const { statusCode, body } = await callv3API('delete', `/chats/${roomId}/messages/${mid}`, {}, 'foo');
|
||||
assert.strictEqual(statusCode, 400);
|
||||
|
||||
Reference in New Issue
Block a user