MessagingDebugManagementService

interface MessagingDebugManagementService

Service interface that is used by messaging gateway services to add conversations and messages to the messaging service, as well as to observe and query outgoing messages.

Messages are collected in conversations. Conversations keep track of the message authors, their capabilities, and provides the display name of the backing messaging application. This way, separate messages do not need to contain this data, only the ID of the conversation they are part of.

Note: This debug service is a bit of a special case, in that it is debug in name but needs to be public. It is used for internal debugging of the messaging domain only, and not intended for production use.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val conversations: MirrorableMap<Uid<Conversation>, Conversation>

A map of all of the active conversations, synchronized with the user's connected device(s). Each conversation can be referenced with a unique Uid.

Link copied to clipboard
abstract val outbox: MirrorableMap<Uid<Message>, Message>

All outgoing messages.

Functions

Link copied to clipboard
abstract suspend fun addConversation(conversation: Conversation)

Adds the given conversation to the messaging service. If a conversation with the same Conversation.id exists, the call is ignored.

Link copied to clipboard
abstract suspend fun addMessage(message: Message)

Adds the specified message to the messaging service. If no conversation with the specified Message.conversationId exists, this call is ignored. If a message with the same Message.id exists, it will be replaced.

Link copied to clipboard
abstract suspend fun removeConversation(id: Uid<Conversation>)

Removes the conversation with the specified id. If no conversation with id exists, the call is ignored.

Link copied to clipboard
abstract suspend fun removeMessage(id: Uid<Message>)

Removes the message with the specified id. If no message with id exists, the call is ignored.

Link copied to clipboard
abstract suspend fun updateConversation(conversation: Conversation)

Updates the conversation with the same Conversation.id, as the specified conversation with the values in conversation. If no conversation with Conversation.id exists, the call is ignored.

Link copied to clipboard
abstract suspend fun updateMessage(message: Message)

Updates an existing message with the same Message.id with the specified message. If no message with Message.id exists, the call is ignored.