From cf4c9171bbd942ed7faf82432a97c78f90ac5ae6 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 16 Jan 2026 20:57:39 +0000 Subject: [PATCH] feat: reconstruct raw content in Event Details modal fallback - Updated `EventDetailsModal` to handle cases where fetching the raw event fails or returns null. - Implemented `getRawEvent` logic to reconstruct the `content` JSON string from available video metadata (title, thumbnail, description, etc.) if the raw content is missing. - Ensures the user can inspect key metadata (like thumbnail URLs) even when the original signed event payload is not available in memory or via network fetch. - Explicitly marks the signature as "unavailable (cached)" in fallback scenarios. --- js/ui/components/EventDetailsModal.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/js/ui/components/EventDetailsModal.js b/js/ui/components/EventDetailsModal.js index 63aaf104..d1c1307d 100644 --- a/js/ui/components/EventDetailsModal.js +++ b/js/ui/components/EventDetailsModal.js @@ -363,16 +363,21 @@ export class EventDetailsModal { // so the user can inspect the metadata fields (thumbnail, title, etc.) if (typeof content !== "string") { const payload = { - title: video.title, - description: video.description, - thumbnail: video.thumbnail, - url: video.url, - magnet: video.magnet, + videoRootId: video.videoRootId, + version: video.version, + deleted: video.deleted || false, isPrivate: video.isPrivate, isNsfw: video.isNsfw, isForKids: video.isForKids, - version: video.version, + title: video.title, + url: video.url, + magnet: video.magnet, + thumbnail: video.thumbnail, + description: video.description, mode: video.mode, + enableComments: video.enableComments ?? true, + ws: video.ws, + xs: video.xs, }; // Clean up undefined/empty fields to keep it tidy