mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-09 14:22:53 +00:00
Add hashtag preferences service and tests
This commit is contained in:
1 parent
f66e979767
commit
50de07fa7a
4 files changed
+952
-1
No files matched your search
Vendored
+5
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user