YOUPAILZChatRoomReloadSeatAttachment.m 996 B

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