mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-05 12:22:28 +00:00
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.
This commit is contained in:
1 parent
a82c41edb9
commit
cf4c9171bb
1 file changed
+11
-6
@@ -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
|
||||
|
||||
Reference in new issue
Block a user