mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-25 19:25:20 +00:00
fragmented packets inherit route
This commit is contained in:
@@ -98,13 +98,16 @@ class FragmentManager {
|
|||||||
)
|
)
|
||||||
|
|
||||||
// iOS: MessageType.fragment.rawValue (single fragment type)
|
// iOS: MessageType.fragment.rawValue (single fragment type)
|
||||||
|
// Fix: Fragments must inherit source route and use v2 if routed
|
||||||
val fragmentPacket = BitchatPacket(
|
val fragmentPacket = BitchatPacket(
|
||||||
|
version = if (packet.route != null) 2u else 1u,
|
||||||
type = MessageType.FRAGMENT.value,
|
type = MessageType.FRAGMENT.value,
|
||||||
ttl = packet.ttl,
|
ttl = packet.ttl,
|
||||||
senderID = packet.senderID,
|
senderID = packet.senderID,
|
||||||
recipientID = packet.recipientID,
|
recipientID = packet.recipientID,
|
||||||
timestamp = packet.timestamp,
|
timestamp = packet.timestamp,
|
||||||
payload = fragmentPayload.encode(),
|
payload = fragmentPayload.encode(),
|
||||||
|
route = packet.route,
|
||||||
signature = null // iOS: signature: nil
|
signature = null // iOS: signature: nil
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user