This commit is contained in:
Benjamin Faershtein 2025-04-19 15:47:07 -04:00 committed by GitHub
commit d579ff5ad2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -339,7 +339,7 @@ void StoreForwardModule::sendErrorTextMessage(NodeNum dest, bool want_response)
if (this->busy) { if (this->busy) {
str = "S&F - Busy. Try again shortly."; str = "S&F - Busy. Try again shortly.";
} else { } else {
str = "S&F not permitted on the public channel."; str = "S&F - Error. Channel not available.";
} }
LOG_WARN("%s", str); LOG_WARN("%s", str);
memcpy(pr->decoded.payload.bytes, str, strlen(str)); memcpy(pr->decoded.payload.bytes, str, strlen(str));
@ -392,7 +392,7 @@ ProcessMessage StoreForwardModule::handleReceived(const meshtastic_MeshPacket &m
LOG_DEBUG("Legacy Request to send"); LOG_DEBUG("Legacy Request to send");
// Send the last 60 minutes of messages. // Send the last 60 minutes of messages.
if (this->busy || channels.isDefaultChannel(mp.channel)) { if (this->busy) {
sendErrorTextMessage(getFrom(&mp), mp.decoded.want_response); sendErrorTextMessage(getFrom(&mp), mp.decoded.want_response);
} else { } else {
storeForwardModule->historySend(historyReturnWindow * 60, getFrom(&mp)); storeForwardModule->historySend(historyReturnWindow * 60, getFrom(&mp));
@ -457,7 +457,7 @@ bool StoreForwardModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp,
requests_history++; requests_history++;
LOG_INFO("Client Request to send HISTORY"); LOG_INFO("Client Request to send HISTORY");
// Send the last 60 minutes of messages. // Send the last 60 minutes of messages.
if (this->busy || channels.isDefaultChannel(mp.channel)) { if (this->busy) {
sendErrorTextMessage(getFrom(&mp), mp.decoded.want_response); sendErrorTextMessage(getFrom(&mp), mp.decoded.want_response);
} else { } else {
if ((p->which_variant == meshtastic_StoreAndForward_history_tag) && (p->variant.history.window > 0)) { if ((p->which_variant == meshtastic_StoreAndForward_history_tag) && (p->variant.history.window > 0)) {