Skip to content

Mattermost

Mattermost is a self-hostable team collaboration platform. Protocol Launcher allows you to generate Mattermost deep links using the official mattermost:// formats.

Usage

There are two ways to use this library:

  • On-Demand import from subpaths enables tree-shaking and keeps bundles small.
  • Full Import from the root package is convenient but includes all app modules.

Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.

Select Installation Method

On-Demand
Recommended. Optimized for production.
Full Import
Convenient. Good for quick scripts.

Notes

Mattermost documents mattermost:// deep links for teams, channels, channel messages or threads, and direct messages. The serverUrl value is the value placed in the official <your-Mattermost-server-URL> segment. Use the team name, channel name, post ID, and user name exactly as they exist in your Mattermost workspace.

Open Team

On-Demand
ts
import { openTeam } from 'protocol-launcher/mattermost'

const url = openTeam({
  serverUrl: 'your-Mattermost-server-URL',
  teamName: 'team-name',
})

Open Channel

On-Demand
ts
import { openChannel } from 'protocol-launcher/mattermost'

const url = openChannel({
  serverUrl: 'your-Mattermost-server-URL',
  teamName: 'team-name',
  channelName: 'channel-name',
})

Open Channel Message Or Thread

On-Demand
ts
import { openPost } from 'protocol-launcher/mattermost'

const url = openPost({
  serverUrl: 'your-Mattermost-server-URL',
  teamName: 'team-name',
  postId: 'post-id',
})

Open Direct Message

On-Demand
ts
import { openDirectMessage } from 'protocol-launcher/mattermost'

const url = openDirectMessage({
  serverUrl: 'your-Mattermost-server-URL',
  teamName: 'team-name',
  userName: 'user-name',
})

Official Documentation