uapp-communication-sdk 1.0.0-dev.82 → 1.0.0-dev.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -623,7 +623,7 @@ const presence = createPresenceClient({
|
|
|
623
623
|
getAssertion: () => fetch('/api/commhub-assertion').then((r) => r.text()),
|
|
624
624
|
});
|
|
625
625
|
|
|
626
|
-
const current = await presence.getMine();
|
|
626
|
+
const current = await presence.getMine(); // { status: 'available', source: 'connection', … }
|
|
627
627
|
await presence.setMine({ status: 'busy', minutes: 30, note: 'On a call' });
|
|
628
628
|
await presence.clearMine();
|
|
629
629
|
```
|
|
@@ -669,6 +669,24 @@ badge reads zero on every page load however long the person was away. `markAsRea
|
|
|
669
669
|
agreeing with the Hub. Requires the `commhub.feed` scope: that is what the notification hub is scoped
|
|
670
670
|
to.
|
|
671
671
|
|
|
672
|
+
**Chat messages do not appear here.** This client lists stored notifications, and a chat message
|
|
673
|
+
deliberately stores none — unread for a conversation is already answered by its own read pointer, and a
|
|
674
|
+
second store of the same fact is a second thing to keep in step. Mount a chat widget for live messages,
|
|
675
|
+
or take the webhook below.
|
|
676
|
+
|
|
677
|
+
#### This client, or a webhook?
|
|
678
|
+
|
|
679
|
+
| | `createNotificationClient` | `notification.created` webhook |
|
|
680
|
+
| -------- | ----------------------------------------- | -------------------------------------------- |
|
|
681
|
+
| Runs in | the browser, while a page is open | your server, always |
|
|
682
|
+
| Covers | feed and meeting notifications | **every** notification, chat included |
|
|
683
|
+
| Good for | a bell in a web app you already have open | push to a phone, email, anything server-side |
|
|
684
|
+
|
|
685
|
+
They are not alternatives so much as different reach. A web host that only needs a badge wants the
|
|
686
|
+
client; anything that must survive the tab being closed wants the webhook. Register it in
|
|
687
|
+
Settings → Webhooks → Registry; the contract, including how to verify the signature and why recipients
|
|
688
|
+
are matched by email rather than user id, is in [`../INTEGRATION.md`](../INTEGRATION.md) §5.
|
|
689
|
+
|
|
672
690
|
---
|
|
673
691
|
|
|
674
692
|
## 14. Package exports
|
package/package.json
CHANGED