// // TXLiveMessageDownSeatAll.m // StudentDaya // // Created by 王智 on 2023/2/28. // Copyright © 2023 DayaMusic. All rights reserved. // #import "TXLiveMessageDownSeatAll.h" @implementation TXLiveMessageDownSeatAll - (NSData *)encodeMessage { NSMutableDictionary *parm = [NSMutableDictionary dictionary]; NSMutableDictionary *content = [NSMutableDictionary dictionary]; [content setValue:[self.userInfo getUserInfoDic] forKey:@"sendUserInfo"]; [parm setValue:content forKey:@"content"]; [parm setValue:self.objectName forKey:@"objectName"]; return [NSJSONSerialization dataWithJSONObject:parm options:kNilOptions error:nil]; } - (NSDictionary *)decodeData:(NSData *)data { if (data == nil) return nil; NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil]; NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary]; if (json == nil) return nil; return json; } - (void)evaluateSource:(NSDictionary *)msgDic { NSDictionary *content = [msgDic ks_dictionaryValueForKey:@"content"]; self.userInfo = [TXLiveUser evaluateUserInfo:[content ks_dictionaryValueForKey:@"sendUserInfo"]]; } + (NSString *)getObjectName { return @"RC:Chatroom:DownSeatAll"; } - (NSString *)objectName { return @"RC:Chatroom:DownSeatAll"; } @end