IOSAD-72 mySelf uses userID directly from the engine
authorDirk Zimmermann <dirk@pep-project.org>
Thu, 15 Mar 2018 08:04:33 +0100
changeset 53379edad305d94
parent 532 775c55945da1
child 534 8cca11a32204
IOSAD-72 mySelf uses userID directly from the engine
pEpObjCAdapter/PEPInternalSession.m
pEpObjCTests/PEPSessionTest.m
     1.1 --- a/pEpObjCAdapter/PEPInternalSession.m	Thu Mar 15 08:04:32 2018 +0100
     1.2 +++ b/pEpObjCAdapter/PEPInternalSession.m	Thu Mar 15 08:04:33 2018 +0100
     1.3 @@ -445,7 +445,6 @@
     1.4  
     1.5  - (BOOL)mySelf:(nonnull PEPIdentity *)identity error:(NSError * _Nullable * _Nullable)error
     1.6  {
     1.7 -    NSString *userID = identity.userID;
     1.8      pEp_identity *ident = PEP_identityToStruct(identity);
     1.9  
    1.10      [self lockWrite];
    1.11 @@ -461,8 +460,6 @@
    1.12      [identity setValuesForKeysWithDictionary:PEP_identityDictFromStruct(ident)];
    1.13      free_identity(ident);
    1.14  
    1.15 -    identity.userID = userID;
    1.16 -
    1.17      return YES;
    1.18  }
    1.19  
     2.1 --- a/pEpObjCTests/PEPSessionTest.m	Thu Mar 15 08:04:32 2018 +0100
     2.2 +++ b/pEpObjCTests/PEPSessionTest.m	Thu Mar 15 08:04:33 2018 +0100
     2.3 @@ -110,7 +110,7 @@
     2.4  
     2.5      PEPIdentity *identMe = [[PEPIdentity alloc]
     2.6                              initWithAddress:@"pep.test.iosgenkey@pep-project.org"
     2.7 -                            userID:@"Me"
     2.8 +                            userID:@"pep.test.iosgenkey@pep-project.org_userID"
     2.9                              userName:@"pEp Test iOS GenKey"
    2.10                              isOwn:YES];
    2.11  
    2.12 @@ -150,7 +150,7 @@
    2.13          XCTAssertNil(innerError);
    2.14  
    2.15          XCTAssertNotNil(identMe3.fingerPrint);
    2.16 -        XCTAssertFalse([identMe3 isPEPUser:session]);
    2.17 +        XCTAssertTrue([identMe3 isPEPUser:session]);
    2.18          XCTAssertEqualObjects(identMe3.fingerPrint, identMe.fingerPrint);
    2.19  
    2.20          XCTAssertEqualObjects(identMe.address, identMe2.address);