IOSAD-21 no more @"me" in identity dicts IOSAD-21
authorEdouard Tisserant <edouard@pep-project.org>
Wed, 09 Aug 2017 14:43:30 +0200
branchIOSAD-21
changeset 19855e448e712a6
parent 196 d660aae03056
child 199 ddb64b65bb99
child 200 e619d4757dd7
IOSAD-21 no more @"me" in identity dicts
pEpObjCAdapter/PEPMessage.h
pEpObjCAdapter/PEPMessage.m
pEpObjCAdapter/PEPSession.h
pEpObjCTests/iOSTests.m
     1.1 --- a/pEpObjCAdapter/PEPMessage.h	Tue Jun 06 15:32:01 2017 +0200
     1.2 +++ b/pEpObjCAdapter/PEPMessage.h	Wed Aug 09 14:43:30 2017 +0200
     1.3 @@ -37,9 +37,6 @@
     1.4  /** The fingerprint for the key for this contact. */
     1.5  extern NSString *const _Nonnull kPepFingerprint;
     1.6  
     1.7 -/** NSNumber denoting a boolean, true if that identity was setup with mySelf() */
     1.8 -extern NSString *const _Nonnull kPepIsMe;
     1.9 -
    1.10  /** In an email, the identity this email is from */
    1.11  extern NSString *const _Nonnull kPepFrom;
    1.12  
     2.1 --- a/pEpObjCAdapter/PEPMessage.m	Tue Jun 06 15:32:01 2017 +0200
     2.2 +++ b/pEpObjCAdapter/PEPMessage.m	Wed Aug 09 14:43:30 2017 +0200
     2.3 @@ -18,8 +18,6 @@
     2.4  
     2.5  NSString *const kPepFingerprint = @"fpr";
     2.6  
     2.7 -NSString *const kPepIsMe = @"me";
     2.8 -
     2.9  NSString *const kPepFrom = @"from";
    2.10  
    2.11  NSString *const kPepTo = @"to";
    2.12 @@ -194,10 +192,6 @@
    2.13          
    2.14          [dict setObject:[NSNumber numberWithInt: ident->comm_type] forKey:@"comm_type"];
    2.15          
    2.16 -        if (ident->me)
    2.17 -            [dict setObject:@YES forKey:@"me"];
    2.18 -        else
    2.19 -            [dict setObject:@NO forKey:@"me"];
    2.20      }
    2.21      return dict;
    2.22  }
    2.23 @@ -232,9 +226,6 @@
    2.24          if ([dict objectForKey:@"lang"])
    2.25              strncpy(ident->fpr, [[[dict objectForKey:@"lang"] precomposedStringWithCanonicalMapping] UTF8String], 2);
    2.26          
    2.27 -        if ([[dict objectForKey:@"me"] isEqual: @YES])
    2.28 -            ident->me = true;
    2.29 -        
    2.30          if ([dict objectForKey:@"comm_type"])
    2.31              ident->comm_type = [[dict objectForKey:@"comm_type"] intValue];
    2.32      }
     3.1 --- a/pEpObjCAdapter/PEPSession.h	Tue Jun 06 15:32:01 2017 +0200
     3.2 +++ b/pEpObjCAdapter/PEPSession.h	Wed Aug 09 14:43:30 2017 +0200
     3.3 @@ -76,7 +76,6 @@
     3.4   @"lang": preferred languageID for communication with this ID (default: @"en")
     3.5   @"fpr": fingerprint of key to use for communication with this ID
     3.6   @"comm_type": communication type code (usually not needed)
     3.7 - @"me": YES if this is an identity of our user, NO if it is one of a communication partner (default: NO)
     3.8   
     3.9   As an example:
    3.10   
     4.1 --- a/pEpObjCTests/iOSTests.m	Tue Jun 06 15:32:01 2017 +0200
     4.2 +++ b/pEpObjCTests/iOSTests.m	Wed Aug 09 14:43:30 2017 +0200
     4.3 @@ -791,10 +791,8 @@
     4.4  encmsg[@"outgoing"] = @NO;
     4.5  [encmsg[@"from"] removeObjectForKey:@"fpr"];
     4.6  [encmsg[@"from"] removeObjectForKey:@"user_id"];
     4.7 -[encmsg[@"from"] removeObjectForKey:@"me"];
     4.8  [encmsg[@"to"][0] removeObjectForKey:@"fpr"];
     4.9  [encmsg[@"to"][0] removeObjectForKey:@"user_id"];
    4.10 -[encmsg[@"to"][0] removeObjectForKey:@"me"];
    4.11  
    4.12  {
    4.13      NSMutableDictionary *msg = [encmsg copy];