Page Summary
-
TextMessageobjects represent individual chat messages with properties for text, timestamp, user ID, and local user status. -
These objects are primarily used as input for Smart Reply functionality.
-
Each message is associated with sender information, content, and a timestamp indicating when it was sent.
-
You can create a
TextMessageinstance using the designated initializer providing the necessary details.
TextMessage
class TextMessage : NSObjectA single chat message, to be used as an array element for input to Smart Reply.
-
Text of the chat message.
Declaration
Swift
var text: String { get } -
Timestamp of the chat message.
Declaration
Swift
var timestamp: TimeInterval { get } -
User id of the message sender.
Declaration
Swift
var userID: String { get } -
Indicates whether this message is from the user that the suggestions are generated for.
Declaration
Swift
var isLocalUser: Bool { get } -
Constructs a chat message.
Declaration
Swift
init(text: String, timestamp: TimeInterval, userID: String, isLocalUser: Bool)Parameters
textChat message text
timestampTime of message in seconds calculated from Unix Time.
userIDUser ID of the message sender.
isLocalUserWhether this message is from the user that the suggestions are generated for.
-
Unavailable.