IOS-2325 Decorate is_pEp_user IOSAD-178
authorDirk Zimmermann <dz@pep.security>
Mon, 20 Jul 2020 17:00:22 +0200
branchIOSAD-178
changeset 1844e644bc06029d
parent 1843 0c1ab3384742
child 1845 143952e8d637
IOS-2325 Decorate is_pEp_user
pEpObjCAdapter/PEPInternalSession.m
     1.1 --- a/pEpObjCAdapter/PEPInternalSession.m	Mon Jul 20 17:00:22 2020 +0200
     1.2 +++ b/pEpObjCAdapter/PEPInternalSession.m	Mon Jul 20 17:00:22 2020 +0200
     1.3 @@ -959,8 +959,10 @@
     1.4                              error:(NSError * _Nullable * _Nullable)error
     1.5  {
     1.6      pEp_identity *ident = PEP_identityToStruct(identity);
     1.7 -    bool isPEP;
     1.8 -    PEPStatus status = (PEPStatus) is_pEp_user(self.session, ident, &isPEP);
     1.9 +    __block bool isPEP;
    1.10 +    PEPStatus status = (PEPStatus) [self runWithPasswords:^PEP_STATUS(PEP_SESSION session) {
    1.11 +        return is_pEp_user(session, ident, &isPEP);
    1.12 +    }];
    1.13  
    1.14      free_identity(ident);
    1.15