- e.stopPropagation()}>
-
- {post.author.avatarUrl ? (
-
- ) : (
- post.author.displayName?.charAt(0).toUpperCase() || post.author.handle.charAt(0).toUpperCase()
- )}
-
-
-
-
- {currentUser && currentUser.id !== post.author.id && (
-
- e.stopPropagation()}>
- {post.author.displayName || post.author.handle}
-
- {post.bot && (
-
-
- AI Account
-
- )}
-
- {formatFullHandle(post.author.handle, post.nodeDomain)} · {formatTime(post.createdAt)}
-
-
- {showMenu && (
- <>
-
+ e.stopPropagation()}>
+
+ )}
-
+ {post.author.avatarUrl ? (
+
+ ) : (
+ post.author.displayName?.charAt(0).toUpperCase() || post.author.handle.charAt(0).toUpperCase()
+ )}
+
+
+
+
- {effectiveReplyTo && !showThread && (
-
+ e.stopPropagation()}>
+ {post.author.displayName || post.author.handle}
+
+ {post.bot && (
+ {
- e.preventDefault();
- e.stopPropagation();
- setShowMenu(false);
- }}
- />
-
+ {currentUser && currentUser.id !== post.author.id && (
+
-
+ AI Account
+
+ )}
+
+ {formatFullHandle(post.author.handle, post.nodeDomain)} · {formatTime(post.createdAt)}
+
+
+ {showMenu && (
+ <>
+
+
+ {effectiveReplyTo && !showThread && (
+ {
+ e.preventDefault();
+ e.stopPropagation();
+ setShowMenu(false);
+ }}
+ />
+
+ )}
+
-
- Mute
-
-
- {(post.nodeDomain || post.author.handle.includes('@')) && (
+
+ {(post.nodeDomain || post.author.handle.includes('@')) && (
+
+ )}
+
+ >
+ )}
+
+ Replying to e.stopPropagation()}>{formatFullHandle(effectiveReplyTo.author.handle)}
+
+ )}
+
+ {renderContent(post.content, post.linkPreviewUrl ?? undefined)}
+
+ {post.media && post.media.length > 0 && (
+
+ {post.media.map((item) => {
+ const isVideo = item.mimeType?.startsWith('video/');
+ return (
+
)}
-
+ {isVideo ? (
+ {
+ e.stopPropagation();
+ const video = e.currentTarget;
+ video.muted = !video.muted;
+ }}
+ />
+ ) : (
+
)}
- >
- )}
+ );
+ })}
- Replying to e.stopPropagation()}>{formatFullHandle(effectiveReplyTo.author.handle)}
-
- )}
+ {post.linkPreviewUrl && (
+ {renderContent(post.content, post.linkPreviewUrl ?? undefined)}
-
- {post.media && post.media.length > 0 && (
-
- {post.media.map((item) => {
- const isVideo = item.mimeType?.startsWith('video/');
- return (
-
- {isVideo ? (
- {
- e.stopPropagation();
- const video = e.currentTarget;
- video.muted = !video.muted;
- }}
- />
- ) : (
-
- )}
+ {post.linkPreviewUrl && !post.linkPreviewUrl.match(/(youtube\.com|youtu\.be|vimeo\.com)/) && (
+ e.stopPropagation()}
+ >
+ {post.linkPreviewImage && (
+
+ )}
+
- )}
-
- {post.linkPreviewUrl && !post.linkPreviewUrl.match(/(youtube\.com|youtu\.be|vimeo\.com)/) && (
- e.stopPropagation()}
- >
- {post.linkPreviewImage && (
-
- )}
-
+
- )}
-
- {post.linkPreviewUrl && (
- {post.linkPreviewTitle ? decodeHtmlEntities(post.linkPreviewTitle) : ''}
+ {post.linkPreviewDescription && (
+ {decodeHtmlEntities(post.linkPreviewDescription)}
+ )}
+
+ {new URL(post.linkPreviewUrl.startsWith('http') ? post.linkPreviewUrl : `https://${post.linkPreviewUrl}`).hostname}
- );
- })}
-
-
-
- )}
-
- {post.linkPreviewTitle ? decodeHtmlEntities(post.linkPreviewTitle) : ''}
- {post.linkPreviewDescription && (
- {decodeHtmlEntities(post.linkPreviewDescription)}
- )}
-
- {new URL(post.linkPreviewUrl.startsWith('http') ? post.linkPreviewUrl : `https://${post.linkPreviewUrl}`).hostname}
-
-
-
-
-
- {(currentUser?.id === post.author.id || (post.bot && currentUser?.id === post.bot.ownerId) || (parentPostAuthorId && currentUser?.id === parentPostAuthorId)) && (
-
+
)}
-
-
+
+
+
+
+
+
+ {(currentUser && (
+ currentUser.id === post.author.id ||
+ (post.bot && currentUser.id === post.bot.ownerId) ||
+ (parentPostAuthorId && currentUser.id === parentPostAuthorId) ||
+ // Allow deleting own remote posts (where ID format differs but handle matches)
+ (post.author.id.startsWith('swarm:') && post.author.handle === currentUser.handle)
+ )) && (
+
+ )}
+
+
>
);
}