Skip to content

ENG-41037: docs(rbac): hide group messages sent before a member joined - #600

Open
ketanyekale wants to merge 3 commits into
mainfrom
docs/eng-41037-sbac-history-before-join
Open

ketanyekale wants to merge 3 commits into
mainfrom
docs/eng-41037-sbac-history-before-join

Conversation

@ketanyekale

@ketanyekale ketanyekale commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Why

ENG-41037, ticket #45862: a customer asked for WhatsApp-style "hide group history from new members". The support AI said the feature doesn't exist and proposed a client-side workaround. It exists: the SBAC permission listMessages.historyBeforeJoin. Its only mention was one row in the SBAC table, with none of the words customers use, so search never found it.

What changed

  • rest-api/rbac-overview.mdx: new section Hide Group Messages Sent Before a Member Joined (#hide-group-messages-sent-before-a-member-joined), placed after the SBAC example configuration. It names the permission, shows the Set Scope Permissions curl with the body {"permissions": {"listMessages.historyBeforeJoin": "deny"}} (shape taken from the OpenAPI spec), explains deny / allow (default allow), says it applies per scope only, and links List and Unset Scope Permissions. The SBAC Messages table links to the section.
  • One-line cross-link <Note> in the Message History section of the current SDK pages: sdk/javascript/receive-message.mdx, sdk/react-native/receive-messages.mdx, sdk/ios/receive-message.mdx, sdk/android/v5/receive-messages.mdx, sdk/flutter/receive-messages.mdx. All point at the section anchor.
  • No new page and no docs.json change (an earlier commit added a standalone page; it was folded into the overview on request).

Confirmed (Ketan, 2026-11-03)

  • With deny, pre-join messages are silently left out of the list; the request succeeds.
  • Leaving and rejoining resets the join time: the member sees history from the rejoin onward.

Add a task page for the SBAC permission listMessages.historyBeforeJoin,
written in the words customers use (restrict history for new members,
WhatsApp-style group history), with the Set Scope Permissions request
that denies pre-join history for the participant scope. Register it in
docs.json and cross-link it from the SBAC Messages table and the current
Message History sections of the JavaScript, React Native, iOS, Android
and Flutter SDK docs.

Refs ENG-41037, Zendesk #45862.
@mintlify

mintlify Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
cometchat 🟢 Ready View Preview Nov 3, 2026, 9:50 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

raj-dubey1
raj-dubey1 previously approved these changes Nov 2, 2026

@jitvarpatil jitvarpatil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The request itself is right: path, method, apikey header and {"permissions": {...}} body match chat-apis.json, and the key, values and default match the SBAC table. The SDK pages are the right ones too. Requesting changes because the page's main behaviour is unconfirmed and one step may not work. I didn't run any of this against the API, so items 1, 2 and 4 need one test call.

Resolve before merge

  1. What deny does on a fetch. You flagged this already. The overview says deny returns ERR_PERMISSION_DENIED, so readers will assume that here too.

    • If the whole list request fails, turning this on could break group message history for those members, and the page needs to warn about it.
    • If pre-join messages are just filtered out, the page should say so, since that is what the customer asked for.
    • ENG-41037 says Hritika confirmed deny hides pre-join history, but not how.
  2. Step 2 may not be able to confirm the setting. It tells readers to use List Scope Permissions to confirm the key is deny. The example response in chat-apis.json only shows permission definitions (id, availableValues, defaultValue), with no current value. That example is shortened (3 of 11 items), so it isn't conclusive, but a reader may only see defaultValue: allow and think the change failed. The Set Scope Permissions response does echo a permissions object, so that may be the better check.

Please also address

  1. Say that the setting is per group. I found no app-wide version in the docs: the key appears only in the group-scope table. A customer who wants this everywhere has to call it for every group, including each new one. The page says "on a group", but the closing line only covers scope, member and date. One more sentence would fix it.

  2. Rejoining. You flagged this too: does a member who leaves and rejoins lose access to messages from their first membership? The test call for item 1 can answer it. Please document the result.

  3. The description reads awkwardly. "Restrict history for new members with WhatsApp-style group history" sounds like the reverse of what it means, and it names a competitor. Suggestion: "Hide messages sent before a member joined a group using the SBAC permission listMessages.historyBeforeJoin."

The preview was still deploying when I checked, so I haven't seen how the page renders.

@ketanyekale

Copy link
Copy Markdown
Member Author

Per Ketan: folded the standalone page into rest-api/rbac-overview.mdx as the section Hide Group Messages Sent Before a Member Joined (#hide-group-messages-sent-before-a-member-joined). The SDK cross-links and the SBAC table now point at that anchor; docs.json is unchanged from main.

This branch was successfully deployed

1 active deployment
staging — e8f9251f Deployed Nov 3, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants