mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-24 23:45:19 +00:00
Nostr DMs: use relay createdAt for display; keep arrival order for sorting; remove comments (#396)
Coalesces commits: - Nostr DMs: use relay createdAt for display; keep arrival order for sorting - remove comments as requested by calle
This commit is contained in:
@@ -67,7 +67,7 @@ class NostrDirectMessageHandler(
|
|||||||
if (packet.type != com.bitchat.android.protocol.MessageType.NOISE_ENCRYPTED.value) return@launch
|
if (packet.type != com.bitchat.android.protocol.MessageType.NOISE_ENCRYPTED.value) return@launch
|
||||||
|
|
||||||
val noisePayload = com.bitchat.android.model.NoisePayload.decode(packet.payload) ?: return@launch
|
val noisePayload = com.bitchat.android.model.NoisePayload.decode(packet.payload) ?: return@launch
|
||||||
val messageTimestamp = Date(rumorTimestamp * 1000L)
|
val messageTimestamp = Date(giftWrap.createdAt * 1000L)
|
||||||
val convKey = "nostr_${senderPubkey.take(16)}"
|
val convKey = "nostr_${senderPubkey.take(16)}"
|
||||||
repo.putNostrKeyMapping(convKey, senderPubkey)
|
repo.putNostrKeyMapping(convKey, senderPubkey)
|
||||||
com.bitchat.android.nostr.GeohashAliasRegistry.put(convKey, senderPubkey)
|
com.bitchat.android.nostr.GeohashAliasRegistry.put(convKey, senderPubkey)
|
||||||
@@ -173,4 +173,3 @@ class NostrDirectMessageHandler(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user