Render data and uploader name for current photo in gallery
This commit is contained in:
@@ -94,11 +94,14 @@ function parsePhotoFromEvent(event) {
|
||||
if (!url) return null;
|
||||
|
||||
const placeIdentifier = tags.find((t) => t[0] === 'i')?.[1];
|
||||
const publishedAtRaw = tags.find((t) => t[0] === 'published_at')?.[1];
|
||||
const publishedAt = publishedAtRaw ? Number(publishedAtRaw) : null;
|
||||
|
||||
return {
|
||||
eventId: event.id,
|
||||
pubkey: event.pubkey,
|
||||
createdAt: event.created_at,
|
||||
publishedAt: publishedAt && publishedAt > 0 ? publishedAt : null,
|
||||
url,
|
||||
thumbUrl,
|
||||
blurhash,
|
||||
|
||||
@@ -69,6 +69,10 @@ export function parsePlacePhotos(events) {
|
||||
let aspectRatio = 16 / 9; // default
|
||||
let altText = null;
|
||||
let placeIdentifier = event.tags.find((t) => t[0] === 'i')?.[1];
|
||||
const publishedAtRaw = event.tags.find(
|
||||
(t) => t[0] === 'published_at'
|
||||
)?.[1];
|
||||
const publishedAt = publishedAtRaw ? Number(publishedAtRaw) : null;
|
||||
|
||||
for (const tag of imeta.slice(1)) {
|
||||
if (tag.startsWith('url ')) {
|
||||
@@ -98,6 +102,7 @@ export function parsePlacePhotos(events) {
|
||||
eventId: event.id,
|
||||
pubkey: event.pubkey,
|
||||
createdAt: event.created_at,
|
||||
publishedAt: publishedAt && publishedAt > 0 ? publishedAt : null,
|
||||
url,
|
||||
thumbUrl,
|
||||
blurhash,
|
||||
|
||||
Reference in New Issue
Block a user