Work with status messages
This service is available via Telligent.Evolution.Extensibility.Apis.Get<Telligent.Evolution.Extensibility.Api.Version1.IStatusMessages>()
and is defined in Telligent.Evolution.Platform.dll
Events
Events.AfterCreate
Handler
void StatusMessageAfterCreateEventHandler(StatusMessageAfterCreateEventArgs e);
Events.AfterDelete
Handler
void StatusMessageAfterDeleteEventHandler(StatusMessageAfterDeleteEventArgs e);
Events.AfterUpdate
Handler
void StatusMessageAfterUpdateEventHandler(StatusMessageAfterUpdateEventArgs e);
Events.BeforeCreate
Handler
void StatusMessageBeforeCreateEventHandler(StatusMessageBeforeCreateEventArgs e);
Events.BeforeDelete
Handler
void StatusMessageBeforeDeleteEventHandler(StatusMessageBeforeDeleteEventArgs e);
Events.BeforeUpdate
Handler
void StatusMessageBeforeUpdateEventHandler(StatusMessageBeforeUpdateEventArgs e);
Events.Render
Handler
void StatusMessageRenderEventHandler(StatusMessageRenderEventArgs e);
Methods
bool CanUpdate(Guid id);
Returns whether the accessing user can update a StatusMessage
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Guid | StatusMessage Id | Required |
Return Type
bool
StatusMessage Create(string messageBody, StatusMessagesCreateOptions options = null);
Create StatusMessage
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
messageBody | string | Message body | Required | ||
options | StatusMessagesCreateOptions | Status messages create options | Optional |
Return Type
AdditionalInfo Delete(Guid messageId);
Delete a status message
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
messageId | Guid | The ID of the message you want to delete | Required |
Return Type
StatusMessage Get(Guid messageId);
Get status message with a specific message ID
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
messageId | Guid | Message Id | Required |
Return Type
int GetCount(int userId);
Gets a count of status messages for an author.
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
userId | int | User Id | Required |
Return Type
int
ApiList<StatusMessage> List(StatusMessagesListOptions options = null);
Get a list of status messages. Paging is done through date ranges instead of a page index. This is partly due to status messages being created so quickly, where going to page index 2 may not give you what you would expect.
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | StatusMessagesListOptions | Status messages list get options | Optional |
Return Type
string PreviewAttachment(string messageBody, StatusMessagesPreviewOptions options = null);
Preview attachment
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
messageBody | string | Message body | Required | ||
options | StatusMessagesPreviewOptions | Status messages preview options | Optional |
Return Type
string
StatusMessage Update(Guid id, string messageBody, StatusMessagesUpdateOptions options = null);
Update StatusMessage
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Guid | Id | Required | ||
messageBody | string | Message body | Required | ||
options | StatusMessagesUpdateOptions | Status messages update options | Optional |