Enable getting variable values from websocket condition

This commit is contained in:
WarmUpTill
2023-01-16 20:15:39 +01:00
committed by WarmUpTill
parent 828a69bbf7
commit 19eb5074f2
2 changed files with 4 additions and 1 deletions

View File

@@ -56,14 +56,17 @@ bool MacroConditionWebsocket::CheckCondition()
for (const auto &msg : *messages) {
if (_regex.Enabled()) {
if (matchRegex(_regex, msg, _message)) {
SetVariableValue(msg);
return true;
}
} else {
if (msg == std::string(_message)) {
SetVariableValue(msg);
return true;
}
}
}
SetVariableValue("");
return false;
}