mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 17:52:35 +00:00
Let StoreForward server send history to phoneAPI (#4282)
* Send StoreForward history of the server to a connected client To extend the ToPhoneQueue * Add delay after sending history info * Don't allow history request over LoRa on default channel --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
@@ -293,6 +293,17 @@ void MeshService::sendToPhone(meshtastic_MeshPacket *p)
|
||||
{
|
||||
perhapsDecode(p);
|
||||
|
||||
#ifdef ARCH_ESP32
|
||||
#if !MESHTASTIC_EXCLUDE_STOREFORWARD
|
||||
if (moduleConfig.store_forward.enabled && storeForwardModule->isServer() &&
|
||||
p->decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP) {
|
||||
releaseToPool(p); // Copy is already stored in StoreForward history
|
||||
fromNum++; // Notify observers for packet from radio
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (toPhoneQueue.numFree() == 0) {
|
||||
if (p->decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP ||
|
||||
p->decoded.portnum == meshtastic_PortNum_RANGE_TEST_APP) {
|
||||
|
||||
Reference in New Issue
Block a user