| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- //
- // KSLiveChatroomUserQuit.m
- // KulexiuForTeacher
- //
- // Created by Kyle on 2022/3/30.
- //
- #import "KSLiveChatroomUserQuit.h"
- @implementation KSLiveChatroomUserQuit
- - (NSData *)encode {
- NSMutableDictionary *multableDict = [NSMutableDictionary dictionary];
- if (self.userId) {
- [multableDict setObject:self.userId forKey:@"userId"];
- } else {
- [multableDict setObject:@"" forKey:@"userId"];
- }
- if (self.userName) {
- [multableDict setObject:self.userName forKey:@"userName"];
- } else {
- [multableDict setObject:@"" forKey:@"userName"];
- }
- return [NSJSONSerialization dataWithJSONObject:multableDict options:kNilOptions error:nil];
- }
- - (void)decodeWithData:(NSData *)data {
- if (data == nil) return;
- NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
- NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
- if (json == nil) return;
- self.userId = [json stringValueForKey:@"userId"];
- self.userName = [json stringValueForKey:@"userName"];
- }
- + (NSString *)getObjectName {
- return @"RC:LookerLoginOut";
- }
- - (NSArray<NSString *> *)getSearchableWords {
- return nil;
- }
- + (RCMessagePersistent)persistentFlag {
- return MessagePersistent_NONE;
- }
- @end
|