Mattermost is an open source platform for secure collaboration across the entire software development lifecycle.. https://mattermost.com
  • TypeScript 47.2%
  • Go 41.8%
  • JavaScript 5.8%
  • SCSS 2.6%
  • HTML 2.2%
  • Other 0.3%
Find a file
Maria A Nunez 61643e1066
MM-68952: Resolve public channel mentions for non-members under Compliance (#36815)
* MM-68952: Resolve public channel mentions for non-members under Compliance

Channel mention name resolution reused HasPermissionToReadChannel, a
content-read check that returns false for non-members of a public channel
when Compliance Monitoring is enabled (MM-45272) or when the channel is on
another team (MM-66791). As a result, the channel_mentions post prop was
stripped per-viewer (since #34235), and the webapp fell back to rendering the
raw (anonymized) channel slug instead of a clickable link.

Introduce HasPermissionToResolveChannelMention, which exposes only a public
channel display name and link (not content) and is therefore independent of
ComplianceSettings, while still requiring team membership for public channels
(blocks cross-team disclosure) and channel membership for private/DM/GM
channels. Switch the three mention call sites (FillInPostProps,
sanitizeChannelMentionsForUser, channelMentionsBroadcastHook) to the new
helper. HasPermissionToReadChannel and all content-read paths are unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>

* MM-68952: Add author-side and E2E coverage for channel mention resolution

Add a Go test (TestFillInPostPropsChannelMentionResolution) that exercises the
author-side persistence of the channel_mentions prop in FillInPostProps. It
locks in the new behavior: an author who is a team member but not a member of a
referenced public channel now persists the mention prop even when Compliance
Monitoring is enabled, while public channels on other teams and private
channels the author is not in are still dropped.

Add a Playwright spec (channel_mention_resolution.spec.ts) with a license-free
cross-team case (a public channel mention stays unresolved for a viewer not on
the channel's team) and a license-gated case (with Compliance enabled, a team
member who is not in the channel sees the resolved mention link).

Co-authored-by: Cursor <cursoragent@cursor.com>

* MM-68952: Tighten channel mention test assertions and fix lint

Use strings.Builder when assembling the test message to avoid the
golangci-lint stringsbuilder (modernize) warning about string += string
in a loop. Tighten the cross-team public and private non-member cases to
assert.Nil on the resolved mentions so the contract requires no persisted
channel_mentions map rather than merely an empty one.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 08:42:39 -04:00
.agents/skills/agent-browser Add agent-browser skill and update cloud agent docs (#35534) 2026-03-09 11:13:00 -04:00
.cursor Add Docker Hub login to Cloud Agent start hook. (#36632) 2026-05-19 15:06:58 -04:00
.github Tighten CI workflows (#36778) 2026-05-28 18:21:13 +02:00
api Board channel bookmarks with target_id and readonly bookmark API (#36572) 2026-06-02 21:24:05 +02:00
e2e-tests MM-68952: Resolve public channel mentions for non-members under Compliance (#36815) 2026-06-03 08:42:39 -04:00
server MM-68952: Resolve public channel mentions for non-members under Compliance (#36815) 2026-06-03 08:42:39 -04:00
tools Upgrade Go to 1.26.3 and update deps in tool modules (#36658) 2026-05-20 17:25:49 -04:00
webapp Board channel bookmarks with target_id and readonly bookmark API (#36572) 2026-06-02 21:24:05 +02:00
.editorconfig Move .editorconfig to repo root (#24398) 2023-08-30 16:29:07 -04:00
.gitignore Add .envrc to .gitignore (#36567) 2026-05-14 14:19:03 +00:00
.gitpod.yml Add .gitpod.yml to use mattermost-gitpod-config repo for Gitpod configuration (#19984) 2022-04-14 11:02:50 -04:00
.nvmrc MM-66972 Upgrade to node 24 and main dependencies with babel, webpack and jest (#34760) 2026-01-14 13:14:01 +08:00
.yamllint ci: add yamllint workflow to detect duplicate YAML keys (#36010) 2026-04-20 17:25:12 -04:00
AGENTS.md Document Mattermost cloud startup flow (#36559) 2026-05-13 21:45:38 +00:00
CHANGELOG.md Changelog link (#8805) 2018-05-30 10:23:25 -04:00
CODEOWNERS simplify CODEOWNERS (#35770) 2026-04-01 13:03:36 +00:00
CONTRIBUTING.md update CONTRIBUTING.md and github ISSUE_TEMPLATE (#30862) 2025-04-29 15:42:40 +03:00
enable-claude-docs.sh Add optional Claude.md orchestration for Webapp folder (#34668) 2026-01-14 13:04:20 -05:00
LICENSE.enterprise Source available metrics (#24879) 2024-01-08 10:47:24 -04:00
LICENSE.txt Update LICENSE.txt to reflect new paths (#28241) 2024-10-01 09:47:09 -03:00
NOTICE.txt chore: Update NOTICE.txt file with updated dependencies (#36825) 2026-06-01 14:54:07 +02:00
README.md Update README first line to match new use cases (#31247) 2025-05-30 19:28:37 +00:00
SECURITY.md MM-41988 Updated links to legacy domain about.mm.com (#19552) 2022-03-16 19:47:57 +08:00
skills-lock.json Add agent-browser skill and update cloud agent docs (#35534) 2026-03-09 11:13:00 -04:00

Mattermost logo

Mattermost is an open core, self-hosted collaboration platform that offers chat, workflow automation, voice calling, screen sharing, and AI integration. This repo is the primary source for core development on the Mattermost platform; it's written in Go and React, runs as a single Linux binary, and relies on PostgreSQL. A new compiled version is released under an MIT license every month on the 16th.

Deploy Mattermost on-premises, or try it for free in the cloud.

mattermost user interface

Learn more about the following use cases with Mattermost:

Other useful resources:

Table of contents

Install Mattermost

Other install guides:

Native mobile and desktop apps

In addition to the web interface, you can also download Mattermost clients for Android, iOS, Windows PC, macOS, and Linux.

Get Mattermost on Google Play Get Mattermost on the App Store Get Mattermost on Windows PC Get Mattermost on Mac OSX Get Mattermost on Linux

Get security bulletins

Receive notifications of critical security updates. The sophistication of online attackers is perpetually increasing. If you're deploying Mattermost it's highly recommended you subscribe to the Mattermost Security Bulletin mailing list for updates on critical security releases.

Subscribe here

Get involved

Learn more

License

See the LICENSE file for license rights and limitations.

Get the latest news

Contributing

Small Image

Please see CONTRIBUTING.md. Join the Mattermost Contributors server to join community discussions about contributions, development, and more.