LCIMMessage

Objective-C

@interface LCIMMessage : NSObject <NSCopying, NSCoding>

@property (nonatomic, assign, readonly) LCIMMessageMediaType mediaType;

/*!
 * 表示接收和发出的消息
 */
@property (nonatomic, assign, readonly) LCIMMessageIOType ioType;

/*!
 * 表示消息状态
 */
@property (nonatomic, assign, readonly) LCIMMessageStatus status;

/*!
 * 消息 id
 */
@property (nonatomic, strong, readonly, nullable) NSString *messageId;

/*!
 * 消息发送/接收方 id
 */
@property (nonatomic, strong, readonly, nullable) NSString *clientId;

/*!
 * A flag indicates whether this message mentions all members in conversation or not.
 */
@property (nonatomic, assign, readwrite) BOOL mentionAll;

/*!
 * An ID list of clients who mentioned by this message.
 */
@property (nonatomic, strong, readwrite, nullable) NSArray<NSString *> *mentionList;

/*!
 * Whether current client is mentioned by this message.
 */
@property (nonatomic, assign, readonly) BOOL mentioned;

/*!
 * 消息所属对话的 id
 */
@property (nonatomic, strong, readonly, nullable) NSString *conversationId;

/*!
 * 消息文本
 */
@property (nonatomic, strong, readonly, nullable) NSString *content;

/*!
 * 发送时间(精确到毫秒)
 */
@property (nonatomic, assign, readonly) int64_t sendTimestamp;

/*!
 * 接收时间(精确到毫秒)
 */
@property (nonatomic, assign, readonly) int64_t deliveredTimestamp;

/*!
 * 被标记为已读的时间(精确到毫秒)
 */
@property (nonatomic, assign, readonly) int64_t readTimestamp;

/*!
 The message update time.
 */
@property (nonatomic, strong, readonly, nullable) NSDate *updatedAt;

- (NSString * _Nullable)payload;

/*!
 创建文本消息。
 @param content - 消息文本.
 */
+ (instancetype)messageWithContent:(NSString *)content;

@end

Swift

class LCIMMessage : NSObject, NSCopying, NSCoding

Undocumented

  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly) LCIMMessageMediaType mediaType

    Swift

    var mediaType: LCIMMessageMediaType { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly) LCIMMessageIOType ioType;

    Swift

    var ioType: LCIMMessageIOType { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly) LCIMMessageStatus status;

    Swift

    var status: LCIMMessageStatus { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSString *messageId;

    Swift

    var messageId: String? { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSString *clientId;

    Swift

    var clientId: String? { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic) BOOL mentionAll;

    Swift

    var mentionAll: Bool { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSArray<NSString *> *mentionList;

    Swift

    var mentionList: [String]? { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL mentioned;

    Swift

    var mentioned: Bool { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSString *conversationId;

    Swift

    var conversationId: String? { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSString *content;

    Swift

    var content: String? { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly) int64_t sendTimestamp;

    Swift

    var sendTimestamp: Int64 { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly) int64_t deliveredTimestamp;

    Swift

    var deliveredTimestamp: Int64 { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly) int64_t readTimestamp;

    Swift

    var readTimestamp: Int64 { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSDate *updatedAt;

    Swift

    var updatedAt: Date? { get }
  • Undocumented

    Declaration

    Objective-C

    - (NSString * _Nullable)payload;

    Swift

    func payload() -> String?
  • Undocumented

    Declaration

    Objective-C

    + (nonnull instancetype)messageWithContent:(nonnull NSString *)content;

    Swift

    convenience init(content: String)