summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElzorFox <elzorfox@ya.ru>2023-12-08 09:25:59 +0500
committerElzorFox <elzorfox@ya.ru>2023-12-08 09:25:59 +0500
commitcc3c8097bef32bfa10a283229062b68fd4e9c138 (patch)
treec9ee0d293e81828a5d3275f55fb69e73eff94e29
parentcfe123df04b3317cc55d2405614d60496cd9bd3c (diff)
VKontakte:
fix selfname for forwarding message fix order for forwarding message version bump
-rw-r--r--protocols/VKontakte/src/stdafx.h1
-rw-r--r--protocols/VKontakte/src/version.h2
-rw-r--r--protocols/VKontakte/src/vk_messages.cpp2
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp5
4 files changed, 7 insertions, 3 deletions
diff --git a/protocols/VKontakte/src/stdafx.h b/protocols/VKontakte/src/stdafx.h
index de273fd377..7be01d3c5c 100644
--- a/protocols/VKontakte/src/stdafx.h
+++ b/protocols/VKontakte/src/stdafx.h
@@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <malloc.h>
#include <time.h>
#include <locale.h>
+#include <algorithm>
#include <newpluginapi.h>
#include <m_system.h>
diff --git a/protocols/VKontakte/src/version.h b/protocols/VKontakte/src/version.h
index 77b1d6f838..4179eb895d 100644
--- a/protocols/VKontakte/src/version.h
+++ b/protocols/VKontakte/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 1
#define __RELEASE_NUM 15
-#define __BUILD_NUM 5
+#define __BUILD_NUM 6
#include <stdver.h>
diff --git a/protocols/VKontakte/src/vk_messages.cpp b/protocols/VKontakte/src/vk_messages.cpp
index 94bebc7e78..3f7f50a051 100644
--- a/protocols/VKontakte/src/vk_messages.cpp
+++ b/protocols/VKontakte/src/vk_messages.cpp
@@ -60,7 +60,7 @@ int CVkProto::ForwardMsg(MCONTACT hContact, std::vector<MEVENT>& vForvardEvents,
MCONTACT hForwardContact = db_event_getContact(mEvnt);
if (!Proto_IsProtoOnContact(hForwardContact, m_szModuleName)) {
- CMStringW wszContactName = (dbei.flags & DBEF_SENT) ? getWStringA(hContact, "Nick", TranslateT("Me")) : Clist_GetContactDisplayName(hForwardContact);
+ CMStringW wszContactName = (dbei.flags & DBEF_SENT) ? getWStringA(0, "Nick", TranslateT("Me")) : Clist_GetContactDisplayName(hForwardContact);
wchar_t ttime[64];
time_t tTimestamp(dbei.timestamp);
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp
index 9627f12be2..924062555f 100644
--- a/protocols/VKontakte/src/vk_proto.cpp
+++ b/protocols/VKontakte/src/vk_proto.cpp
@@ -415,7 +415,7 @@ int CVkProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM)
return 0;
}
-int CVkProto::OnPrebuildNSMenu(WPARAM hContact, LPARAM lParam)
+int CVkProto::OnPrebuildNSMenu(WPARAM, LPARAM)
{
Menu_ShowItem(m_hNewStoryMenuItems[NSMI_FORWARD], true);
return 0;
@@ -449,6 +449,9 @@ INT_PTR CVkProto::SvcNSExecMenu(WPARAM iCommand, LPARAM pHandle)
if (!vIds.size())
vIds.push_back(hCurrentEvent);
+
+ std::sort(vIds.begin(), vIds.end());
+
T2Utf pszMsg(dlg.wszMessage.c_str());
for (auto &hContact : dlg.lContacts)
ForwardMsg((UINT_PTR)hContact, vIds, pszMsg);