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 /shared/extra-utils/videos/videos.ts | |
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 'shared/extra-utils/videos/videos.ts')
-rw-r--r-- | shared/extra-utils/videos/videos.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/shared/extra-utils/videos/videos.ts b/shared/extra-utils/videos/videos.ts index 0d36a38a2..99e591cb2 100644 --- a/shared/extra-utils/videos/videos.ts +++ b/shared/extra-utils/videos/videos.ts | |||
@@ -95,6 +95,12 @@ function getVideo (url: string, id: number | string, expectedStatus = 200) { | |||
95 | .expect(expectedStatus) | 95 | .expect(expectedStatus) |
96 | } | 96 | } |
97 | 97 | ||
98 | async function getVideoIdFromUUID (url: string, uuid: string) { | ||
99 | const res = await getVideo(url, uuid) | ||
100 | |||
101 | return res.body.id | ||
102 | } | ||
103 | |||
98 | function getVideoFileMetadataUrl (url: string) { | 104 | function getVideoFileMetadataUrl (url: string) { |
99 | return request(url) | 105 | return request(url) |
100 | .get('/') | 106 | .get('/') |
@@ -669,5 +675,6 @@ export { | |||
669 | checkVideoFilesWereRemoved, | 675 | checkVideoFilesWereRemoved, |
670 | getPlaylistVideos, | 676 | getPlaylistVideos, |
671 | uploadVideoAndGetId, | 677 | uploadVideoAndGetId, |
672 | getLocalIdByUUID | 678 | getLocalIdByUUID, |
679 | getVideoIdFromUUID | ||
673 | } | 680 | } |