NIMMessageReceipt.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // NIMMessageReceipt.h
  3. // NIMLib
  4. //
  5. // Created by Netease.
  6. // Copyright © 2016 Netease. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @class NIMSession;
  11. @class NIMMessage;
  12. /**
  13. * 已读回执
  14. */
  15. @interface NIMMessageReceipt : NSObject
  16. /**
  17. * 已读回执对应的会话
  18. */
  19. @property (nullable,nonatomic,copy,readonly) NIMSession *session;
  20. /**
  21. * 时间戳
  22. * @discussion 发送已读回执时,这个字段需要被设置为当前会话中的最后一条消息时间戳
  23. * 接受已读回执时,这个字段表示在这个时间戳之前的消息都已读
  24. * 此字段支持 P2P 会话类型
  25. */
  26. @property (nonatomic,assign,readonly) NSTimeInterval timestamp;
  27. /**
  28. * 消息 Id
  29. * @discussion 只有 Team 会话有效,表示已读的这条消息的 Id
  30. */
  31. @property (nonatomic,copy,readonly) NSString *messageId;
  32. /**
  33. * 通过最后一条消息构造已读回执
  34. *
  35. * @param message 会话中的最后一条消息
  36. *
  37. * @return 已读回执实例
  38. */
  39. - (instancetype)initWithMessage:(NIMMessage *)message;
  40. @end
  41. NS_ASSUME_NONNULL_END