mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-08 05:43:04 +00:00
Gate watch history v2 behind runtime flag
This commit is contained in:
1 parent
b4f7ed1e54
commit
6cfaf38ce1
5 files changed
+148
-5
No files matched your search
@@ -7585,7 +7585,16 @@ class bitvidApp {
|
||||
(async () => {
|
||||
let viewResult;
|
||||
try {
|
||||
viewResult = await watchHistoryService.publishView(thresholdPointer);
|
||||
const watchHistoryEnabled =
|
||||
watchHistoryService?.isEnabled?.() === true &&
|
||||
typeof watchHistoryService.publishView === "function";
|
||||
if (watchHistoryEnabled) {
|
||||
viewResult = await watchHistoryService.publishView(thresholdPointer);
|
||||
} else if (typeof nostrClient?.recordVideoView === "function") {
|
||||
viewResult = await nostrClient.recordVideoView(thresholdPointer);
|
||||
} else {
|
||||
viewResult = { ok: false, error: "view-logging-unavailable" };
|
||||
}
|
||||
} catch (error) {
|
||||
if (isDevMode) {
|
||||
console.warn(
|
||||
|
||||
Reference in new issue
Block a user