diff options
author | George Hazan <ghazan@miranda.im> | 2022-07-16 21:23:06 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-07-16 21:23:06 +0300 |
commit | cd4272ca22d47cdf673bfb0e5ec353acca3d9569 (patch) | |
tree | 0e2a4879766d8197cdf8a8fb6d5f5033399a0ea4 /plugins/SendScreenshotPlus/src/Main.cpp | |
parent | d6a052756f58211067a7a67d7e3c1dbe7e6c9465 (diff) |
Contact_IsGroupChat - a helper to detect chat rooms
Diffstat (limited to 'plugins/SendScreenshotPlus/src/Main.cpp')
-rw-r--r-- | plugins/SendScreenshotPlus/src/Main.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp index 1db150cf55..4233d5e3e6 100644 --- a/plugins/SendScreenshotPlus/src/Main.cpp +++ b/plugins/SendScreenshotPlus/src/Main.cpp @@ -138,14 +138,13 @@ INT_PTR service_SendDesktop(WPARAM wParam, LPARAM) delete frmMain; return -1; } + MCONTACT hContact = (MCONTACT)wParam; - char *pszProto = Proto_GetBaseAccountName(hContact); - bool bChatRoom = db_get_b(hContact, pszProto, "ChatRoom", 0) != 0; frmMain->m_opt_chkTimed = false; frmMain->m_opt_tabCapture = 1; frmMain->m_opt_cboxDesktop = 0; frmMain->m_opt_chkEditor = false; - frmMain->m_opt_cboxSendBy = bChatRoom ? SS_IMAGESHACK : SS_FILESEND; + frmMain->m_opt_cboxSendBy = Contact_IsGroupChat(hContact) ? SS_IMAGESHACK : SS_FILESEND; frmMain->Init(pszPath, hContact); // this method create the window hidden. mir_free(pszPath); frmMain->btnCaptureClick(); // this method will call Close() |