WFCCFriendRequest.m 703 B

12345678910111213141516171819202122232425262728
  1. //
  2. // WFCCFriendRequest.m
  3. // WFChatClient
  4. //
  5. // Created by heavyrain on 2017/10/17.
  6. // Copyright © 2017年 WildFireChat. All rights reserved.
  7. //
  8. #import "WFCCFriendRequest.h"
  9. @implementation WFCCFriendRequest
  10. -(id)toJsonObj {
  11. NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
  12. dict[@"direction"] = @(self.direction);
  13. dict[@"target"] = self.target;
  14. if(self.reason.length)
  15. dict[@"reason"] = self.reason;
  16. if(self.extra.length)
  17. dict[@"extra"] = self.extra;
  18. dict[@"status"] = @(self.status);
  19. dict[@"readStatus"] = @(self.readStatus);
  20. [self setDict:dict key:@"timestamp" longlongValue:self.timestamp];
  21. return dict;
  22. }
  23. @end