Message class
A TalkJS message, used as part of {@link Session.on}
- Annotations
-
- @JS()
- @anonymous
Constructors
- Message()
-
factory
Properties
- attachment ↔ dynamic
-
Only given if the message's
type
equals"media"
. An object with the URL and filesize (in bytes) of the given file.getter/setter pair - body ↔ String
-
Contains the message's content
getter/setter pair
- conversation ↔ ConversationData
-
Contains the {@link ConversationData} that the message belongs to.
getter/setter pair
- custom ↔ dynamic
-
Custom metadata that is stored with the conversation
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- isByMe ↔ bool
-
'true' if the message was sent by the current user.
getter/setter pair
-
location
↔ List<
num> ? -
Only given if the message's
type
equals"location"
. An array of two numbers which represent the longitude and latitude of this location, respectively. Only given if this message is a shared location.getter/setter pair - origin ↔ String
-
Determines how this message was sent: respectively, Via a web browser (or mobile Webview), via the REST API, via reply-to-email, or using the import API.
getter/setter pair
- read ↔ bool
-
'true' if the message has been read, 'false' has not been seen yet
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sender ↔ UserData?
-
The {@link User} that sent the message
getter/setter pair
- senderId ↔ String?
-
The senderID (userID) for the person that sent the message
getter/setter pair
- timestamp ↔ num
-
UNIX timestamp specifying when the message was sent (UTC, in milliseconds)
getter/setter pair
- type ↔ String
-
Specifies if if the message is media (file), text or a shared location
"media" | "text" | "location"
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited