YOUPAILZLiveCloseAttachment.m 916 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // YOUPAILZLiveCloseAttachment.m
  3. // TIANYAN
  4. //
  5. // Created by CY on 2021/5/26.
  6. // Copyright © 2021 leo. All rights reserved.
  7. //
  8. #import "YOUPAILZLiveCloseAttachment.h"
  9. @implementation YOUPAILZLiveCloseAttachment
  10. - (NSString *)encodeAttachment{
  11. NSDictionary *dict = @{
  12. CMType : @(CustomOnLiveClose),
  13. CMData : @{
  14. CMRoomId: self.roomid?self.roomid:@"",
  15. }
  16. };
  17. NSData *data = [NSJSONSerialization dataWithJSONObject:dict
  18. options:0
  19. error:nil];
  20. NSString *content = nil;
  21. if (data) {
  22. content = [[NSString alloc] initWithData:data
  23. encoding:NSUTF8StringEncoding];
  24. }
  25. return content;
  26. }
  27. @end