Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mrDoctorWho/vk4xmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Smith <mrdoctorwho@helldev.net>2021-10-13 18:02:25 +0300
committerJohn Smith <mrdoctorwho@helldev.net>2021-10-13 18:02:25 +0300
commitfcf43fd1dcbfdf1dfa96e1700ab8f70880db4da1 (patch)
treed2e55f442155c260d6d4b2aa8e433cc1e308c788 /library
parente62597d79c15cab2ba1d62457b5943e4ad30d542 (diff)
Fix chatting with groups
Diffstat (limited to 'library')
-rw-r--r--library/longpoll.py6
-rw-r--r--library/vkapi.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/library/longpoll.py b/library/longpoll.py
index e62b1e0..74cfcd9 100644
--- a/library/longpoll.py
+++ b/library/longpoll.py
@@ -107,7 +107,9 @@ def processPollResult(user, data):
if typ == TYPE_MSG: # new message
message = None
- mid, flags, uid, date, subject, body, attachments = evt
+ mid, flags, uid, date, body, subject, attachments = evt
+ if subject:
+ subject = subject.get("title")
out = flags & FLAG_OUT
chat = (uid > MIN_CHAT_UID) # a groupchat always has uid > 2000000000
# there is no point to request messages if there's only a single emoji attachment
@@ -121,7 +123,7 @@ def processPollResult(user, data):
utils.runThread(user.sendMessages, (False, message, mid - 1, uid), "sendMessages-%s" % user.source)
elif typ == TYPE_MSG_READ_OUT:
- uid, mid = evt
+ uid, mid, _ = evt
cache = user.msgCacheByUser.get(uid)
if cache:
xmppMID = cache["xmpp"]
diff --git a/library/vkapi.py b/library/vkapi.py
index 05188e0..867afe2 100644
--- a/library/vkapi.py
+++ b/library/vkapi.py
@@ -31,7 +31,7 @@ APP_ID = 3789129
# VK APP scope
SCOPE = 69638
# VK API VERSION
-API_VERSION = "5.120"
+API_VERSION = "5.131"
socket.setdefaulttimeout(SOCKET_TIMEOUT)