You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// The ID of the conversation that the message belongs to
18
+
String conversationId;
19
+
20
+
/// Identifies the message as either a User message or System message
21
+
MessageType type;
22
+
23
+
/// Contains an Array of User.id's that have read the message
24
+
List<String> readBy;
25
+
26
+
/// Contains the user ID for the person that sent the message
27
+
String senderId; // redundant since the user is always me, but keeps it consistant
28
+
29
+
/// Contains the message's text
30
+
String? text;
31
+
32
+
/// Only given if the message contains a file. An object with the URL and filesize (in bytes) of the given file.
33
+
Attachment? attachment;
34
+
35
+
/// Only given if the message contains a 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.
36
+
///
37
+
/// Example:
38
+
/// [51.481083, -3.178306]
39
+
List<double>? location;
40
+
41
+
SentMessage.fromJson(Map<String, dynamic> json)
42
+
: id = json['id'],
43
+
conversationId = json['conversationId'],
44
+
type = json['type'] =='UserMessage'?MessageType.UserMessage:MessageType.SystemMessage,
0 commit comments