Skip to content

Commit

Permalink
fix: PKC channel index in sent MeshPackets
Browse files Browse the repository at this point in the history
  • Loading branch information
andrekir committed Sep 30, 2024
1 parent cec234b commit bfa2eae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/src/main/java/com/geeksville/mesh/service/MeshService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -516,16 +516,17 @@ class MeshService : Service(), Logging {
this.wantAck = wantAck
this.id = id
this.hopLimit = hopLimit
this.channel = channel
this.priority = priority
decoded = MeshProtos.Data.newBuilder().also {
initFn(it)
}.build()
if (channel == DataPacket.PKC_CHANNEL_INDEX) {
pkiEncrypted = true
nodeDBbyNodeNum[to]?.user?.publicKey?.let { publicKey ->
pkiEncrypted = !publicKey.isEmpty
this.publicKey = publicKey
}
} else {
this.channel = channel
}

return build()
Expand Down

0 comments on commit bfa2eae

Please sign in to comment.