5b2f2ca42b
Show a small lock icon next to the timestamp on each DM message: - NIP-17 (ChatMessageEvent, ChatMessageEncryptedFileHeaderEvent): filled lock in primary color — relay can't see sender/recipient - NIP-04 (PrivateDmEvent): open lock in muted gray — legacy encryption, metadata visible to relays Matches Android's IncognitoBadge pattern. Both NIP-04 and NIP-17 messages in the same 1-on-1 conversation produce identical ChatroomKeys, so they merge into one conversation — the badge is the only way to tell them apart. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
15 lines
958 B
Markdown
15 lines
958 B
Markdown
# TODO
|
|
|
|
## DM: Mixed NIP-04 + NIP-17 conversations
|
|
|
|
**Question:** What happens when a conversation with an npub has both NIP-04 (kind 4) and NIP-17 (kind 14/15 in GiftWrap) messages?
|
|
|
|
**Current behavior to investigate:**
|
|
- NIP-04 messages use `PrivateDmEvent.chatroomKey(pubKey)` → creates a `ChatroomKey` based on recipient
|
|
- NIP-17 messages use `ChatMessageEvent.chatroomKey(pubKey)` → also creates a `ChatroomKey` based on group members
|
|
- Do these produce the **same** `ChatroomKey` for 1-on-1 chats? If yes, both message types merge into one conversation. If no, they appear as separate conversations.
|
|
- Android Amethyst handles this — check how `Account.kt` merges them
|
|
- Edge cases: timeline ordering, decryption display, NIP-04 messages showing as "legacy" vs NIP-17
|
|
|
|
**Action:** Test with a real conversation that has both types. If they split into two rooms, we need to merge them in `ChatroomListState` or unify the `ChatroomKey` derivation.
|