TUILocalTipsCellData.m 955 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // TUILocalTipsCellData.m
  3. // TUIChat
  4. //
  5. // Created by yiliangwang on 2025/3/18.
  6. // Copyright © 2025 Tencent. All rights reserved.
  7. //
  8. #import "TUILocalTipsCellData.h"
  9. @implementation TUILocalTipsCellData
  10. + (TUIMessageCellData *)getCellData:(V2TIMMessage *)message {
  11. NSDictionary *param = [NSJSONSerialization JSONObjectWithData:message.customElem.data options:NSJSONReadingAllowFragments error:nil];
  12. TUILocalTipsCellData *cellData = [[TUILocalTipsCellData alloc] initWithDirection:MsgDirectionIncoming];
  13. cellData.innerMessage = message;
  14. cellData.msgID = message.msgID;
  15. cellData.content = param[@"content"];
  16. cellData.reuseId = TSystemMessageCell_ReuseId;
  17. return cellData;
  18. }
  19. + (NSString *)getDisplayString:(V2TIMMessage *)message {
  20. NSDictionary *param = [NSJSONSerialization JSONObjectWithData:message.customElem.data options:NSJSONReadingAllowFragments error:nil];
  21. return param[@"content"];
  22. }
  23. @end