Commit 9e94259e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Clean up check

parent 8da9e0e3
...@@ -43,14 +43,15 @@ ConfirmAddressInterface::~ConfirmAddressInterface() ...@@ -43,14 +43,15 @@ ConfirmAddressInterface::~ConfirmAddressInterface()
bool ConfirmAddressInterface::exec(const MessageComposer::PluginEditorCheckBeforeSendParams &params) bool ConfirmAddressInterface::exec(const MessageComposer::PluginEditorCheckBeforeSendParams &params)
{ {
if (mEnabled) { if (mEnabled) {
// not configurated => validate it. if (params.addresses().isEmpty()) {
if (!mHashSettings.contains(params.identity())) {
return true; return true;
} }
// not configurated => validate it.
const ConfirmAddressSettings settings = mHashSettings.value(params.identity()); const ConfirmAddressSettings settings = mHashSettings.value(params.identity());
if (settings.mDomains.isEmpty() && settings.mWhiteLists.isEmpty()) { if (settings.mDomains.isEmpty() && settings.mWhiteLists.isEmpty()) {
return true; return true;
} }
#ifdef USE_PLUGIN #ifdef USE_PLUGIN
QPointer<ConfirmAddressDialog> dlg = new ConfirmAddressDialog(parentWidget()); QPointer<ConfirmAddressDialog> dlg = new ConfirmAddressDialog(parentWidget());
//TODO use params //TODO use params
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment