This service is available via Telligent.Evolution.Extensibility.Apis.Get<Telligent.Evolution.Extensibility.Api.Version1.IConversations>() and is defined in Telligent.Evolution.Platform.dll
Events
Events.AfterDelete
Handler
void ConversationAfterDeleteEventHandler(ConversationAfterDeleteEventArgs e);
Events.AfterParticipantsUpdate
Handler
void ConversationAfterParticipantsUpdateEventHandler(ConversationAfterParticipantsUpdateEventArgs e);
Events.AfterRead
Handler
void ConversationAfterReadEventHandler(ConversationAfterReadEventArgs e);
Properties
| Name | Type | Description | Default | Options |
|---|---|---|---|---|
| ContentTypeId | Guid | Content type identifier for conversations |
Methods
bool CanStartConversationWith(string userName);
Identifies whether the accessing user can start a conversation with the provided user.
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| userName | string | User Name | Required |
Return Type
bool
int Count(string readStatus);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| readStatus | string | Read status | Required | NotSet, Read, Unread |
Return Type
int
Conversation Create(string subject, string body, string usernames);
Creates a new conversation. Obsolete in v.10.0: Subject is no longer used. Use Create(body, usernames) instead.
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| subject | string | Subject of the conversation's first message. Obsolete in v.10.0: Subject is no longer saved. | Required | ||
| body | string | Body of the conversation's first message | Required | ||
| usernames | string | One or more usernames to include in the conversation (comma separated). | Required |
Return Type
Conversation Create(string body, string usernames);
Creates a new conversation
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| body | string | Body of the conversation's first message | Required | ||
| usernames | string | One or more usernames to include in the conversation (comma separated). | Required |
Return Type
Conversation Create(string subject, string body, string usernames, IList<int> readParticipants);
Creates a new conversation. Obsolete in v.10.0: Subject is no longer used. Use Create(body, usernames) instead.
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| subject | string | Subject of the conversation's first message. Obsolete in v.10.0: Subject is no longer saved. | Required | ||
| body | string | Body of the conversation's first message | Required | ||
| usernames | string | One or more usernames to include in the conversation (comma separated). | Required | ||
| readParticipants | IList<int> | Read participants | Required |
Return Type
Conversation Create(string body, string usernames, IList<int> readParticipants);
Creates a new conversation
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| body | string | Body of the conversation's first message | Required | ||
| usernames | string | One or more usernames to include in the conversation (comma separated). | Required | ||
| readParticipants | IList<int> | Read participants | Required |
Return Type
AdditionalInfo Delete(Guid id);
Delete/hide a conversation. The conversation will be deleted when all participants delete or leave the conversation. If any participant replies, all participants who deleted the conversation will see the full conversation again.
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | Guid | Id conversation to delete | Required |
Return Type
Conversation Get(Guid conversationId);
Gets a conversation
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| conversationId | Guid | Id of conversation | Required |
Return Type
Conversation Get(string[] participantUsernames);
Gets a conversation by participant list
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| participantUsernames | string[] | List of User ids | Required |
Return Type
bool HasLeft(Guid id, int userId);
Identifies if a participant has left the conversation.
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | Guid | Id of the conversation | Required | ||
| userId | int | The user ID of the participant to review. | Required |
Return Type
bool
AdditionalInfo Leave(Guid id);
Leave a conversation. The conversation will be deleted when all participants delete or leave the conversation. If any participant replies, participants who have left will not be reactivated in the conversation but can be reactivated manually by other participants.
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | Guid | Id conversation to leave | Required |
Return Type
PagedList<Conversation> List(ConversationsListOptions options = null);
List conversations
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| options | ConversationsListOptions | Optional parameter names are: ReadStatus, PageSize, PageIndex. If left unspecified, ReadStatus defaults to NotSet. | Optional |
Return Type
void MarkAsRead(Guid id, bool hasRead);
Mark a conversation as Read or Unread
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | Guid | Id conversation to mark as read | Required | ||
| hasRead | bool | Read or Unread | Required |
AdditionalInfo Restore(Guid id, int userId);
Restore a participant who has left the conversation. If the requestor can start a conversation with the requested user and the user had previously left the conversation, the requested user will be restored in the conversation.
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | Guid | Id of the conversation | Required | ||
| userId | int | The user ID of the partipiant who left that should be restored. | Required |