@ethora/chat-component 26.6.5 → 26.6.6

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.
@@ -1 +1,18 @@
1
1
  export declare const isLikelyMucJid: (jid: unknown) => jid is string;
2
+ /**
3
+ * True when `value` can be used as the localpart of a MUC room JID, i.e. it is
4
+ * safe to build `${value}@conference.<host>` from it.
5
+ *
6
+ * Ethora room localparts are always `<appId>_<roomId>`, so the underscore is a
7
+ * reliable discriminator against slice keys, plain flags and stray strings.
8
+ * Callers that already hold a full JID should use `isLikelyMucJid` instead.
9
+ */
10
+ export declare const isLikelyRoomLocalpart: (value: unknown) => value is string;
11
+ /**
12
+ * Normalise a room reference into a full MUC JID, or return null when the
13
+ * input cannot be one. Use at every point that would otherwise blindly do
14
+ * `chatJID.includes('@') ? chatJID : chatJID + '@' + conference`: that pattern
15
+ * silently manufactures a valid-looking JID out of any garbage handed to it,
16
+ * which is how slice keys ended up being joined as rooms.
17
+ */
18
+ export declare const toRoomJid: (chatJID: unknown, conference: string | undefined) => string | null;