Let only the LogOut request be confirmed via ack

This commit is contained in:
Lonami Exo
2017-04-11 09:52:44 +02:00
parent 3e611cdd42
commit 6d1ce4d48d
3 changed files with 13 additions and 7 deletions

View File

@@ -228,11 +228,15 @@ class MtProtoSender:
return self.handle_bad_msg_notification(msg_id, sequence, reader)
# msgs_ack, it may handle the request we wanted
if self.ack_requests_confirm and code == 0x62d6b459:
if code == 0x62d6b459:
ack = reader.tgread_object()
if request and request.msg_id in ack.msg_ids:
Log.w('Message ack confirmed a request')
request.confirm_received = True
Log.w('Ack found for the current request ID')
if self.ack_requests_confirm:
Log.w('Message ack confirmed a request')
request.confirm_received = True
return False
# If the code is not parsed manually, then it was parsed by the code generator!