monitor: bring back old description behavior

this makes description match the beginning again. Fixes #8756
This commit is contained in:
Vaxry 2024-12-23 21:14:54 +00:00
parent 68a5842f06
commit 2e2e2e2cad

View file

@ -412,7 +412,7 @@ bool CMonitor::matchesStaticSelector(const std::string& selector) const {
// match by description
const auto DESCRIPTIONSELECTOR = selector.substr(5);
return DESCRIPTIONSELECTOR == szShortDescription || DESCRIPTIONSELECTOR == szDescription;
return szDescription.starts_with(DESCRIPTIONSELECTOR) || szShortDescription.starts_with(DESCRIPTIONSELECTOR);
} else {
// match by selector
return szName == selector;