From d3f398e5387f8d37a4bced1d534abf7cea94750b Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Mon, 21 Jan 2019 09:21:35 -0500 Subject: [PATCH] Fixed issue with printing messages with the autoreply whitelist non-empty --- mainwindow.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 6f2f8ee..172132b 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -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) {