mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 10:42:49 +00:00
cleanup to get more space
This commit is contained in:
@@ -997,7 +997,8 @@ void CannedMessageModule::sendText(NodeNum dest, ChannelIndex channel, const cha
|
||||
|
||||
sm.sender = nodeDB->getNodeNum(); // us
|
||||
sm.channelIndex = channel;
|
||||
sm.text = std::string(message);
|
||||
strncpy(sm.text, message, MAX_MESSAGE_SIZE - 1);
|
||||
sm.text[MAX_MESSAGE_SIZE - 1] = '\0';
|
||||
|
||||
// Classify broadcast vs DM
|
||||
if (dest == NODENUM_BROADCAST) {
|
||||
@@ -1009,7 +1010,7 @@ void CannedMessageModule::sendText(NodeNum dest, ChannelIndex channel, const cha
|
||||
}
|
||||
sm.ackStatus = AckStatus::NONE;
|
||||
|
||||
messageStore.addLiveMessage(sm);
|
||||
messageStore.addLiveMessage(std::move(sm));
|
||||
|
||||
// Auto-switch thread view on outgoing message
|
||||
if (sm.type == MessageType::BROADCAST) {
|
||||
|
||||
Reference in New Issue
Block a user