fix: text messages sent from connected standalone devices

pull/1444/head
andrekir 2024-11-30 07:43:34 -03:00
rodzic 08b280d68b
commit 6678df78b0
1 zmienionych plików z 0 dodań i 9 usunięć

Wyświetl plik

@ -450,7 +450,6 @@ class MeshService : Service(), Logging {
}
private val hexIdRegex = """\!([0-9A-Fa-f]+)""".toRegex()
private val rangeTestRegex = Regex("seq (\\d{1,10})")
// Map a userid to a node/ node num, or throw an exception if not found
// We prefer to find nodes based on their assigned IDs, but if no ID has been assigned to a node, we can also find it based on node number
@ -683,12 +682,6 @@ class MeshService : Service(), Logging {
when (data.portnumValue) {
Portnums.PortNum.TEXT_MESSAGE_APP_VALUE -> {
if (fromUs) return
// TODO temporary solution to Range Test spam, may be removed in the future
val isRangeTest = rangeTestRegex.matches(data.payload.toStringUtf8())
if (!moduleConfig.rangeTest.enabled && isRangeTest) return
debug("Received CLEAR_TEXT from $fromId")
rememberDataPacket(dataPacket)
}
@ -700,7 +693,6 @@ class MeshService : Service(), Logging {
rememberDataPacket(dataPacket, u.expire > currentSecond())
}
// Handle new style position info
Portnums.PortNum.POSITION_APP_VALUE -> {
val u = MeshProtos.Position.parseFrom(data.payload)
// debug("position_app ${packet.from} ${u.toOneLineString()}")
@ -711,7 +703,6 @@ class MeshService : Service(), Logging {
}
}
// Handle new style user info
Portnums.PortNum.NODEINFO_APP_VALUE ->
if (!fromUs) {
val u = MeshProtos.User.parseFrom(data.payload).copy {