WFCCUnknownMessageContent.m 678 B

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // WFCCUnknownMessageContent.m
  3. // WFChatClient
  4. //
  5. // Created by heavyrain on 2017/8/16.
  6. // Copyright © 2017年 WildFireChat. All rights reserved.
  7. //
  8. #import "WFCCUnknownMessageContent.h"
  9. #import "WFCCIMService.h"
  10. #import "Common.h"
  11. @implementation WFCCUnknownMessageContent
  12. - (WFCCMessagePayload *)encode {
  13. return nil;
  14. }
  15. - (void)decode:(WFCCMessagePayload *)payload {
  16. self.orignalType = payload.contentType;
  17. }
  18. + (int)getContentType {
  19. return MESSAGE_CONTENT_TYPE_UNKNOWN;
  20. }
  21. + (int)getContentFlags {
  22. return WFCCPersistFlag_PERSIST;
  23. }
  24. - (NSString *)digest {
  25. return [NSString stringWithFormat:@"未知类型消息(%zd)", self.orignalType];
  26. }
  27. @end