mattermost-mobile-upstream/app/utils/draft
Claude b29dc4741a
Hide DM/GM start affordances unless Start and Read are allowed
Starting a conversation is offered only while dm_gm_start and
dm_gm_read_access are both allowed:
- the channel list "+" menu leaves out "Open a Direct Message", and the
  "+" is hidden when no item remains;
- Find Channels hides "Open a DM", lists no users to message and skips
  the profile search;
- the user profile offers "Send a message" only when a DM can be reopened
  (Read) or started (Start and Read), and alerts on failure;
- a DM deep link that fails now alerts.

alertErrorWithFallback shows "You can't start new direct or group
messages." for the Start id and "You do not currently have access to
direct and group messages." for the Read id. Agents chat shows the start
text. Its channel error is kept apart from the bots error, which was
cleared as soon as bots were available, so the text was never shown.
Start 403s from creating a DM or GM record the denial straight away.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8zZ6swdpcLxJTgxH14DDD
2026-10-11 12:59:04 +00:00
..
index.test.ts Hide DM/GM start affordances unless Start and Read are allowed 2026-10-11 12:59:04 +00:00
index.ts Hide DM/GM start affordances unless Start and Read are allowed 2026-10-11 12:59:04 +00:00