123456789101112131415161718192021222324252627282930313233 |
- //
- // YOUPAILZChatRoomEmptyChatAttachment.m
- // VQU
- //
- // Created by CY on 2021/11/9.
- // Copyright © 2021 MS. All rights reserved.
- //
- #import "YOUPAILZChatRoomEmptyChatAttachment.h"
- @implementation YOUPAILZChatRoomEmptyChatAttachment
- - (NSString *)encodeAttachment{
- NSDictionary *dict = @{
- CMType : @(CustomOnChatRoomEmptyChat),
- CMData : @{
- CMClearMsg: self.clear_msg?self.clear_msg:@"",
- CMFrom: self.from_uid ?self.from_uid:@"",
- CMRoomId: self.roomid ?self.roomid:@"",
- }
- };
- NSData *data = [NSJSONSerialization dataWithJSONObject:dict
- options:0
- error:nil];
- NSString *content = nil;
- if (data) {
- content = [[NSString alloc] initWithData:data
- encoding:NSUTF8StringEncoding];
- }
- return content;
- }
- @end
|