WFCCDeliveryReport.m 649 B

12345678910111213141516171819202122232425
  1. //
  2. // WFCCConversation.m
  3. // WFChatClient
  4. //
  5. // Created by heavyrain on 2017/8/16.
  6. // Copyright © 2017年 WildFireChat. All rights reserved.
  7. //
  8. #import "WFCCDeliveryReport.h"
  9. @implementation WFCCDeliveryReport
  10. +(instancetype)delivered:(NSString *)userId
  11. timestamp:(long long)timestamp {
  12. WFCCDeliveryReport *d = [[WFCCDeliveryReport alloc] init];
  13. d.userId = userId;
  14. d.timestamp = timestamp;
  15. return d;;
  16. }
  17. - (id)toJsonObj {
  18. NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
  19. dict[@"key"] = self.userId;
  20. [self setDict:dict key:@"value" longlongValue:self.timestamp];
  21. return dict;
  22. }
  23. @end