Skip to content

docs(android): thread subscription, pin & save messages, pin conversa… - #462

Merged
ketanyekale merged 5 commits into
mainfrom
feature/android-pin_save_thread
Sep 7, 2026
Merged

ketanyekale merged 5 commits into
mainfrom
feature/android-pin_save_thread

Conversation

@hritika-cometchat

@hritika-cometchat hritika-cometchat commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Type of Change

  • Documentation correction/update
  • New documentation
  • Improvement to existing documentation
  • Typo fix
  • Other (please specify)

Checklist

  • I have read the CONTRIBUTING document
  • My branch name follows the naming convention
  • My changes follow the documentation style guide
  • I have checked for spelling and grammar errors
  • All links in my changes are valid and working
  • My changes are accurately described in this pull request

🤖 Generated with Claude Code

…tions, and composer trailing buttons (SDK v5 + UI Kit)
@mintlify

mintlify Bot commented Aug 7, 2026

Copy link
Copy Markdown

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

Project Status Preview Updated (UTC)
cometchat 🟢 Ready View Preview Aug 7, 2026, 12:02 PM

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

… RN parity

Verified every documented symbol against chat-sdk-android and uikit-android
and brought the pages in line with the React Native counterpart (#493).

Corrections — these APIs do not exist in the Android SDK:
- CometChat.getThreadSubscriptionState() and the ThreadSubscriptionState enum
- CometChat.addThreadListener(), ThreadListener, ThreadSubscriptionEvent,
  ThreadReplyEvent
- MessageThread.getSubscriptionState() (it is isSubscribed())

Thread subscription is rewritten around the real model: the subscribe/
unsubscribe callback is the acknowledgement, state rides on the message via
BaseMessage.isThreadSubscribed() with MessagesRequestBuilder.withThreadSubscribed()
(default true), and setThreadSubscribed() is a local-only mirror. Replies arrive
on the ordinary MessageListener. The Thread Listener section is removed from
real-time-listeners and replaced with a note explaining why there is none.

CometChatThreadEvent.SubscriptionChanged is (parentMessageId: Long,
subscribed: Boolean) — not the subscriptionState/source signature documented.

Pin permission is enforced by the server (ERR_PERMISSION_DENIED), not by a
client-side Admin/Moderator/Owner gate; MessageOptionsUtils shows the option to
every participant. Corrected in the SDK page, message-list and the guide.

Parity with the React Native pages:
- sidebarTitle/description frontmatter and an AI Integration Quick Reference
  accordion on the four new SDK pages
- pin/save/pin-conversation caps via getPinMessageLimit(),
  getSystemPinMessageLimit(), getSaveMessageLimit(), getPinConversationLimit()
  and getSystemPinConversationLimit(), with Settings.LIMIT_UNSPECIFIED,
  replacing a hard-coded "100 by default"
- isSystemPinned(), pin-time/save-time ordering and cursor notes, the
  moderation-pending ERR_MESSAGE_NO_ACCESS warning
- error tables with the real codes, and Next Steps card groups

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@raj-dubey1

Copy link
Copy Markdown
Contributor

Docs review (comment-only) — Android UI Kit pin/save pages.

Ran the structural checks (redirect coverage, nav integrity, orphans, in-content link rot) plus a content read of the changed UI Kit pages. Build is safe: 0 unresolved nav refs, 0 missing redirects (additive), 0 orphans — the new pinned-messages / saved-messages / guide-pin-and-save-messages / guide-thread-subscription pages are all wired into docs.json, and their internal links resolve. The real-time framing is handled well: the panel pages and guide correctly caveat that server-side delivery is pending rollout.

Two content contradictions worth fixing before merge:

1. "Unsave" behavior is described two different ways

  • saved-messages.mdx:126: "Unsave — long-press a row to get the Unsave action; a toast confirms the result." — reads as a direct action with no confirmation.
  • guide-pin-and-save-messages.mdx:36: "Unpin and Unsave ask for confirmation first."
  • message-list.mdx:860: "unsaving asks for confirmation first."

The guide and message-list agree (and it matches the Unpin behavior, which every page states asks for confirmation), so saved-messages.mdx:126 is the outlier. Reword it to confirmation-first rather than a post-hoc toast.

2. Pin/Save event class name doesn't match the Events reference

The AI Quick Reference blocks on the two panel pages use a class name that doesn't appear anywhere else:

  • pinned-messages.mdx:35: "CometChatMessageEvent.MessagePinned", "CometChatMessageEvent.MessageUnpinned"
  • saved-messages.mdx:30: "CometChatMessageEvent.MessageSaved", "CometChatMessageEvent.MessageUnsaved"

The canonical name on the Events page (events.mdx:74-77) is MessageEvent.MessagePinned(message), etc. Align the two JSON blocks to MessageEvent.* so a reader copying the event list references the class that actually exists.

Everything else on the UI Kit side — the enable-opt-in wording, cross-links, placeholders (none), and images (none) — checks out.

Review feedback on #462 (raj-dubey1).

1. saved-messages: the Unsave row said a toast confirms the result, which
   contradicted the guide and message-list. CometChatSavedMessages routes the
   long-press Unsave through CometChatConfirmDialog in both the View and
   Compose kits ("unsave itself still needs a confirm"), so the panel page was
   the outlier. Reworded to confirmation-first, matching the Unpin flow.

2. Pin/save event class name: aligned, but toward CometChatMessageEvent rather
   than MessageEvent. There is no MessageEvent class in chatuikit-core — the
   sealed classes are CometChatMessageEvent, CometChatCallEvent,
   CometChatGroupEvent, CometChatUserEvent, CometChatConversationEvent,
   CometChatUIEvent and CometChatThreadEvent. The panel pages' quick-reference
   blocks were right; events.mdx was carrying a truncated name (and already
   used the full CometChatUIEvent for UI events).

   Corrected the Message Events section to the real names, including the
   subtypes: Sent/Edited/Deleted/Read are MessageSent/MessageEdited/
   MessageDeleted/MessageRead, and InteractionGoalCompleted carries a receipt,
   not a message. Removed FormReceived, CardReceived,
   CustomInteractiveReceived and SchedulerReceived — none exist on the event
   bus.

The Call, Group, User and Conversation sections carry the same truncated names
and are left for a follow-up, being outside this PR's scope.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Follows raj-dubey1's review comment directly.

1. saved-messages: Unsave reworded to confirmation-first, matching the guide
   and message-list (unchanged from the previous commit).

2. Event class name: reverted events.mdx to its prior naming and aligned the
   two panel quick-reference blocks to MessageEvent.* instead, per the review
   comment.

Note for the reviewer: chatuikit-core has no MessageEvent class — the sealed
classes are CometChatMessageEvent, CometChatCallEvent, CometChatGroupEvent,
CometChatUserEvent, CometChatConversationEvent, CometChatUIEvent and
CometChatThreadEvent (events.mdx already uses the full name for UI events).
Both pages now say MessageEvent.* consistently, as asked, but the name does
not resolve against the source; worth a follow-up to correct events.mdx and
the panel pages together.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ketanyekale
ketanyekale merged commit f10d8b2 into main Sep 7, 2026
5 checks passed
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.

4 participants