mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-06 00:37:23 +00:00
handle kind 14/15s via contained event instead
This commit is contained in:
1 parent
79980ded70
commit
6380b1980c
1 file changed
+5
-2
@@ -39,11 +39,14 @@ const MessageBubble = memo(({
|
|||||||
};
|
};
|
||||||
isFromCurrentUser: boolean;
|
isFromCurrentUser: boolean;
|
||||||
}) => {
|
}) => {
|
||||||
|
// For NIP-17, use inner message kind (14/15); for NIP-04, use message kind (4)
|
||||||
|
const actualKind = message.decryptedEvent?.kind || message.kind;
|
||||||
const isNIP4Message = message.kind === 4;
|
const isNIP4Message = message.kind === 4;
|
||||||
const isFileAttachment = message.kind === 15; // Kind 15 = files/attachments
|
const isFileAttachment = actualKind === 15; // Kind 15 = files/attachments
|
||||||
|
|
||||||
// Create a NostrEvent object for NoteContent (only used for kind 15)
|
// Create a NostrEvent object for NoteContent (only used for kind 15)
|
||||||
const messageEvent: NostrEvent = {
|
// For NIP-17 file attachments, use the decryptedEvent which has the actual tags
|
||||||
|
const messageEvent: NostrEvent = message.decryptedEvent || {
|
||||||
id: message.id,
|
id: message.id,
|
||||||
pubkey: message.pubkey,
|
pubkey: message.pubkey,
|
||||||
created_at: message.created_at,
|
created_at: message.created_at,
|
||||||
|
|||||||
Reference in new issue
Block a user