From 6e8cf67a6f7c20f9e43dd7bfc111f6b494e11c50 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 14 Feb 2019 11:04:50 +0100 Subject: Fix mention notification with a remote account --- server/tests/api/users/user-notifications.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'server/tests/api') diff --git a/server/tests/api/users/user-notifications.ts b/server/tests/api/users/user-notifications.ts index 5260d64cc..72b6a0aa2 100644 --- a/server/tests/api/users/user-notifications.ts +++ b/server/tests/api/users/user-notifications.ts @@ -506,6 +506,20 @@ describe('Test users notifications', function () { await removeAccountFromAccountBlocklist(servers[ 0 ].url, userAccessToken, 'root') }) + it('Should not send a new mention notification if the remote account mention a local account', async function () { + this.timeout(20000) + + const resVideo = await uploadVideo(servers[0].url, servers[0].accessToken, { name: 'super video' }) + const uuid = resVideo.body.video.uuid + + await waitJobs(servers) + const resThread = await addVideoCommentThread(servers[1].url, servers[1].accessToken, uuid, '@user_1 hello') + const threadId = resThread.body.comment.id + + await waitJobs(servers) + await checkCommentMention(baseParams, uuid, threadId, threadId, 'super root 2 name', 'absence') + }) + it('Should send a new mention notification after local comments', async function () { this.timeout(10000) -- cgit v1.2.3