add check to send a maximum of 5 log entries
This commit is contained in:
2
Config.h
2
Config.h
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#define NUKI_HUB_VERSION "8.29"
|
||||
#define NUKI_HUB_VERSION "8.30"
|
||||
|
||||
#define MQTT_QOS_LEVEL 1
|
||||
#define MQTT_CLEAN_SESSIONS false
|
||||
|
||||
@@ -307,8 +307,14 @@ void NetworkLock::publishAuthorizationInfo(const std::list<NukiLock::LogEntry>&
|
||||
|
||||
DynamicJsonDocument json(_bufferSize);
|
||||
|
||||
int i = 5;
|
||||
for(const auto& log : logEntries)
|
||||
{
|
||||
if(i <= 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
--i;
|
||||
if((log.loggingType == NukiLock::LoggingType::LockAction || log.loggingType == NukiLock::LoggingType::KeypadAction) && ! authFound)
|
||||
{
|
||||
authFound = true;
|
||||
|
||||
@@ -295,8 +295,15 @@ void NetworkOpener::publishAuthorizationInfo(const std::list<NukiOpener::LogEntr
|
||||
|
||||
DynamicJsonDocument json(_bufferSize);
|
||||
|
||||
int i = 5;
|
||||
for(const auto& log : logEntries)
|
||||
{
|
||||
if(i <= 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
--i;
|
||||
|
||||
if((log.loggingType == NukiOpener::LoggingType::LockAction || log.loggingType == NukiOpener::LoggingType::KeypadAction) && ! authFound)
|
||||
{
|
||||
authFound = true;
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user