Fixed issue with printing messages with the autoreply whitelist non-empty

This commit is contained in:
Jordan Sherer 2019-01-21 09:21:35 -05:00
parent b97e0f3411
commit d3f398e538

View File

@ -9551,13 +9551,6 @@ void MainWindow::processCommandActivity() {
continue;
}
// we're only responding to callsigns in our whitelist if we have one defined...
// make sure the whitelist is empty (no restrictions) or the from callsign or its base callsign is on it
auto whitelist = m_config.auto_whitelist();
if(!whitelist.isEmpty() && !(whitelist.contains(d.from) || whitelist.contains(Radio::base_callsign(d.from)))){
continue;
}
// display the command activity
ActivityDetail ad = {};
ad.isLowConfidence = false;
@ -9635,6 +9628,14 @@ void MainWindow::processCommandActivity() {
}
}
// we're only responding to callsigns in our whitelist if we have one defined...
// make sure the whitelist is empty (no restrictions) or the from callsign or its base callsign is on it
auto whitelist = m_config.auto_whitelist();
if(!whitelist.isEmpty() && !(whitelist.contains(d.from) || whitelist.contains(Radio::base_callsign(d.from)))){
continue;
}
// if this is an allcall, check to make sure we haven't replied to their allcall recently (in the past ten minutes)
// that way we never get spammed by allcalls at too high of a frequency
if (isAllCall && m_txAllcallCommandCache.contains(d.from) && m_txAllcallCommandCache[d.from]->secsTo(now) / 60 < 10) {