stream-chat 8.11.0 → 8.12.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/browser.es.js +23 -26
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.full-bundle.min.js +1 -1
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/browser.js +23 -26
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +23 -26
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +23 -26
- package/dist/index.js.map +1 -1
- package/dist/types/channel.d.ts +2 -10
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/client.d.ts +20 -17
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/types.d.ts +14 -1
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +2 -12
- package/src/client.ts +18 -14
- package/src/types.ts +16 -0
package/dist/index.es.js
CHANGED
|
@@ -6840,6 +6840,8 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6840
6840
|
|
|
6841
6841
|
_defineProperty(this, "updateUser", this.upsertUser);
|
|
6842
6842
|
|
|
6843
|
+
_defineProperty(this, "_unblockMessage", this.unblockMessage);
|
|
6844
|
+
|
|
6843
6845
|
_defineProperty(this, "markAllRead", this.markChannelsRead);
|
|
6844
6846
|
|
|
6845
6847
|
_defineProperty(this, "_isUsingServerAuth", function () {
|
|
@@ -8456,6 +8458,8 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8456
8458
|
}, {
|
|
8457
8459
|
key: "channel",
|
|
8458
8460
|
value: function channel(channelType, channelIDOrCustom) {
|
|
8461
|
+
var _custom$members;
|
|
8462
|
+
|
|
8459
8463
|
var custom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
8460
8464
|
|
|
8461
8465
|
if (!this.userID && !this._isUsingServerAuth()) {
|
|
@@ -8464,18 +8468,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8464
8468
|
|
|
8465
8469
|
if (~channelType.indexOf(':')) {
|
|
8466
8470
|
throw Error("Invalid channel group ".concat(channelType, ", can't contain the : character"));
|
|
8471
|
+
} // support channel("messaging", {options})
|
|
8472
|
+
|
|
8473
|
+
|
|
8474
|
+
if (channelIDOrCustom && _typeof(channelIDOrCustom) === 'object') {
|
|
8475
|
+
return this.getChannelByMembers(channelType, channelIDOrCustom);
|
|
8476
|
+
} // // support channel("messaging", undefined, {options})
|
|
8477
|
+
|
|
8478
|
+
|
|
8479
|
+
if (!channelIDOrCustom && _typeof(custom) === 'object' && (_custom$members = custom.members) !== null && _custom$members !== void 0 && _custom$members.length) {
|
|
8480
|
+
return this.getChannelByMembers(channelType, custom);
|
|
8467
8481
|
} // support channel("messaging", null, {options})
|
|
8468
8482
|
// support channel("messaging", undefined, {options})
|
|
8469
8483
|
// support channel("messaging", "", {options})
|
|
8470
8484
|
|
|
8471
8485
|
|
|
8472
|
-
if (channelIDOrCustom
|
|
8486
|
+
if (!channelIDOrCustom) {
|
|
8473
8487
|
return new Channel(this, channelType, undefined, custom);
|
|
8474
|
-
} // support channel("messaging", {options})
|
|
8475
|
-
|
|
8476
|
-
|
|
8477
|
-
if (_typeof(channelIDOrCustom) === 'object') {
|
|
8478
|
-
return this.getChannelByMembers(channelType, channelIDOrCustom);
|
|
8479
8488
|
}
|
|
8480
8489
|
|
|
8481
8490
|
return this.getChannelById(channelType, channelIDOrCustom, custom);
|
|
@@ -9574,22 +9583,18 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9574
9583
|
return _reviewFlagReport;
|
|
9575
9584
|
}()
|
|
9576
9585
|
/**
|
|
9577
|
-
*
|
|
9586
|
+
* unblockMessage - unblocks message blocked by automod
|
|
9578
9587
|
*
|
|
9579
|
-
* Note: Do not use this.
|
|
9580
|
-
* It is present for internal usage only.
|
|
9581
|
-
* This function can, and will, break and/or be removed at any point in time.
|
|
9582
9588
|
*
|
|
9583
|
-
* @private
|
|
9584
9589
|
* @param {string} targetMessageID
|
|
9585
9590
|
* @param {string} [options.user_id] currentUserID, only used with serverside auth
|
|
9586
9591
|
* @returns {Promise<APIResponse>}
|
|
9587
9592
|
*/
|
|
9588
9593
|
|
|
9589
9594
|
}, {
|
|
9590
|
-
key: "
|
|
9595
|
+
key: "unblockMessage",
|
|
9591
9596
|
value: function () {
|
|
9592
|
-
var
|
|
9597
|
+
var _unblockMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(targetMessageID) {
|
|
9593
9598
|
var options,
|
|
9594
9599
|
_args49 = arguments;
|
|
9595
9600
|
return _regeneratorRuntime.wrap(function _callee49$(_context49) {
|
|
@@ -9613,20 +9618,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9613
9618
|
}, _callee49, this);
|
|
9614
9619
|
}));
|
|
9615
9620
|
|
|
9616
|
-
function
|
|
9617
|
-
return
|
|
9621
|
+
function unblockMessage(_x63) {
|
|
9622
|
+
return _unblockMessage.apply(this, arguments);
|
|
9618
9623
|
}
|
|
9619
9624
|
|
|
9620
|
-
return
|
|
9621
|
-
}()
|
|
9622
|
-
/**
|
|
9623
|
-
* @deprecated use markChannelsRead instead
|
|
9624
|
-
*
|
|
9625
|
-
* markAllRead - marks all channels for this user as read
|
|
9626
|
-
* @param {MarkAllReadOptions<StreamChatGenerics>} [data]
|
|
9627
|
-
*
|
|
9628
|
-
* @return {Promise<APIResponse>}
|
|
9629
|
-
*/
|
|
9625
|
+
return unblockMessage;
|
|
9626
|
+
}() // alias for backwards compatibility
|
|
9630
9627
|
|
|
9631
9628
|
}, {
|
|
9632
9629
|
key: "markChannelsRead",
|
|
@@ -10049,7 +10046,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10049
10046
|
}, {
|
|
10050
10047
|
key: "getUserAgent",
|
|
10051
10048
|
value: function getUserAgent() {
|
|
10052
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
10049
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.12.0");
|
|
10053
10050
|
}
|
|
10054
10051
|
}, {
|
|
10055
10052
|
key: "setUserAgent",
|