mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 02:32:23 +00:00
mqtt: send packets after they are encrypted
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "configuration.h"
|
||||
|
||||
#include "concurrency/OSThread.h"
|
||||
#include "mesh/Channels.h"
|
||||
#include <PubSubClient.h>
|
||||
#include <WiFiClient.h>
|
||||
|
||||
@@ -23,8 +24,13 @@ class MQTT : private concurrency::OSThread
|
||||
|
||||
/**
|
||||
* Publish a packet on the glboal MQTT server.
|
||||
* This hook must be called **after** the packet is encrypted (including the channel being changed to a hash).
|
||||
* @param chIndex the index of the channel for this message
|
||||
*
|
||||
* Note: for messages we are forwarding on the mesh that we can't find the channel for (because we don't have the keys), we
|
||||
* can not forward those messages to the cloud - becuase no way to find a global channel ID.
|
||||
*/
|
||||
void publish(const MeshPacket &mp);
|
||||
void onSend(const MeshPacket &mp, ChannelIndex chIndex);
|
||||
|
||||
protected:
|
||||
virtual int32_t runOnce();
|
||||
|
||||
Reference in New Issue
Block a user