Better SESSION_REVOKED handling

This commit is contained in:
Peter 2015-08-10 12:01:40 +02:00
parent fd51c954fb
commit c089a42464

View File

@ -553,7 +553,8 @@
[delegate requestMessageServiceAuthorizationRequired:self];
}
if ([rpcError.errorDescription rangeOfString:@"SESSION_REVOKED"].location != NSNotFound)
MTProto *mtProto = _mtProto;
if (mtProto.requiredAuthToken != nil && [rpcError.errorDescription rangeOfString:@"SESSION_REVOKED"].location != NSNotFound)
{
if (request.errorContext == nil)
request.errorContext = [[MTRequestErrorContext alloc] init];