summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/VKontakte/src/version.h2
-rw-r--r--protocols/VKontakte/src/vk.h2
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp5
-rw-r--r--protocols/VKontakte/src/vk_dialogs.cpp10
-rw-r--r--protocols/VKontakte/src/vk_dialogs.h3
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp2
-rw-r--r--protocols/VKontakte/src/vk_proto.h1
-rw-r--r--protocols/VKontakte/src/vk_search.cpp10
8 files changed, 16 insertions, 19 deletions
diff --git a/protocols/VKontakte/src/version.h b/protocols/VKontakte/src/version.h
index 31407d4baa..e7a6adffcc 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 16
-#define __BUILD_NUM 8
+#define __BUILD_NUM 9
#include <stdver.h>
diff --git a/protocols/VKontakte/src/vk.h b/protocols/VKontakte/src/vk.h
index c5cd548119..152f77c8eb 100644
--- a/protocols/VKontakte/src/vk.h
+++ b/protocols/VKontakte/src/vk.h
@@ -88,7 +88,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define VK_USER_DEACTIVATE_ACTION 9321
-#define VK_API_VER "5.199"
+#define VK_API_VER "5.236"
#define VER_API CHAR_PARAM("v", VK_API_VER)
#define VK_FEED_USER 2147483647L
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index 3961eeb566..d58c53c801 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -40,6 +40,8 @@ INT_PTR __cdecl CVkProto::SvcChatChangeTopic(WPARAM hContact, LPARAM)
return 1;
if (LPTSTR pwszNew = ChangeChatTopic(cc)) {
+ if (mir_wstrlen(pwszNew) > 100)
+ pwszNew[100] = 0;
Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/messages.editChat.json", true, &CVkProto::OnReceiveSmth)
<< WCHAR_PARAM("title", pwszNew)
<< INT_PARAM("chat_id", cc->m_iChatId));
@@ -1004,7 +1006,8 @@ INT_PTR CVkProto::SvcCreateChat(WPARAM, LPARAM)
TranslateT("Create group chat"),
TranslateT("Mark users you want to invite to a new chat"),
TranslateT("New chat's title:"),
- VKContactType::vkContactSelf | VKContactType::vkContactMUCUser | VKContactType::vkContactGroupUser
+ VKContactType::vkContactSelf | VKContactType::vkContactMUCUser | VKContactType::vkContactGroupUser,
+ 100
);
if (!dlg.DoModal())
diff --git a/protocols/VKontakte/src/vk_dialogs.cpp b/protocols/VKontakte/src/vk_dialogs.cpp
index 1d954dc1ee..67396e702e 100644
--- a/protocols/VKontakte/src/vk_dialogs.cpp
+++ b/protocols/VKontakte/src/vk_dialogs.cpp
@@ -175,13 +175,14 @@ CVkUserListForm::CVkUserListForm(CVkProto* proto) :
m_stListCaption(this, IDC_STATIC_MARKCONTAKTS),
m_stMessageCaption(this, IDC_STATIC_MESSAGE),
lContacts(20, NumericKeySortT),
- uClcFilterFlag(0)
+ uClcFilterFlag(0),
+ uMaxLengthMessage(0)
{
m_clc.OnNewContact = m_clc.OnListRebuilt = Callback(this, &CVkUserListForm::FilterList);
}
-CVkUserListForm::CVkUserListForm(CVkProto* proto, CMStringW _wszMessage, CMStringW _wszFormCaption, CMStringW _wszListCaption, CMStringW _wszMessageCaption, uint8_t _uClcFilterFlag) :
+CVkUserListForm::CVkUserListForm(CVkProto* proto, CMStringW _wszMessage, CMStringW _wszFormCaption, CMStringW _wszListCaption, CMStringW _wszMessageCaption, uint8_t _uClcFilterFlag, UINT _uMaxLengthMessage) :
CVkDlgBase(proto, IDD_VKUSERFORM),
m_clc(this, IDC_CONTACTLIST),
m_edtMessage(this, IDC_MESSAGE),
@@ -192,7 +193,8 @@ CVkUserListForm::CVkUserListForm(CVkProto* proto, CMStringW _wszMessage, CMStrin
wszListCaption(_wszListCaption),
wszMessageCaption(_wszMessageCaption),
lContacts(5, PtrKeySortT),
- uClcFilterFlag(_uClcFilterFlag)
+ uClcFilterFlag(_uClcFilterFlag),
+ uMaxLengthMessage(_uMaxLengthMessage)
{
m_clc.OnNewContact = m_clc.OnListRebuilt = Callback(this, &CVkUserListForm::FilterList);
}
@@ -207,6 +209,8 @@ bool CVkUserListForm::OnInitDialog()
m_stListCaption.SetText(wszListCaption.c_str());
m_stMessageCaption.SetText(wszMessageCaption.c_str());
+ if (uMaxLengthMessage)
+ m_edtMessage.SetMaxLength(uMaxLengthMessage);
m_edtMessage.SetText(wszMessage.c_str());
SetCaption(wszFormCaption.c_str());
diff --git a/protocols/VKontakte/src/vk_dialogs.h b/protocols/VKontakte/src/vk_dialogs.h
index 3e78148d39..39afb1c91a 100644
--- a/protocols/VKontakte/src/vk_dialogs.h
+++ b/protocols/VKontakte/src/vk_dialogs.h
@@ -127,9 +127,10 @@ public:
CMStringW wszMessage;
LIST<void> lContacts;
uint8_t uClcFilterFlag;
+ UINT uMaxLengthMessage;
CVkUserListForm(CVkProto* proto);
- CVkUserListForm(CVkProto* proto, CMStringW _wszMessage, CMStringW _wszFormCaption, CMStringW _wszListCaption, CMStringW _wszMessageCaption, uint8_t _uFilterClcFlag);
+ CVkUserListForm(CVkProto* proto, CMStringW _wszMessage, CMStringW _wszFormCaption, CMStringW _wszListCaption, CMStringW _wszMessageCaption, uint8_t _uFilterClcFlag, UINT _uMaxLengthMessage = 0);
bool OnInitDialog() override;
bool OnApply() override;
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp
index d4118238f5..d2b9d421ca 100644
--- a/protocols/VKontakte/src/vk_proto.cpp
+++ b/protocols/VKontakte/src/vk_proto.cpp
@@ -613,7 +613,7 @@ INT_PTR CVkProto::GetCaps(int type, MCONTACT)
switch (type) {
case PFLAGNUM_1:
return PF1_IM | PF1_CHAT | PF1_SERVERCLIST | PF1_AUTHREQ | PF1_BASICSEARCH
- | PF1_SEARCHBYNAME | PF1_SEARCHBYEMAIL | PF1_MODEMSG | PF1_FILESEND | PF1_FILERESUME;
+ | PF1_SEARCHBYNAME | PF1_MODEMSG | PF1_FILESEND | PF1_FILERESUME;
case PFLAGNUM_2:
return PF2_ONLINE | PF2_INVISIBLE | PF2_IDLE;
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h
index 359bb01f74..739c82b8b4 100644
--- a/protocols/VKontakte/src/vk_proto.h
+++ b/protocols/VKontakte/src/vk_proto.h
@@ -65,7 +65,6 @@ struct CVkProto : public PROTO<CVkProto>
int GetInfo(MCONTACT hContact, int infoType) override;
HANDLE GetAwayMsg(MCONTACT hContact) override;
HANDLE SearchBasic(const wchar_t *id) override;
- HANDLE SearchByEmail(const wchar_t *email) override;
HANDLE SearchByName(const wchar_t *nick, const wchar_t *firstName, const wchar_t *lastName) override;
int SendMsg(MCONTACT hContact, MEVENT hReplyEvent, const char *msg) override;
HANDLE SendFile(MCONTACT hContact, const wchar_t *szDescription, wchar_t **ppszFiles) override;
diff --git a/protocols/VKontakte/src/vk_search.cpp b/protocols/VKontakte/src/vk_search.cpp
index ca6de0e276..8a3b85ef58 100644
--- a/protocols/VKontakte/src/vk_search.cpp
+++ b/protocols/VKontakte/src/vk_search.cpp
@@ -27,16 +27,6 @@ HANDLE CVkProto::SearchBasic(const wchar_t *id)
return (HANDLE)1;
}
-HANDLE CVkProto::SearchByEmail(const wchar_t *email)
-{
- if (!IsOnline())
- return nullptr;
-
- Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/account.lookupContacts.json", true, &CVkProto::OnSearchByMail)
- << WCHAR_PARAM("contacts", email) << CHAR_PARAM("service", "email"));
- return (HANDLE)1;
-}
-
HANDLE CVkProto::SearchByName(const wchar_t *nick, const wchar_t *firstName, const wchar_t *lastName)
{
if (!IsOnline())