NIMRevokeMessageNotification.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. //
  2. // NIMRevokeMessageNotification.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. typedef NS_ENUM(NSInteger, NIMRevokeMessageNotificationType) {
  16. /**
  17. * 点对点消息撤回通知
  18. */
  19. NIMRevokeMessageNotificationTypeP2P = 7,
  20. /**
  21. * 群消息撤回通知
  22. */
  23. NIMRevokeMessageNotificationTypeTeam = 8,
  24. /**
  25. * 超大群撤回通知
  26. */
  27. NIMRevokeMessageNotificationTypeSuperTeam = 12,
  28. /**
  29. * 点对点消息单向撤回
  30. */
  31. NIMRevokeMessageNotificationTypeP2POneWay = 13,
  32. /**
  33. * 群消息单向撤回类型
  34. */
  35. NIMRevokeMessageNotificationTypeTeamOneWay = 14,
  36. };
  37. /**
  38. * 撤回通知
  39. */
  40. @interface NIMRevokeMessageNotification : NSObject
  41. /**
  42. * 撤回消息类型
  43. */
  44. @property (nonatomic,assign,readonly) NIMRevokeMessageNotificationType notificationType;
  45. /**
  46. * 撤回消息发起者
  47. */
  48. @property (nonatomic,copy,readonly) NSString *fromUserId;
  49. /**
  50. * 消息的发送者,表示撤回的这条消息是谁发的
  51. */
  52. @property (nonatomic,copy,readonly) NSString *messageFromUserId;
  53. /**
  54. * 撤回消息所属会话
  55. */
  56. @property (nonatomic,copy,readonly) NIMSession *session;
  57. /**
  58. * 撤回消息时间点
  59. * @discussion 这里的时间点指的是被撤回的那条消息到底服务器的时间,而不是撤回指令到达服务器的时间点
  60. */
  61. @property (nonatomic,assign,readonly) NSTimeInterval timestamp;
  62. /**
  63. * 撤回消息内容
  64. * @discussion 当撤回消息未被当前设备接收时,这个字段为 nil
  65. */
  66. @property (nullable,nonatomic,strong,readonly) NIMMessage *message;
  67. /**
  68. * 撤回操作是否属于漫游消息
  69. */
  70. @property (nonatomic, readonly, getter=isRoaming) BOOL roaming;
  71. /**
  72. * 撤回的附言
  73. */
  74. @property(nullable, nonatomic, copy) NSString *postscript;
  75. @end
  76. NS_ASSUME_NONNULL_END