Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. - (instancetype)initWithMRMessage:(MRMessage *)message pid:(NSString *)pid
  2. {
  3. // super init; etc
  4.  
  5. _pid = pid;
  6. MRParameterAssertOrReturnNil(_pid);
  7.  
  8. auto profilePID = message.conversation.profilePID;
  9. if (_pid)
  10. {
  11. _uid = [_pid substringFromIndex:profilePID.length + 1];
  12. }
  13.  
  14. _participantUID = message.participantUid;
  15.  
  16.  
  17. if (!_participantUID)
  18. {
  19. if (_outgoing)
  20. {
  21. NSString *profileUID = nil;
  22. [OBJCIM_Profile parsePidToComponents:_pid profileUID:&profileUID profilePID:nullptr service:nullptr contactUID:nil];
  23. _participantUID = profileUID;
  24. }
  25. else
  26. {
  27. _participantUID = _uid;
  28. }
  29. }
  30.  
  31. // ....
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement