Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
29 changes: 24 additions & 5 deletions docs/develop/contribute/more-info/mobile/developer-setup/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: "Developer setup"
title: "Developer setup for Mattermost mobile apps"
description: "Set up a development environment for the React Native Mattermost mobile apps for iOS and Android."
sidebar_label: "Developer setup"
sidebar_position: 1
---

Expand Down Expand Up @@ -110,7 +112,7 @@ Install [Xcode](https://apps.apple.com/us/app/xcode/id497799835?ls=1&mt=12) to b

### Install Ruby

A version of Ruby is automatically installed on macOS, but Mattermost React Native app development requires Ruby 3.2.0. You can check the current version of Ruby by running the following command.
A version of Ruby is automatically installed on macOS, but Mattermost React Native app development requires the Ruby version pinned in the repository's `.ruby-version` file (currently 3.2.11). You can check the current version of Ruby by running the following command.
```sh
ruby --version
```
Expand All @@ -132,13 +134,30 @@ If it isn't, we recommend using [Ruby Version Manager](https://rvm.io) or your p
```
4. Install the required version of Ruby
```sh
rvm install 3.2.0
rvm install 3.2.11
```
5. (Optional) If you don't need to use a different version of Ruby for anything else, you'll want to change the default version of Ruby. Without this, you'll need to run `rvm use 3.2.0` any time you want to work on the mobile app.
5. (Optional) If you don't need to use a different version of Ruby for anything else, you'll want to change the default version of Ruby. Without this, you'll need to run `rvm use 3.2.11` any time you want to work on the mobile app.
```sh
rvm alias create default 3.2.0
rvm alias create default 3.2.11
```

:::note[Apple Silicon]
On recent Apple Silicon Macs, installing Ruby through RVM can fail with repeated OpenSSL errors. If you hit those, [`rv`](https://github.com/spinel-coop/rv) (a Ruby version manager) is a reliable alternative:

```sh
brew install rv
rv ruby install 3.2.11
```

To have `rv` switch Ruby versions automatically, install its shell integration once. For example, for `zsh`:

```sh
echo 'eval "$(rv shell init zsh)"' >> ~/.zshrc
```

Run `rv shell <your-shell>` (`bash`, `fish`, etc.) to see the equivalent for your shell, then open a new terminal. After that, `rv` reads the repository's `.ruby-version` file and selects the pinned version automatically when you `cd` into the project.
:::

## Additional setup for Android

### Download and install Android Studio or Android SDK CLI tools
Expand Down
2 changes: 2 additions & 0 deletions docs/develop/integrate/faq/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ If there's no translation layer, Mattermost won't understand the data you're sen

When "attachments" are mentioned in the integrations documentation, it refers to Slack's Message Attachments. These "attachments" can be optionally added as an array in the data sent by an integration, and are used to customize the formatting of the message.

For new interactive content — buttons, menus, and structured layouts — use [Mattermost Blocks](/developers/integrate/reference/mm-blocks) instead of attachment `actions`. Legacy attachments remain supported and are translated into Mattermost Blocks at render time.

We currently don't support the ability to attach files to a post made by an integration.

### Where can I find existing integrations?
Expand Down
135 changes: 132 additions & 3 deletions docs/develop/integrate/plugins/interactive-dialogs/index.md

Large diffs are not rendered by default.

25 changes: 19 additions & 6 deletions docs/develop/integrate/plugins/interactive-messages/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "Interactive messages"
description: "Mattermost supports interactive message buttons and menus through Mattermost Blocks, markdown action buttons, and legacy message attachments so integrations can complete common tasks inside conversations."
sidebar_position: 80
---

Expand All @@ -17,15 +18,27 @@ To try it out, you can use this [Matterpoll plugin](https://github.com/matterpol

![image](poll.png)

## Mattermost Blocks (recommended)

[Mattermost Blocks](/developers/integrate/reference/mm-blocks) are the recommended way to build interactive integration posts. Send a block tree in `props.mm_blocks` for layout, text, images, buttons, and menus, and register action handlers in `props.mm_blocks_actions`.

See [Mattermost Blocks](/developers/integrate/reference/mm-blocks) for the full block schema, action types, validation limits, and examples.

## Markdown action buttons

In addition to message-attachment buttons and menus, you can embed interactive affordances directly in a post's markdown body using `mmaction://` links backed by a `mm_blocks_actions` post prop. This is useful when a short message reads naturally with an inline "Approve" or "Reject" link and a full message attachment isn't warranted.
Embed interactive affordances directly in a post's markdown body using `mmaction://` links backed by the same `mm_blocks_actions` registry. This is useful when a short message reads naturally with an inline "Approve" or "Reject" link.

See [markdown action buttons](/developers/integrate/reference/markdown-actions) for the full schema, limits, and end-to-end flow.

## Legacy message attachment buttons and menus

:::note[Legacy format]
The sections below describe interactive buttons and menus placed inside legacy [message attachments](/developers/integrate/reference/message-attachments). Existing integrations continue to work — Mattermost translates attachment actions into Mattermost Blocks at render time — but new integrations should use [Mattermost Blocks](/developers/integrate/reference/mm-blocks) directly.
:::

## Message buttons

Add message buttons as `actions` in your integration [message attachments](https://docs.mattermost.com/developer/message-attachments.html).
Add message buttons as `actions` in your integration [message attachments](/developers/integrate/reference/message-attachments).

The following payload gives an example that uses message buttons.

Expand Down Expand Up @@ -85,7 +98,7 @@ To return a custom error message to the user, your integration can respond with
}
```

The error message will be displayed to the user below the message attachment. If no custom error message is provided, a default "Action failed to execute" message is shown. This feature is available in Mattermost v10.5 and later.
The error message will be displayed to the user below the interactive content. If no custom error message is provided, a default "Action failed to execute" message is shown. This feature is available in Mattermost v10.5 and later.

![image](interactive_message.gif)

Expand Down Expand Up @@ -297,7 +310,7 @@ Specify `users` as your action's `data_source` as follows:

### Parameters

Below is a brief description of each parameter to help you customize the interactive message button and menu in Mattermost. For more information on message attachments, [see our documentation](https://docs.mattermost.com/developer/message-attachments.html).
Below is a brief description of each parameter to help you customize legacy attachment interactive buttons and menus in Mattermost. For new integrations, see [Mattermost Blocks](/developers/integrate/reference/mm-blocks). For more information on message attachments, see [message attachments](/developers/integrate/reference/message-attachments).

**ID**<br/>
A per post unique identifier.
Expand Down Expand Up @@ -402,7 +415,7 @@ In most cases, your integration will do one or both of these things:

## Error handling

When an action button integration fails, Mattermost automatically displays an error message to the user below the message attachment. This provides immediate feedback when button actions don't work as expected.
When an action button integration fails, Mattermost automatically displays an error message to the user below the interactive content. This provides immediate feedback when button actions don't work as expected.

![image](action-button-error.png)

Expand Down Expand Up @@ -472,7 +485,7 @@ It is likely for one of three reasons:

### How do I manage properties of an interactive message?

Use `update.Props` in the following ways to manage properties (`Props`) of an interactive message after a user performs an action via an interactive button or menu:
Use `update.Props` in the following ways to manage properties (`Props`) of an interactive message after a user performs an action via an interactive button or menu. When using Mattermost Blocks, include updated `mm_blocks` and `mm_blocks_actions` in `update.props` as needed:

- `update.Props == nil` - Do not update `Props` field.
- `update.Props == {}` - Clear all properties, except the username and icon of the original message, as well as whether the message was pinned to channel or contained emoji reactions.
Expand Down
28 changes: 13 additions & 15 deletions docs/develop/integrate/plugins/using-and-managing-plugins.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: "Use and manage plugins"
title: "Use plugins with Mattermost"
description: "Mattermost supports plugins to customize and extend the platform."
sidebar_label: "Use and manage plugins"
sidebar_position: 50
---

Expand Down Expand Up @@ -98,9 +100,9 @@ You should only install custom plugins from sources you trust to avoid compromis

## Plugin signing

The Marketplace allows System Admins to download and install plugins from a central repository. Plugins installed via the Marketplace must be signed by a public key certificate trusted by the local Mattermost server.
The Marketplace allows System Admins to download and install plugins from a central repository. Plugins installed via the Marketplace must be signed by a public key trusted by the local Mattermost server.

While the server ships with a default certificate used to verify plugins from the default Mattermost Marketplace, the server can be configured to trust different certificates and point at a different plugin marketplace. This document outlines the steps for generating a public key certificate and signing plugins for use with a custom plugin marketplace. It assumes access to the [GNU Privacy Guard (GPG)](https://gnupg.org) tool.
While the server ships with a default public key used to verify plugins from the default Mattermost Marketplace, the server can be configured to trust different public keys and point at a different plugin marketplace. This document outlines the steps for generating a public key pair and signing plugins for use with a custom plugin marketplace. It assumes access to the [GNU Privacy Guard (GPG)](https://gnupg.org) tool.

### Configuration

Expand Down Expand Up @@ -191,21 +193,17 @@ This command will generate `com.mattermost.demo-plugin-0.1.0.tar.gz.sig`, which

## Plugin verification

Mattermost server will verify plugin signatures downloaded from the Marketplace. To add custom public keys, run the following command on the Mattermost server:
Mattermost server will verify plugin signatures downloaded from the Marketplace. Plugins are verified against a hard-coded Mattermost public key, as well as any additional public keys configured on the server.

`mattermost plugin add key my-pub-key`
To add custom public keys for plugin signature verification, add the key file names to the `PluginSettings.SignaturePublicKeyFiles` setting in your `config.json`:

Multiple public keys can be added to the Mattermost server:

`mattermost plugin add key my-pk-file1 my-pk-file2`

To list the names of all public keys installed on your Mattermost server, use:

`mattermost plugin keys`

To delete public key(s) from your Mattermost server, use:
```json
"PluginSettings": {
"SignaturePublicKeyFiles": ["my-pub-key-1", "my-pub-key-2"]
}
```

`mattermost plugin delete key my-pk-file1 my-pk-file2`
The key files themselves must be stored in the Mattermost server's config directory.

### Implementation

Expand Down
Loading
Loading