mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-08 22:02:54 +00:00
Add moderation service and reporting flow
This commit is contained in:
1 parent
8b08dc676a
commit
071a8a3671
7 files changed
+1446
-3
No files matched your search
@@ -27,6 +27,7 @@ import {
|
||||
createActiveNostrSource,
|
||||
createBlacklistFilterStage,
|
||||
createDedupeByRootStage,
|
||||
createModerationStage,
|
||||
createChronologicalSorter,
|
||||
createSubscriptionAuthorsSource,
|
||||
registerWatchHistoryFeed,
|
||||
@@ -3701,6 +3702,10 @@ class Application {
|
||||
}
|
||||
|
||||
autoplayModalVideo() {
|
||||
if (this.currentVideo?.moderation?.blockAutoplay) {
|
||||
this.log("[moderation] Skipping autoplay due to trusted reports.");
|
||||
return;
|
||||
}
|
||||
if (!this.modalVideo) return;
|
||||
this.modalVideo.play().catch((err) => {
|
||||
this.log("Autoplay failed:", err);
|
||||
@@ -3863,6 +3868,9 @@ class Application {
|
||||
createDedupeByRootStage({
|
||||
dedupe: (videos) => this.dedupeVideosByRoot(videos),
|
||||
}),
|
||||
createModerationStage({
|
||||
getService: () => this.nostrService.getModerationService(),
|
||||
}),
|
||||
],
|
||||
sorter: createChronologicalSorter(),
|
||||
});
|
||||
@@ -3896,6 +3904,9 @@ class Application {
|
||||
createDedupeByRootStage({
|
||||
dedupe: (videos) => this.dedupeVideosByRoot(videos),
|
||||
}),
|
||||
createModerationStage({
|
||||
getService: () => this.nostrService.getModerationService(),
|
||||
}),
|
||||
],
|
||||
sorter: createChronologicalSorter(),
|
||||
hooks: {
|
||||
|
||||
Reference in new issue
Block a user