Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion site/content/integrate/reference/markdown-actions/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ post := &model.Post{
_, err := p.API.CreatePost(post)
```

Plugin updates to `mm_blocks_actions` via `UpdatePost` are accepted only when the updated value passes validation. Removal of the `mm_blocks_actions` prop by non-integration sessions is restricted to prevent dropping or corrupting actions on posts owned by another integration.
A plugin can also change markdown actions later via `API.UpdatePost`. See [Updating and removing actions](#updating-and-removing-actions) for who may change `mm_blocks_actions` and how actions are removed.

## Link syntax

Expand Down Expand Up @@ -188,6 +188,12 @@ The diagram below describes the lifecycle of a single click on a markdown action

When a user clicks a markdown action button, the Mattermost server sends an HTTP POST request to the `url` configured in the matching `mm_blocks_actions` entry. The request body follows the same `PostActionIntegrationRequest` shape used by [message attachment]({{< ref "/integrate/reference/message-attachments" >}}) buttons — the integration responds with the same post-action response format.

## Updating and removing actions

- An integration session (bot account, personal access token, or OAuth app) may add, replace, or remove `mm_blocks_actions` on a post **it authored**, via the update and patch post endpoints. Other sessions can edit the message but not another author's actions.
- An update that omits `mm_blocks_actions` keeps the existing actions, so a message-only edit never wipes buttons.
Comment thread
sbishel marked this conversation as resolved.
Outdated
- Removing a button's `mmaction://` link from the message revokes its action: the entry is pruned and later clicks return a not-found error.

## Validation limits

Posts that exceed any of the following limits are rejected at create or update time.
Expand Down
Loading