Add moderation service and reporting flow

This commit is contained in:
thePR0M3TH3AN committed 2025-10-17 15:33:09 -04:00
1 parent 8b08dc676a
commit 071a8a3671
7 files changed
+1446 -3

No files matched your search

+11
View File
@@ -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: {