KSRejectAllSeatMessage.m 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // KSRejectAllSeatMessage.m
  3. // TeacherDaya
  4. //
  5. // Created by 王智 on 2022/7/18.
  6. // Copyright © 2022 DayaMusic. All rights reserved.
  7. //
  8. #import "KSRejectAllSeatMessage.h"
  9. @implementation KSRejectAllSeatMessage
  10. - (NSData *)encode {
  11. NSMutableDictionary *multableDict = [NSMutableDictionary dictionary];
  12. if (self.senderUserInfo) {
  13. [multableDict setObject:[self encodeUserInfo:self.senderUserInfo] forKey:@"user"];
  14. }
  15. return [NSJSONSerialization dataWithJSONObject:multableDict options:kNilOptions error:nil];
  16. }
  17. - (void)decodeWithData:(NSData *)data {
  18. if (data == nil) return;
  19. NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
  20. NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
  21. if (json == nil) return;
  22. NSDictionary *userinfoDic = dictionary[@"user"];
  23. [self decodeUserInfo:userinfoDic];
  24. }
  25. + (NSString *)getObjectName {
  26. return @"RC:Chatroom:RejectSeatAll";
  27. }
  28. - (NSArray<NSString *> *)getSearchableWords {
  29. return nil;
  30. }
  31. + (RCMessagePersistent)persistentFlag {
  32. return MessagePersistent_NONE;
  33. }
  34. @end