diff options
author | Chocobozzz <me@florianbigard.com> | 2020-05-22 17:06:26 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-05-29 09:32:20 +0200 |
commit | 696d83fd1377486dd03cc1bd02a21d9b6ddd9fcd (patch) | |
tree | e1b88451c4357add80721f530993e2b48d197feb /server/tests/api/videos | |
parent | 72c33e716fecd1826dcf645957f8669821f91ff3 (diff) | |
download | PeerTube-696d83fd1377486dd03cc1bd02a21d9b6ddd9fcd.tar.gz PeerTube-696d83fd1377486dd03cc1bd02a21d9b6ddd9fcd.tar.zst PeerTube-696d83fd1377486dd03cc1bd02a21d9b6ddd9fcd.zip |
Block comments from muted accounts/servers
Add better control for users of comments displayed on their videos:
* Do not forward comments from muted remote accounts/servers (muted by the current server or by the video owner)
* Do not list threads and hide replies (with their children) of accounts/servers muted by the video owner
* Hide from RSS comments of muted accounts/servers by video owners
Use case:
* Try to limit spam propagation in the federation
* Add ability for users to automatically hide comments on their videos from undesirable accounts/servers (the comment section belongs to videomakers, so they choose what's posted there)
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r-- | server/tests/api/videos/multiple-servers.ts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index e3029f1ae..d7b04373f 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts | |||
@@ -37,7 +37,8 @@ import { | |||
37 | addVideoCommentThread, | 37 | addVideoCommentThread, |
38 | deleteVideoComment, | 38 | deleteVideoComment, |
39 | getVideoCommentThreads, | 39 | getVideoCommentThreads, |
40 | getVideoThreadComments | 40 | getVideoThreadComments, |
41 | findCommentId | ||
41 | } from '../../../../shared/extra-utils/videos/video-comments' | 42 | } from '../../../../shared/extra-utils/videos/video-comments' |
42 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' | 43 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
43 | 44 | ||
@@ -773,8 +774,7 @@ describe('Test multiple servers', function () { | |||
773 | await waitJobs(servers) | 774 | await waitJobs(servers) |
774 | 775 | ||
775 | { | 776 | { |
776 | const res = await getVideoCommentThreads(servers[1].url, videoUUID, 0, 5) | 777 | const threadId = await findCommentId(servers[1].url, videoUUID, 'my super first comment') |
777 | const threadId = res.body.data.find(c => c.text === 'my super first comment').id | ||
778 | 778 | ||
779 | const text = 'my super answer to thread 1' | 779 | const text = 'my super answer to thread 1' |
780 | await addVideoCommentReply(servers[1].url, servers[1].accessToken, videoUUID, threadId, text) | 780 | await addVideoCommentReply(servers[1].url, servers[1].accessToken, videoUUID, threadId, text) |
@@ -783,8 +783,7 @@ describe('Test multiple servers', function () { | |||
783 | await waitJobs(servers) | 783 | await waitJobs(servers) |
784 | 784 | ||
785 | { | 785 | { |
786 | const res1 = await getVideoCommentThreads(servers[2].url, videoUUID, 0, 5) | 786 | const threadId = await findCommentId(servers[2].url, videoUUID, 'my super first comment') |
787 | const threadId = res1.body.data.find(c => c.text === 'my super first comment').id | ||
788 | 787 | ||
789 | const res2 = await getVideoThreadComments(servers[2].url, videoUUID, threadId) | 788 | const res2 = await getVideoThreadComments(servers[2].url, videoUUID, threadId) |
790 | const childCommentId = res2.body.children[0].comment.id | 789 | const childCommentId = res2.body.children[0].comment.id |