Steal the TEXT_MESSAGE_COMPRESSED portnum

This commit is contained in:
Jonathan Bennett
2025-12-26 00:06:56 -06:00
parent df3934de85
commit cf5ecf30d7
2 changed files with 3 additions and 3 deletions

View File

@@ -22,7 +22,7 @@
#include "modules/RoutingModule.h" #include "modules/RoutingModule.h"
StoreForwardPlusPlusModule::StoreForwardPlusPlusModule() StoreForwardPlusPlusModule::StoreForwardPlusPlusModule()
: ProtobufModule("StoreForwardpp", meshtastic_PortNum_STORE_FORWARD_PLUSPLUS_APP, &meshtastic_StoreForwardPlusPlus_msg), : ProtobufModule("StoreForwardpp", meshtastic_PortNum_TEXT_MESSAGE_COMPRESSED_APP, &meshtastic_StoreForwardPlusPlus_msg),
concurrency::OSThread("StoreForwardpp") concurrency::OSThread("StoreForwardpp")
{ {
LOG_WARN("StoreForwardPlusPlusModule init"); LOG_WARN("StoreForwardPlusPlusModule init");
@@ -274,7 +274,7 @@ ProcessMessage StoreForwardPlusPlusModule::handleReceived(const meshtastic_MeshP
// canonAnnounce(lo.message_hash, lo.commit_hash, lo.root_hash, lo.rx_time); // canonAnnounce(lo.message_hash, lo.commit_hash, lo.root_hash, lo.rx_time);
return ProcessMessage::CONTINUE; // Let others look at this message also if they want return ProcessMessage::CONTINUE; // Let others look at this message also if they want
// TODO: Block packets from self? // TODO: Block packets from self?
} else if (mp.decoded.portnum == meshtastic_PortNum_STORE_FORWARD_PLUSPLUS_APP) { } else if (mp.decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_COMPRESSED_APP) {
LOG_WARN("Got a STORE_FORWARD++ packet"); LOG_WARN("Got a STORE_FORWARD++ packet");
meshtastic_StoreForwardPlusPlus scratch; meshtastic_StoreForwardPlusPlus scratch;
pb_decode_from_bytes(mp.decoded.payload.bytes, mp.decoded.payload.size, meshtastic_StoreForwardPlusPlus_fields, &scratch); pb_decode_from_bytes(mp.decoded.payload.bytes, mp.decoded.payload.size, meshtastic_StoreForwardPlusPlus_fields, &scratch);

View File

@@ -77,7 +77,7 @@ class StoreForwardPlusPlusModule : public ProtobufModule<meshtastic_StoreForward
{ {
switch (p->decoded.portnum) { switch (p->decoded.portnum) {
case meshtastic_PortNum_TEXT_MESSAGE_APP: case meshtastic_PortNum_TEXT_MESSAGE_APP:
case meshtastic_PortNum_STORE_FORWARD_PLUSPLUS_APP: case meshtastic_PortNum_TEXT_MESSAGE_COMPRESSED_APP:
return true; return true;
default: default:
return false; return false;