@linktr.ee/messaging-react 1.12.5 → 1.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -37,15 +37,23 @@ const CustomChannelPreview = React.memo<CustomChannelPreviewProps>(
|
|
|
37
37
|
const lastMessage =
|
|
38
38
|
channel?.state?.messages?.[channel.state.messages.length - 1]
|
|
39
39
|
|
|
40
|
-
// Fallback order: text -> attachment URL -> "No messages yet"
|
|
41
40
|
const getLastMessageText = () => {
|
|
42
41
|
if (lastMessage?.text) return lastMessage.text
|
|
43
42
|
|
|
44
43
|
const attachment = lastMessage?.attachments?.[0]
|
|
45
|
-
if (attachment
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
if (attachment) {
|
|
45
|
+
// Link previews - show the actual URL
|
|
46
|
+
if (attachment.og_scrape_url) return attachment.og_scrape_url
|
|
47
|
+
|
|
48
|
+
// Type-based detection
|
|
49
|
+
if (attachment.type === 'image') return '📷 Sent an image'
|
|
50
|
+
if (attachment.type === 'video') return '🎥 Sent a video'
|
|
51
|
+
if (attachment.type === 'audio') return '🎵 Sent audio'
|
|
52
|
+
if (attachment.type === 'file') return '📎 Sent a file'
|
|
53
|
+
|
|
54
|
+
// Fallback
|
|
55
|
+
return '📎 Sent an attachment'
|
|
56
|
+
}
|
|
49
57
|
|
|
50
58
|
return 'No messages yet'
|
|
51
59
|
}
|
|
@@ -416,7 +416,7 @@ export const MessagingShell: React.FC<MessagingShellProps> = ({
|
|
|
416
416
|
return (
|
|
417
417
|
<div
|
|
418
418
|
className={classNames(
|
|
419
|
-
'messaging-shell h-full bg-background-
|
|
419
|
+
'messaging-shell h-full bg-background-primary overflow-hidden',
|
|
420
420
|
className
|
|
421
421
|
)}
|
|
422
422
|
>
|