Plugins refactoring: handleReceived return enumeration ProcessMessage

Use `ProcessMessage::CONTINUE` to allows other modules to process a message.
Use `ProcessMessage::STOP` to stop further message processing.
This commit is contained in:
Vladislav Osmanov
2021-09-23 04:42:09 +03:00
parent b182819aff
commit debae67ae7
13 changed files with 39 additions and 27 deletions

View File

@@ -143,7 +143,7 @@ ExternalNotificationPlugin::ExternalNotificationPlugin()
#endif
}
bool ExternalNotificationPlugin::handleReceived(const MeshPacket &mp)
ProcessMessage ExternalNotificationPlugin::handleReceived(const MeshPacket &mp)
{
#ifndef NO_ESP32
@@ -176,5 +176,5 @@ bool ExternalNotificationPlugin::handleReceived(const MeshPacket &mp)
#endif
return false; // Very important to never return TRUE here. TRUE means we handled the packet and we will stop letting other plugins see it
return ProcessMessage::CONTINUE; // Let others look at this message also if they want
}