feat(pin-save-thread-subscription-js-sdk): add documentation for pin/save messages, pin conversations and thread subscription - #469
Conversation
…save messages, pin conversations and thread subscription
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
…no longer honours Both pages described behaviour that changed when the SDK stopped self-echoing pin/save writes and gained a composite thread cursor. save-message: the Real-time Save Events note said the acting device also receives its own event, de-duplicated by the SDK, and that a consumer could insert into the saved list from the callback alone. The SDK no longer local-emits — the acting device gets nothing and must update from the saveMessage() promise, while the callbacks fire for that user's other devices. Following the old note would have left the saved list un-updated on the device that performed the save. thread-subscription: the paging section said only "call fetchNext() repeatedly", which leads to looping until an empty page. hasMore() is the end-of-list signal — a page can be shorter than the limit because the server's inclusive cursor repeats the boundary row and the SDK filters it out. Adds a while (hasMore()) example in both tabs and states the rule explicitly.
…pages The three links in the Ongoing Call Listener section pointed at /sdk/javascript/direct-call, /standalone-calling and /default-call, none of which exist — in v4 those pages live under the Calls SDK. Now /calls/v4/javascript/ call-session, /standalone-calling and /ringing, matching the link text already in place. v4 rather than the v5 beta, since OngoingCallListener is the v4 API. Pre-existing 404s, unrelated to the pin/save and thread work in the surrounding commits.
|
Docs review — structurally clean, one content contradiction. Ran the mechanical checks (redirect coverage, nav integrity, orphans, in-content link rot) plus a content read of all 7 changed files. Build is safe: 0 unresolved nav refs, 0 missing redirects (additive), 0 orphans. Method-name consistency is clean — One content item worth fixing before merge:
|
…THREADS Thread subscription added a fourth value to RepliesOptions, and it was documented nowhere — neither dashboard-preference table listed it, and no note described the enum. A reader had three options in front of them and a fourth in the SDK. Adds "Notify for subscribed threads" to the New replies row in both the group and one-on-one tables, and a note listing all four RepliesOptions values. The note explains what makes the fourth usable: a user is subscribed to a thread by starting it, replying in it, being @-mentioned in it, or following it explicitly — with a link to the Thread Subscription page. Deliberately mirrors the QuotedRepliesOptions note in #472 so the two read as a pair once both land.
raj-dubey1
left a comment
There was a problem hiding this comment.
Docs review — structure passes; code-example bugs to fix before merge
Mechanical / structural checks: all clear. Build is safe (all 5 new pages wired into docs.json nav and resolve), add-only PR so 0 removed/renamed → no 404 risk, 0 chained 404s, 0 orphans, all cross-links and /sdk/reference/* anchors resolve. docs.json is valid JSON.
Code-example bugs in sdk/javascript/message-filtering.mdx (all newly added, each has a correct sibling tab so intent is unambiguous):
- Group tabs use
.setUID(UID)but should use.setGUID(GUID)(and never use the declaredGUID) —:150,:217. - User tabs use the group setter
.setGUID(UID)but should use.setUID(UID)—:1066,:1138,:1204,:1273,:1342,:1411,:1480. .withTags(tags)wheretagsis never declared —:1108; should be.withTags(true)(matches the documented usage and the TS sibling tab).
Nit: sdk/javascript/all-real-time-listeners.mdx:350 — comment typo "Message Delted" (JS sibling at :418 is correct). Cosmetic.
pinMessage, unpinMessage, saveMessage, unsaveMessage, pinConversation, unpinConversation, subscribeToThread, isPinned, isSaved, etc.) are absent from the latest published @cometchat/chat-sdk-javascript@4.1.13 (verified by unpacking the published tarball and grepping CometChat.js / CometChat.d.ts — 0 hits, while control methods sendMessage/editMessage/deleteMessage are present, so the negative is real, not a bad grep). If this publishes before the SDK release that ships these methods, the pin/save/thread pages document non-functional APIs — hold until the release ships, or confirm it lands together. No redirects needed (add-only).
Recommendation: fix the ~10 one-token code-example bugs before merge.
Docs review — ✅ Approve (one should-fix)The JavaScript SDK entry in this feature family (9 files, +1,521/−7). Structurally clean, 0 new broken links, and all 16 documented methods verify against the published package. ✅ API verified against published
|
| Package | Present in | Absent in |
|---|---|---|
@cometchat/chat-sdk-javascript |
4.2.0 only | 4.1.14 |
<Note>
**Available since v4.2.0** — pin, save, and thread subscriptions require
`@cometchat/chat-sdk-javascript` v4.2.0 or later. See [Setup](/sdk/javascript/setup) to upgrade.
</Note>🔁 Now 4 of 4 — worth fixing at the template level
| PR | Platform | Requires | Absent in (previously latest) |
|---|---|---|---|
| #461 | Flutter | cometchat_sdk 5.0.7 / uikit 6.1.1 |
5.0.6 / 6.1.0 |
| #493 | React Native | chat-sdk-react-native 4.1.0 |
4.0.29 |
| #464 | React | chat-uikit-react 7.2.0 |
7.1.0 |
| #469 | JavaScript | chat-sdk-javascript 4.2.0 |
4.1.14 |
Every one of these features exists only in the single newest release, and none of the pages say so. Four platforms, same omission — a process gap rather than four separate mistakes. With Android/iOS presumably still to come, adding the availability callout to the shared page template now fixes it once instead of six times. The transcription rollout (#487) already does this correctly across all 5 platforms — same pattern, ready to copy.
Content is accurate and well-structured. Approving on the assumption the version note lands here or in a quick follow-up. 🚀
🤖 Automated docs review (Mintlify link/redirect/nav checks + API verification against published @cometchat/chat-sdk-javascript).
jitvarpatil
left a comment
There was a problem hiding this comment.
Docs review — ✅ Approve (one should-fix)
The JavaScript SDK entry in this feature family (9 files, +1,521/−7). Structurally clean, 0 new broken links, and all 16 documented methods verify against the published package.
✅ API verified against published @cometchat/chat-sdk-javascript@4.2.0
All 16 methods present: pinMessage · unpinMessage · saveMessage · unsaveMessage · pinConversation · unpinConversation · subscribeToThread · unsubscribeFromThread · isPinMessageEnabled · isPinConversationEnabled · isSaveMessageEnabled · getPinnedMessagesLimit · getPinnedConversationsLimit · getSavedMessagesLimit · getSystemPinnedMessagesLimit · getSystemPinnedConversationsLimit
Structure: all 6 new pages wired into nav; 0 nav breaks, 0 orphans, redirects +0; no placeholders across 1,521 new lines. The 3 broken links the analyzer flagged (default-call, direct-call, interactive-messages) are pre-existing in unchanged files — none appear in this PR's added lines.
🟡 Should-fix — no minimum version stated
| Package | Present in | Absent in |
|---|---|---|
@cometchat/chat-sdk-javascript |
4.2.0 only | 4.1.14 |
<Note>
**Available since v4.2.0** — pin, save, and thread subscriptions require
`@cometchat/chat-sdk-javascript` v4.2.0 or later. See [Setup](/sdk/javascript/setup) to upgrade.
</Note>🔁 Now 4 of 4 — worth fixing at the template level
| PR | Platform | Requires | Absent in (previously latest) |
|---|---|---|---|
| #461 | Flutter | cometchat_sdk 5.0.7 / uikit 6.1.1 |
5.0.6 / 6.1.0 |
| #493 | React Native | chat-sdk-react-native 4.1.0 |
4.0.29 |
| #464 | React | chat-uikit-react 7.2.0 |
7.1.0 |
| #469 | JavaScript | chat-sdk-javascript 4.2.0 |
4.1.14 |
Every one of these features exists only in the single newest release, and none of the pages say so. Four platforms, same omission — a process gap rather than four separate mistakes. With Android/iOS presumably still to come, adding the availability callout to the shared page template now fixes it once instead of six times. The transcription rollout (#487) already does this correctly across all 5 platforms — same pattern, ready to copy.
Content is accurate and well-structured. Approving on the assumption the version note lands here or in a quick follow-up. 🚀
🤖 Automated docs review (Mintlify link/redirect/nav checks + API verification against published @cometchat/chat-sdk-javascript).
Description
Add documentation for pin/save messages, pin conversations and thread subscription
Related Issue(s)
Type of Change
Checklist
Additional Information
Screenshots (if applicable)