FIRTextMessage


@interface FIRTextMessage : 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 (readonly, nonatomic) NSString *_Nonnull text;
  • Timestamp of the chat message.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSTimeInterval timestamp;
  • User id of the message sender.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *_Nonnull userID;
  • Indicates whether this message is from the user that the suggestions are generated for.

    Declaration

    Objective-C

    @property (readonly, nonatomic) 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;