Enable store and forward on default

This commit is contained in:
Benjamin Faershtein 2025-03-13 20:21:37 -07:00
parent 4d34b3d73c
commit d85b7f42a7

View File

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