From 24da6586bfdb3e41cc8240e41162b016e10b68c3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 28 Apr 2025 15:21:18 +0300 Subject: =?UTF-8?q?fixes=20#4998=20(=D0=92=20=D0=BE=D0=BA=D0=BD=D0=B5=20?= =?UTF-8?q?=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D0=B9=20Dummy-?= =?UTF-8?q?=D0=BA=D0=BE=D0=BD=D1=82=D0=B0=D0=BA=D1=82=D0=B0=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BB=D0=B5=20=D0=B2=D0=B2=D0=BE=D0=B4=D0=B0=20=D1=82=D0=B5?= =?UTF-8?q?=D0=BA=D1=81=D1=82=D0=B0=20=D0=BD=D0=B5=20=D0=BE=D1=82=D0=BA?= =?UTF-8?q?=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=BE)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/Dummy/src/main.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'protocols/Dummy/src/main.cpp') diff --git a/protocols/Dummy/src/main.cpp b/protocols/Dummy/src/main.cpp index 034231f0b5..23c47005a4 100644 --- a/protocols/Dummy/src/main.cpp +++ b/protocols/Dummy/src/main.cpp @@ -54,13 +54,14 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC static int OnDummyDoubleClicked(WPARAM hContact, LPARAM) { if (auto *pa = Proto_GetContactAccount(hContact)) - if (pa->ppro && pa->ppro->GetCaps(1000)) { - if (Contact::IsGroupChat(hContact)) - CallService(MS_HISTORY_SHOWCONTACTHISTORY, hContact, 0); - else - CallService(MS_MSG_SENDMESSAGE, hContact, 0); - return 1; - } + if (auto *ppro = (CDummyProto*)pa->ppro) + if (ppro->GetCaps(1000)) { + if (Contact::IsGroupChat(hContact) || !ppro->bAllowSending) + CallService(MS_HISTORY_SHOWCONTACTHISTORY, hContact, 0); + else + CallService(MS_MSG_SENDMESSAGE, hContact, 0); + return 1; + } return 0; } -- cgit v1.2.3