Skip to main content

onAppAddedToConversation

The App has been added to a conversation.
Use this event to welcome participants and explain how the App works.

Received properties

conversation

Details of the conversation the App joined, provided as a ConversationData object:

  • id — Unique conversation ID (QualifiedId).
  • name — Conversation name. Null for 1:1 conversations.
  • teamId — Team ID the conversation belongs to. Null for 1:1 conversations.
  • mlsGroupId — Opaque identifier a conversation.
  • type — Conversation type:
    • GROUP — A group conversation or channel that can include one or more members.
    • ONE_TO_ONE — A direct conversation between one user and the App.
    • SELF — A conversation containing only the App.

members

List of members in the conversation, represented by ConversationMember objects. Each member includes:

  • userId — Unique user ID (QualifiedId).
  • role — The user’s role in the conversation: ADMIN or MEMBER.

Sample usage

Send welcome message

override suspend fun onAppAddedToConversation(
conversation: ConversationData,
members: List<ConversationMember>
) {
val message = WireMessage.Text.create(
conversationId = conversation.id,
text = "👋 Hi there! You can use `/remind [text]` to set personal reminders."
)

manager.sendMessageSuspending(message = message)
}