stream-chat 9.26.1 → 9.27.0
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/dist/cjs/index.browser.js +28 -1
- package/dist/cjs/index.browser.js.map +2 -2
- package/dist/cjs/index.node.js +28 -1
- package/dist/cjs/index.node.js.map +2 -2
- package/dist/esm/index.mjs +28 -1
- package/dist/esm/index.mjs.map +2 -2
- package/dist/types/client.d.ts +13 -0
- package/package.json +1 -1
- package/src/client.ts +35 -0
|
@@ -14508,6 +14508,33 @@ var StreamChat = class _StreamChat {
|
|
|
14508
14508
|
}
|
|
14509
14509
|
);
|
|
14510
14510
|
}
|
|
14511
|
+
/**
|
|
14512
|
+
* Updates message fields without storing them in the database, only sends update event.
|
|
14513
|
+
*
|
|
14514
|
+
* Available only on the server-side.
|
|
14515
|
+
*
|
|
14516
|
+
* @param messageId the message id to update.
|
|
14517
|
+
* @param partialMessageObject the message payload.
|
|
14518
|
+
* @param partialUserOrUserId the user id linked to this action.
|
|
14519
|
+
* @param options additional options.
|
|
14520
|
+
*/
|
|
14521
|
+
async ephemeralUpdateMessage(messageId, partialMessageObject, partialUserOrUserId, options) {
|
|
14522
|
+
if (!messageId) throw Error("messageId is required");
|
|
14523
|
+
let user = void 0;
|
|
14524
|
+
if (typeof partialUserOrUserId === "string") {
|
|
14525
|
+
user = { id: partialUserOrUserId };
|
|
14526
|
+
} else if (typeof partialUserOrUserId?.id === "string") {
|
|
14527
|
+
user = { id: partialUserOrUserId.id };
|
|
14528
|
+
}
|
|
14529
|
+
return await this.patch(
|
|
14530
|
+
`${this.baseURL}/messages/${encodeURIComponent(messageId)}/ephemeral`,
|
|
14531
|
+
{
|
|
14532
|
+
...partialMessageObject,
|
|
14533
|
+
...options,
|
|
14534
|
+
user
|
|
14535
|
+
}
|
|
14536
|
+
);
|
|
14537
|
+
}
|
|
14511
14538
|
/**
|
|
14512
14539
|
* deleteMessage - Delete a message
|
|
14513
14540
|
*
|
|
@@ -14707,7 +14734,7 @@ var StreamChat = class _StreamChat {
|
|
|
14707
14734
|
if (this.userAgent) {
|
|
14708
14735
|
return this.userAgent;
|
|
14709
14736
|
}
|
|
14710
|
-
const version = "9.
|
|
14737
|
+
const version = "9.27.0";
|
|
14711
14738
|
const clientBundle = "browser-cjs";
|
|
14712
14739
|
let userAgentString = "";
|
|
14713
14740
|
if (this.sdkIdentifier) {
|