MLKTextMessage
@interface MLKTextMessage : NSObject
A single chat message, to be used as an array element for input to Smart Reply.
-
Text of the chat message.
Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull text;
-
Timestamp of the chat message.
Declaration
Objective-C
@property (nonatomic, readonly) NSTimeInterval timestamp;
-
User id of the message sender.
Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull userID;
-
Indicates whether this message is from the user that the suggestions are generated for.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL isLocalUser;
-
Constructs a chat message.
Declaration
Objective-C
- (nonnull instancetype)initWithText:(nonnull NSString *)text timestamp:(NSTimeInterval)timestamp userID:(nonnull NSString *)userID isLocalUser:(BOOL)isLocalUser;
Parameters
text
Chat message text
timestamp
Time of message in seconds calculated from Unix Time.
userID
User ID of the message sender.
isLocalUser
Whether this message is from the user that the suggestions are generated for.
-
Unavailable.
Declaration
Objective-C
- (nonnull instancetype)init;