Add hashtag preferences service and tests

This commit is contained in:
thePR0M3TH3AN committed 2025-10-25 15:52:05 -04:00
1 parent f66e979767
commit 50de07fa7a
4 files changed
+952 -1

No files matched your search

+5 -1
View File
@@ -11,6 +11,7 @@ import moderationService from "./services/moderationService.js";
import nostrService from "./services/nostrService.js";
import r2Service from "./services/r2Service.js";
import { loadView } from "./viewManager.js";
import hashtagPreferences from "./services/hashtagPreferencesService.js";
function normalizeNpub(value) {
return typeof value === "string" ? value.trim() : "";
@@ -97,7 +98,7 @@ async function bootstrapTrustedSeeds() {
bootstrapTrustedSeeds();
function mergeServices(overrides = {}) {
const merged = { nostrService, r2Service };
const merged = { nostrService, r2Service, hashtagPreferences };
if (overrides && typeof overrides === "object") {
if (overrides.nostrService) {
@@ -106,6 +107,9 @@ function mergeServices(overrides = {}) {
if (overrides.r2Service) {
merged.r2Service = overrides.r2Service;
}
if (overrides.hashtagPreferences) {
merged.hashtagPreferences = overrides.hashtagPreferences;
}
}
return merged;