summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_proto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/VKontakte/src/vk_proto.cpp')
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp
index 07740f4725..47bc8171d1 100644
--- a/protocols/VKontakte/src/vk_proto.cpp
+++ b/protocols/VKontakte/src/vk_proto.cpp
@@ -129,8 +129,8 @@ void CVkProto::SendMsgAck(void *param)
int CVkProto::SendMsg(HANDLE hContact, int flags, const char *msg)
{
- ptrA szID( getStringA(hContact, "ID"));
- if (szID == NULL)
+ LONG userID = getDword(hContact, "ID", -1);
+ if (userID == -1)
return 0;
ptrA szMsg;
@@ -141,6 +141,8 @@ int CVkProto::SendMsg(HANDLE hContact, int flags, const char *msg)
else
msg = mir_utf8encode(msg);
+ char szID[40];
+ _itoa(userID, szID, 10);
HttpParam params[] = {
{ "type", "0" },
{ "uid", szID },