diff options
author | George Hazan <george.hazan@gmail.com> | 2025-04-28 15:21:18 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2025-04-28 15:21:18 +0300 |
commit | 24da6586bfdb3e41cc8240e41162b016e10b68c3 (patch) | |
tree | 271ac9b1f6979e8dccf68a80a056b918de7bf719 /protocols/Dummy/src/main.cpp | |
parent | eaa6e43d1de61c11d8d94c1113c872bfc3186806 (diff) |
fixes #4998 (В окне сообщений Dummy-контакта поле ввода текста не отключено)
Diffstat (limited to 'protocols/Dummy/src/main.cpp')
-rw-r--r-- | protocols/Dummy/src/main.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
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;
}
|