mirror of
https://github.com/meshtastic/firmware.git
synced 2025-07-31 19:05:44 +00:00
Prevent negative message IDs and proactively favorite DM'd nodes
This commit is contained in:
parent
33ad3cf7d4
commit
7f2bf59693
@ -850,7 +850,13 @@ void CannedMessageModule::sendText(NodeNum dest, ChannelIndex channel, const cha
|
|||||||
this->waitingForAck = true;
|
this->waitingForAck = true;
|
||||||
|
|
||||||
// Log outgoing message
|
// Log outgoing message
|
||||||
LOG_INFO("Send message id=%d, dest=%x, msg=%.*s", p->id, p->to, p->decoded.payload.size, p->decoded.payload.bytes);
|
LOG_INFO("Send message id=%u, dest=%x, msg=%.*s", p->id, p->to, p->decoded.payload.size, p->decoded.payload.bytes);
|
||||||
|
|
||||||
|
if (p->to != 0xffffffff) {
|
||||||
|
LOG_INFO("Proactively adding %x as favorite node", p->id, p->to, p->decoded.payload.size, p->decoded.payload.bytes);
|
||||||
|
nodeDB->set_favorite(true, p->to);
|
||||||
|
screen->setFrames(graphics::Screen::FOCUS_PRESERVE);
|
||||||
|
}
|
||||||
|
|
||||||
// Send to mesh and phone (even if no phone connected, to track ACKs)
|
// Send to mesh and phone (even if no phone connected, to track ACKs)
|
||||||
service->sendToMesh(p, RX_SRC_LOCAL, true);
|
service->sendToMesh(p, RX_SRC_LOCAL, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user