mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 08:04:45 +00:00
fix(chats): handle ChatMessageEncryptedFileHeaderEvent in GiftWrap unwrap
The GiftWrap inner event handler only processed ChatMessageEvent (kind 14) and ReactionEvent. ChatMessageEncryptedFileHeaderEvent (kind 15) was silently dropped, so encrypted file attachments never appeared in DMs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
35b58e489b
commit
f3e55f9958
@@ -649,6 +649,18 @@ fun MainContent(
|
||||
)
|
||||
}
|
||||
|
||||
is com.vitorpamplona.quartz.nip17Dm.files.ChatMessageEncryptedFileHeaderEvent -> {
|
||||
val innerNote = localCache.getOrCreateNote(innerEvent.id)
|
||||
val innerAuthor = localCache.getOrCreateUser(innerEvent.pubKey)
|
||||
if (innerNote.event == null) {
|
||||
innerNote.loadEvent(innerEvent, innerAuthor, emptyList())
|
||||
}
|
||||
iAccount.chatroomList.addMessage(
|
||||
innerEvent.chatroomKey(iAccount.pubKey),
|
||||
innerNote,
|
||||
)
|
||||
}
|
||||
|
||||
is com.vitorpamplona.quartz.nip25Reactions.ReactionEvent -> {
|
||||
val reactionNote = localCache.getOrCreateNote(innerEvent.id)
|
||||
val reactionAuthor = localCache.getOrCreateUser(innerEvent.pubKey)
|
||||
|
||||
Reference in New Issue
Block a user