Suggestions

close search

StringeeConversation

public class StringeeConversation



Represents a conversation returned by StringeeChat APIs.



Summary


Properties
String? id

Conversation id.

String? name

Conversation name.

bool? isGroup

Whether this is a group conversation.

String? creator

Conversation creator id.

int? totalUnread

Total unread message count.

int? updatedAt

Last updated timestamp.

int? createdAt

Created timestamp.

Map<dynamic, dynamic>? text

Last message text payload.

StringeeMessage? lastMsg

Last message object.

String? pinnedMsgId

Pinned message id.

List<StringeeUser>? participants

Conversation participants.

String? oaId

OA id for OA conversations.

String? customData

Custom data for this conversation.

Public methods
Future<Map<dynamic, dynamic>> sendChatTranscript(String email, String domain)

Sends this live chat transcript to an email address.

Future<Map<dynamic, dynamic>> endChat()

Ends this live chat conversation.

Future<Map<dynamic, dynamic>> beginTyping()

Sends begin-typing state for this conversation.

Future<Map<dynamic, dynamic>> endTyping()

Sends end-typing state for this conversation.

Future<Map<dynamic, dynamic>> delete()

Deletes this conversation.

Future<Map<dynamic, dynamic>> addParticipants(List<StringeeUser> participants)

Adds participants to this conversation.

Future<Map<dynamic, dynamic>> removeParticipants(List<StringeeUser> participants)

Removes participants from this conversation.

Future<Map<dynamic, dynamic>> sendMessage(StringeeMessage message)

Sends a message to this conversation.

Future<Map<dynamic, dynamic>> getMessages(List<String> msgIds)

Gets messages by ids.

Future<Map<dynamic, dynamic>> getLocalMessages(int count)

Gets locally cached messages.

Future<Map<dynamic, dynamic>> getLastMessages(int count)

Gets latest messages from the server.

Future<Map<dynamic, dynamic>> getMessagesAfter(int count, int sequence)

Gets messages after a sequence.

Future<Map<dynamic, dynamic>> getMessagesBefore(int count, int sequence)

Gets messages before a sequence.

Future<Map<dynamic, dynamic>> updateConversation(String name)

Updates this conversation name.

Future<Map<dynamic, dynamic>> setRole(String userId, UserRole role)

Changes a user role in this conversation.

Future<Map<dynamic, dynamic>> deleteMessages(List<String> msgIds)

Deletes messages by ids.

Future<Map<dynamic, dynamic>> revokeMessages(List<String> msgIds, bool isDeleted)

Revokes messages by ids.

Future<Map<dynamic, dynamic>> markAsRead()

Marks this conversation as read.

Properties


id
Conversation id.
name
Conversation name.
isGroup
Whether this is a group conversation.
creator
Conversation creator id.
totalUnread
Total unread message count.
updatedAt
Last updated timestamp.
createdAt
Created timestamp.
text
Last message text payload.
lastMsg
Last message object.
pinnedMsgId
Pinned message id.
participants
Conversation participants.
oaId
OA id for OA conversations.
customData
Custom data for this conversation.

Public methods


sendChatTranscript(String email, String domain)
Sends this live chat transcript to an email address.
endChat()
Ends this live chat conversation.
beginTyping()
Sends begin-typing state for this conversation.
endTyping()
Sends end-typing state for this conversation.
delete()
Deletes this conversation.
addParticipants(List<StringeeUser> participants)
Adds participants to this conversation.
removeParticipants(List<StringeeUser> participants)
Removes participants from this conversation.
sendMessage(StringeeMessage message)
Sends a message to this conversation.
getMessages(List<String> msgIds)
Gets messages by ids.
getLocalMessages(int count)
Gets locally cached messages.
getLastMessages(int count)
Gets latest messages from the server.
getMessagesAfter(int count, int sequence)
Gets messages after a sequence.
getMessagesBefore(int count, int sequence)
Gets messages before a sequence.
updateConversation(String name)
Updates this conversation name.
setRole(String userId, UserRole role)
Changes a user role in this conversation.
deleteMessages(List<String> msgIds)
Deletes messages by ids.
revokeMessages(List<String> msgIds, bool isDeleted)
Revokes messages by ids.
markAsRead()
Marks this conversation as read.