Restore auto favorite; but only if not CLIENT_BASE

This commit is contained in:
Jason P
2025-11-05 10:01:32 -06:00
parent 9f6b5f0a17
commit e2d44829fe

View File

@@ -1078,6 +1078,20 @@ void CannedMessageModule::sendText(NodeNum dest, ChannelIndex channel, const cha
} else { } else {
sm.dest = dest; sm.dest = dest;
sm.type = MessageType::DM_TO_US; sm.type = MessageType::DM_TO_US;
// Only add as favorite if the destination's role is NOT CLIENT_BASE
meshtastic_NodeInfoLite *destInfo = nodeDB->getMeshNode(dest);
bool isClientBase = false;
if (destInfo) {
if (destInfo->user.role == 12 /* CLIENT_BASE */) {
isClientBase = true;
}
}
if (!isClientBase) {
LOG_INFO("Proactively adding %x as favorite node", dest);
nodeDB->set_favorite(true, dest);
} else {
LOG_DEBUG("Not favoriting node %x (CLIENT_BASE role)", dest);
}
} }
sm.ackStatus = AckStatus::NONE; sm.ackStatus = AckStatus::NONE;