Home / @sym20/core-conversations

core-conversations package

This package provides APIs to access Symphony Conversation Stores

Remarks

A conversation is a group of users sharing messages with each other. These users are said to be members of the conversation. This API exposes endpoints for fetching and updating conversations, as well as fetching and modifying the conversations' member set.

Conversation types

Conversations come in two flavours

Direct message

A direct message conversation (also known as IM) is an unnamed informal private conversation between two users. No additional members can be added, and no conversation settings can be changed. The two users are regular members of the conversation. There is a legacy of multi-member direct message conversations, so while a conversation cannot be created with more than two members, a returned conversation can include more.

The settings of a direct message conversation are global, i.e. they are identical and applicable for all users.

Room

A room is a more formal form of conversation with an unlimited amount of members. A room's purpose is for named, long lived conversations that can be customized with a wide variety of settings.

The room's settings are global, i.e. they are identical and applicable for all users:

Owners and members

A conversation has one or more owners that have special privileges. They can for example change the conversation's name and general configuration. See the description for the configuration property for details about the configuration options.

In addition to the owners there are zero or more regular members. Regular members are allowed to read the conversation messages, and depending on the configuration, allowed to send messages.

Joining a conversation

An owner of the conversation can add members either explicitly, or by accepting join requests. Depending on the configuration members of the conversation can add other users, or users can add themselves as members.

Interfaces

InterfaceDescription
IConversationIM

A direct message conversation (also known as IM) is an unnamed informal private conversation between two users.

IConversationRoom

A room is a named conversation with an unlimited amount of members. Rooms has a wide variety of configuration options to control its behaviour.

IConversationStore

A store that contains all conversatins that the user is allowed to access

IMember

A participant in a conversation. It includes just some basic user information needed to display user information in non-user views. The user ID can be used to fetch more information about the user via the user service.

IMemberCreate

Request body used to add a member to a conversation.

IMemberUpdate

Request body used to add a member to a conversation.

IReceivedJoinRequest

A request to join a conversation made by a user. The existance of an instance implies that the request is pending and that the acting user is eligible to accept or ignore it.

IReceivedJoinRequestStore

This is a store that contains all join requests that other users have sent, requesting to join conversations where the current user is an owner.

IRoomSettingsCreate

Settings configuration used when creating a room. Properties that are not specified will be set to default values. TODO: specify default values.

IRoomSettingsUpdate

Settings configuration used when updating a room. Only properties that are specified will be updated, the rest will be untouched. All specified properties will replace the previous value unless the property describes a different behaviour.

ISentJoinRequest

A request by the acting user to become a member of a conversation. The existance of an instance implies that the request is still pending.

ISentJoinRequestStore

This is a store that contains all pending join requests where the current user has requested to join various conversations.

Namespaces

NamespaceDescription
IConversationStore
IReceivedJoinRequestStore
ISentJoinRequestStore

Variables

VariableDescription
ConversationType

Types

Type AliasDescription
ConversationId
ConversationType

Available types of conversation: * IM - A private direct message conversation. * ROOM - A fully configurable named room.

IConversation

A conversation is a group of users sharing messages. These users are said to be members of the conversation.

JoinRequestId
Timestamp
UserId

Exceptions

ExceptionDescription
AlreadyAMember

The request could not be handled because the acting user is already a member of the conversation.

ApplicationError
BannedUser

The member is banned from the conversation and couldn't be added to it.

ConversationInactive

The member set cannot be modified in an inactive conversation.

ConversationNotFound

The requested conversation was not found, or it is not available to the acting user.

InactiveMembersInConversation

At least one of the specified users is inactive and cannot be added to the conversation.

InformationBarrierViolation

TODO/ describe what this means.

JoinRequestNotFound

The specified join request was not found.

MemberNotFound

The requested user is not a member of the conversation.

NoOwnerInConversation

Carrying out the request would leave the conversation without an owner, which is forbidden.

NotAPrivateRoom

The request is only valid for a private conversation of type room and the involved conversation is of another type, or is public.

NotARoom

The request is only valid for a conversation of type room and involved a conversation of another type.

RoomNameNotUnique

The name given to the room is not unique, or it is too similar to an already existing name.

RoomNameTooLong

The name given to the room is too long.

TooManyMembersInConversation

The request resulted in a simplified room with more than 8 members including the owner, which is forbidden. Change the conversation into a regular room to allow more members.

UserConnectionMissing

TODO/ describe what this means.

UserInactive

The request couldn't be handled because the user involved is inactive.

UserNotEntitled

The request was rejected due to the acting user not being entitled to carry it out.

UserNotFound

The requested user was not found.