diff options
author | Chocobozzz <me@florianbigard.com> | 2022-09-23 11:38:18 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-09-23 11:38:18 +0200 |
commit | b2a70e3ca2611a8831b6e490cc25dbf3066562c0 (patch) | |
tree | b07d2effb206ad3fd1d39002b69c5cc20d862b5b /server/tests/fixtures/peertube-plugin-test | |
parent | b569b2c607bec0e671228131a5b1fe6ddf9717a0 (diff) | |
download | PeerTube-b2a70e3ca2611a8831b6e490cc25dbf3066562c0.tar.gz PeerTube-b2a70e3ca2611a8831b6e490cc25dbf3066562c0.tar.zst PeerTube-b2a70e3ca2611a8831b6e490cc25dbf3066562c0.zip |
Support refusing remote comments
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test')
-rw-r--r-- | server/tests/fixtures/peertube-plugin-test/main.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test/main.js b/server/tests/fixtures/peertube-plugin-test/main.js index 813482a27..19dccf26e 100644 --- a/server/tests/fixtures/peertube-plugin-test/main.js +++ b/server/tests/fixtures/peertube-plugin-test/main.js | |||
@@ -178,6 +178,8 @@ async function register ({ registerHook, registerSetting, settingsManager, stora | |||
178 | } | 178 | } |
179 | }) | 179 | }) |
180 | 180 | ||
181 | // --------------------------------------------------------------------------- | ||
182 | |||
181 | registerHook({ | 183 | registerHook({ |
182 | target: 'filter:api.video-thread.create.accept.result', | 184 | target: 'filter:api.video-thread.create.accept.result', |
183 | handler: ({ accepted }, { commentBody }) => checkCommentBadWord(accepted, commentBody) | 185 | handler: ({ accepted }, { commentBody }) => checkCommentBadWord(accepted, commentBody) |
@@ -189,6 +191,13 @@ async function register ({ registerHook, registerSetting, settingsManager, stora | |||
189 | }) | 191 | }) |
190 | 192 | ||
191 | registerHook({ | 193 | registerHook({ |
194 | target: 'filter:activity-pub.remote-video-comment.create.accept.result', | ||
195 | handler: ({ accepted }, { comment }) => checkCommentBadWord(accepted, comment) | ||
196 | }) | ||
197 | |||
198 | // --------------------------------------------------------------------------- | ||
199 | |||
200 | registerHook({ | ||
192 | target: 'filter:api.video-threads.list.params', | 201 | target: 'filter:api.video-threads.list.params', |
193 | handler: obj => addToCount(obj) | 202 | handler: obj => addToCount(obj) |
194 | }) | 203 | }) |