diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-06-18 04:53:34 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-06-18 04:53:34 +0000 |
commit | a27ae3e0c1f1f17596db3abeae16ec3fc4b4ba80 (patch) | |
tree | 36d24b1d0ba617d66ebdc5bd9798cc842d9d93da /protocols/VKontakte/src/vk_chats.cpp | |
parent | 65cf85ee6e83594f4de5d6d06012bde070b6c6b1 (diff) |
VKontakte:
add ‘returned’ muc action
message.send now use guid param for prevent duplicate messages
version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@14242 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_chats.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_chats.cpp | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index 38353271b7..2021f0ee12 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -335,17 +335,23 @@ void CVkProto::AppendChatMessage(int id, const JSONNode &jnMsg, bool bIsHistory) if (tszActionMid.IsEmpty())
tszBody = TranslateT("invite user");
else {
- int a_uid = 0;
- int iReadCount = _stscanf(tszActionMid, _T("%d"), &a_uid);
- if (iReadCount == 1) {
- CVkChatUser *cu = cc->m_users.find((CVkChatUser*)&a_uid);
- if (cu == NULL)
- tszBody.AppendFormat(_T("%s (https://vk.com/id%d)"), TranslateT("invite user"), a_uid);
+ CMString tszUid;
+ tszUid.AppendFormat(_T("%d"), uid);
+ if (tszUid == tszActionMid)
+ tszBody.AppendFormat(_T(" (https://vk.com/id%s) %s"), tszUid, TranslateT("returned to chat"));
+ else {
+ int a_uid = 0;
+ int iReadCount = _stscanf(tszActionMid, _T("%d"), &a_uid);
+ if (iReadCount == 1) {
+ CVkChatUser *cu = cc->m_users.find((CVkChatUser*)&a_uid);
+ if (cu == NULL)
+ tszBody.AppendFormat(_T("%s (https://vk.com/id%d)"), TranslateT("invite user"), a_uid);
+ else
+ tszBody.AppendFormat(_T("%s %s (https://vk.com/id%d)"), TranslateT("invite user"), cu->m_tszNick, a_uid);
+ }
else
- tszBody.AppendFormat(_T("%s %s (https://vk.com/id%d)"), TranslateT("invite user"), cu->m_tszNick, a_uid);
- }
- else
- tszBody = TranslateT("invite user");
+ tszBody = TranslateT("invite user");
+ }
}
}
else if (tszAction == _T("chat_title_update")) {
|