mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-08-22 07:06:05 +00:00
fix: MessageRouter uses stale BluetoothMeshService reference
This commit is contained in:
parent
e313112d7c
commit
86134d3248
@ -11,7 +11,7 @@ import com.bitchat.android.nostr.NostrTransport
|
||||
*/
|
||||
class MessageRouter private constructor(
|
||||
private val context: Context,
|
||||
private val mesh: BluetoothMeshService,
|
||||
private var mesh: BluetoothMeshService,
|
||||
private val nostr: NostrTransport
|
||||
) {
|
||||
companion object {
|
||||
@ -23,6 +23,7 @@ class MessageRouter private constructor(
|
||||
val nostr = NostrTransport.getInstance(context)
|
||||
INSTANCE?.also {
|
||||
// Update mesh reference if needed and keep senderPeerID in sync
|
||||
it.mesh = mesh
|
||||
it.nostr.senderPeerID = mesh.myPeerID
|
||||
return it
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user