Show original posted timestamp for videos

This commit is contained in:
thePR0M3TH3AN committed 2025-10-08 21:21:44 -04:00
1 parent c99f6834cd
commit 0434401596
6 files changed
+382 -13

No files matched your search

+15
View File
@@ -716,6 +716,8 @@ class Application {
getShareUrlBase: () => this.getShareUrlBase(),
buildShareUrlFromNevent: (nevent) => this.buildShareUrlFromNevent(nevent),
buildShareUrlFromEventId: (eventId) => this.buildShareUrlFromEventId(eventId),
getKnownVideoPostedAt: (video) => this.getKnownVideoPostedAt(video),
resolveVideoPostedAt: (video) => this.resolveVideoPostedAt(video),
canManageBlacklist: () => this.canCurrentUserManageBlacklist(),
canEditVideo: (video) => video?.pubkey === this.pubkey,
canDeleteVideo: (video) => video?.pubkey === this.pubkey,
@@ -6441,6 +6443,19 @@ class Application {
existing.rootCreatedAt = normalized;
}
}
if (nostrClient && typeof nostrClient.applyRootCreatedAt === "function") {
try {
nostrClient.applyRootCreatedAt(video);
} catch (error) {
if (isDevMode) {
console.warn(
"[Application] Failed to sync cached root timestamp with nostrClient:",
error
);
}
}
}
}
async resolveVideoPostedAt(video) {