stream-chat 8.2.1 → 8.4.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 +159 -111
- 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 +159 -111
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +159 -111
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +159 -111
- package/dist/index.js.map +1 -1
- package/dist/types/channel.d.ts +10 -1
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/types.d.ts +8 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +21 -0
- package/src/client.ts +1 -0
- package/src/types.ts +9 -0
package/dist/browser.es.js
CHANGED
|
@@ -1506,6 +1506,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1506
1506
|
* @param {boolean} [options.skip_push] Skip sending push notifications
|
|
1507
1507
|
* @param {boolean} [options.is_pending_message] Make this message pending
|
|
1508
1508
|
* @param {Record<string,string>} [options.pending_message_metadata] Metadata for the pending message
|
|
1509
|
+
* @param {boolean} [options.force_moderation] Apply force moderation for server-side requests
|
|
1509
1510
|
*
|
|
1510
1511
|
* @return {Promise<SendMessageAPIResponse<StreamChatGenerics>>} The Server Response
|
|
1511
1512
|
*/
|
|
@@ -2767,6 +2768,53 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2767
2768
|
|
|
2768
2769
|
return markRead;
|
|
2769
2770
|
}()
|
|
2771
|
+
/**
|
|
2772
|
+
* markUnread - Mark the channel as unread from messageID, only works if the `read_events` setting is enabled
|
|
2773
|
+
*
|
|
2774
|
+
* @param {MarkUnreadOptions<StreamChatGenerics>} data
|
|
2775
|
+
* @return {APIResponse} An API response
|
|
2776
|
+
*/
|
|
2777
|
+
|
|
2778
|
+
}, {
|
|
2779
|
+
key: "markUnread",
|
|
2780
|
+
value: function () {
|
|
2781
|
+
var _markUnread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(data) {
|
|
2782
|
+
var _this$getConfig4;
|
|
2783
|
+
|
|
2784
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
2785
|
+
while (1) {
|
|
2786
|
+
switch (_context27.prev = _context27.next) {
|
|
2787
|
+
case 0:
|
|
2788
|
+
this._checkInitialized();
|
|
2789
|
+
|
|
2790
|
+
if ((_this$getConfig4 = this.getConfig()) !== null && _this$getConfig4 !== void 0 && _this$getConfig4.read_events) {
|
|
2791
|
+
_context27.next = 3;
|
|
2792
|
+
break;
|
|
2793
|
+
}
|
|
2794
|
+
|
|
2795
|
+
return _context27.abrupt("return", Promise.resolve(null));
|
|
2796
|
+
|
|
2797
|
+
case 3:
|
|
2798
|
+
_context27.next = 5;
|
|
2799
|
+
return this.getClient().post(this._channelURL() + '/unread', _objectSpread$5({}, data));
|
|
2800
|
+
|
|
2801
|
+
case 5:
|
|
2802
|
+
return _context27.abrupt("return", _context27.sent);
|
|
2803
|
+
|
|
2804
|
+
case 6:
|
|
2805
|
+
case "end":
|
|
2806
|
+
return _context27.stop();
|
|
2807
|
+
}
|
|
2808
|
+
}
|
|
2809
|
+
}, _callee27, this);
|
|
2810
|
+
}));
|
|
2811
|
+
|
|
2812
|
+
function markUnread(_x26) {
|
|
2813
|
+
return _markUnread.apply(this, arguments);
|
|
2814
|
+
}
|
|
2815
|
+
|
|
2816
|
+
return markUnread;
|
|
2817
|
+
}()
|
|
2770
2818
|
/**
|
|
2771
2819
|
* clean - Cleans the channel state and fires stop typing if needed
|
|
2772
2820
|
*/
|
|
@@ -2796,11 +2844,11 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2796
2844
|
}, {
|
|
2797
2845
|
key: "watch",
|
|
2798
2846
|
value: function () {
|
|
2799
|
-
var _watch = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2847
|
+
var _watch = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(options) {
|
|
2800
2848
|
var defaultOptions, combined, state;
|
|
2801
|
-
return _regeneratorRuntime.wrap(function
|
|
2849
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
2802
2850
|
while (1) {
|
|
2803
|
-
switch (
|
|
2851
|
+
switch (_context28.prev = _context28.next) {
|
|
2804
2852
|
case 0:
|
|
2805
2853
|
defaultOptions = {
|
|
2806
2854
|
state: true,
|
|
@@ -2808,7 +2856,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2808
2856
|
presence: false
|
|
2809
2857
|
}; // Make sure we wait for the connect promise if there is a pending one
|
|
2810
2858
|
|
|
2811
|
-
|
|
2859
|
+
_context28.next = 3;
|
|
2812
2860
|
return this.getClient().wsPromise;
|
|
2813
2861
|
|
|
2814
2862
|
case 3:
|
|
@@ -2817,11 +2865,11 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2817
2865
|
}
|
|
2818
2866
|
|
|
2819
2867
|
combined = _objectSpread$5(_objectSpread$5({}, defaultOptions), options);
|
|
2820
|
-
|
|
2868
|
+
_context28.next = 7;
|
|
2821
2869
|
return this.query(combined, 'latest');
|
|
2822
2870
|
|
|
2823
2871
|
case 7:
|
|
2824
|
-
state =
|
|
2872
|
+
state = _context28.sent;
|
|
2825
2873
|
this.initialized = true;
|
|
2826
2874
|
this.data = state.channel;
|
|
2827
2875
|
|
|
@@ -2830,17 +2878,17 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2830
2878
|
channel: this
|
|
2831
2879
|
});
|
|
2832
2880
|
|
|
2833
|
-
return
|
|
2881
|
+
return _context28.abrupt("return", state);
|
|
2834
2882
|
|
|
2835
2883
|
case 12:
|
|
2836
2884
|
case "end":
|
|
2837
|
-
return
|
|
2885
|
+
return _context28.stop();
|
|
2838
2886
|
}
|
|
2839
2887
|
}
|
|
2840
|
-
},
|
|
2888
|
+
}, _callee28, this);
|
|
2841
2889
|
}));
|
|
2842
2890
|
|
|
2843
|
-
function watch(
|
|
2891
|
+
function watch(_x27) {
|
|
2844
2892
|
return _watch.apply(this, arguments);
|
|
2845
2893
|
}
|
|
2846
2894
|
|
|
@@ -2855,31 +2903,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2855
2903
|
}, {
|
|
2856
2904
|
key: "stopWatching",
|
|
2857
2905
|
value: function () {
|
|
2858
|
-
var _stopWatching = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2906
|
+
var _stopWatching = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29() {
|
|
2859
2907
|
var response;
|
|
2860
|
-
return _regeneratorRuntime.wrap(function
|
|
2908
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
2861
2909
|
while (1) {
|
|
2862
|
-
switch (
|
|
2910
|
+
switch (_context29.prev = _context29.next) {
|
|
2863
2911
|
case 0:
|
|
2864
|
-
|
|
2912
|
+
_context29.next = 2;
|
|
2865
2913
|
return this.getClient().post(this._channelURL() + '/stop-watching', {});
|
|
2866
2914
|
|
|
2867
2915
|
case 2:
|
|
2868
|
-
response =
|
|
2916
|
+
response = _context29.sent;
|
|
2869
2917
|
|
|
2870
2918
|
this._client.logger('info', "channel:watch() - stopped watching channel ".concat(this.cid), {
|
|
2871
2919
|
tags: ['channel'],
|
|
2872
2920
|
channel: this
|
|
2873
2921
|
});
|
|
2874
2922
|
|
|
2875
|
-
return
|
|
2923
|
+
return _context29.abrupt("return", response);
|
|
2876
2924
|
|
|
2877
2925
|
case 5:
|
|
2878
2926
|
case "end":
|
|
2879
|
-
return
|
|
2927
|
+
return _context29.stop();
|
|
2880
2928
|
}
|
|
2881
2929
|
}
|
|
2882
|
-
},
|
|
2930
|
+
}, _callee29, this);
|
|
2883
2931
|
}));
|
|
2884
2932
|
|
|
2885
2933
|
function stopWatching() {
|
|
@@ -2900,34 +2948,34 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2900
2948
|
}, {
|
|
2901
2949
|
key: "getReplies",
|
|
2902
2950
|
value: function () {
|
|
2903
|
-
var _getReplies = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2951
|
+
var _getReplies = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(parent_id, options) {
|
|
2904
2952
|
var data;
|
|
2905
|
-
return _regeneratorRuntime.wrap(function
|
|
2953
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
2906
2954
|
while (1) {
|
|
2907
|
-
switch (
|
|
2955
|
+
switch (_context30.prev = _context30.next) {
|
|
2908
2956
|
case 0:
|
|
2909
|
-
|
|
2957
|
+
_context30.next = 2;
|
|
2910
2958
|
return this.getClient().get(this.getClient().baseURL + "/messages/".concat(parent_id, "/replies"), _objectSpread$5({}, options));
|
|
2911
2959
|
|
|
2912
2960
|
case 2:
|
|
2913
|
-
data =
|
|
2961
|
+
data = _context30.sent;
|
|
2914
2962
|
|
|
2915
2963
|
// add any messages to our thread state
|
|
2916
2964
|
if (data.messages) {
|
|
2917
2965
|
this.state.addMessagesSorted(data.messages);
|
|
2918
2966
|
}
|
|
2919
2967
|
|
|
2920
|
-
return
|
|
2968
|
+
return _context30.abrupt("return", data);
|
|
2921
2969
|
|
|
2922
2970
|
case 5:
|
|
2923
2971
|
case "end":
|
|
2924
|
-
return
|
|
2972
|
+
return _context30.stop();
|
|
2925
2973
|
}
|
|
2926
2974
|
}
|
|
2927
|
-
},
|
|
2975
|
+
}, _callee30, this);
|
|
2928
2976
|
}));
|
|
2929
2977
|
|
|
2930
|
-
function getReplies(
|
|
2978
|
+
function getReplies(_x28, _x29) {
|
|
2931
2979
|
return _getReplies.apply(this, arguments);
|
|
2932
2980
|
}
|
|
2933
2981
|
|
|
@@ -2945,15 +2993,15 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2945
2993
|
}, {
|
|
2946
2994
|
key: "getPinnedMessages",
|
|
2947
2995
|
value: function () {
|
|
2948
|
-
var _getPinnedMessages = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2996
|
+
var _getPinnedMessages = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(options) {
|
|
2949
2997
|
var sort,
|
|
2950
|
-
|
|
2951
|
-
return _regeneratorRuntime.wrap(function
|
|
2998
|
+
_args31 = arguments;
|
|
2999
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
2952
3000
|
while (1) {
|
|
2953
|
-
switch (
|
|
3001
|
+
switch (_context31.prev = _context31.next) {
|
|
2954
3002
|
case 0:
|
|
2955
|
-
sort =
|
|
2956
|
-
|
|
3003
|
+
sort = _args31.length > 1 && _args31[1] !== undefined ? _args31[1] : [];
|
|
3004
|
+
_context31.next = 3;
|
|
2957
3005
|
return this.getClient().get(this.getClient().baseURL + "/channels/".concat(this.type, "/").concat(this.id, "/pinned_messages"), {
|
|
2958
3006
|
payload: _objectSpread$5(_objectSpread$5({}, options), {}, {
|
|
2959
3007
|
sort: normalizeQuerySort(sort)
|
|
@@ -2961,17 +3009,17 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2961
3009
|
});
|
|
2962
3010
|
|
|
2963
3011
|
case 3:
|
|
2964
|
-
return
|
|
3012
|
+
return _context31.abrupt("return", _context31.sent);
|
|
2965
3013
|
|
|
2966
3014
|
case 4:
|
|
2967
3015
|
case "end":
|
|
2968
|
-
return
|
|
3016
|
+
return _context31.stop();
|
|
2969
3017
|
}
|
|
2970
3018
|
}
|
|
2971
|
-
},
|
|
3019
|
+
}, _callee31, this);
|
|
2972
3020
|
}));
|
|
2973
3021
|
|
|
2974
|
-
function getPinnedMessages(
|
|
3022
|
+
function getPinnedMessages(_x30) {
|
|
2975
3023
|
return _getPinnedMessages.apply(this, arguments);
|
|
2976
3024
|
}
|
|
2977
3025
|
|
|
@@ -3108,7 +3156,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3108
3156
|
* @return {Promise<QueryChannelAPIResponse<StreamChatGenerics>>} Returns a query response
|
|
3109
3157
|
*/
|
|
3110
3158
|
function () {
|
|
3111
|
-
var _query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
3159
|
+
var _query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(options) {
|
|
3112
3160
|
var messageSetToAddToIfDoesNotExist,
|
|
3113
3161
|
queryURL,
|
|
3114
3162
|
state,
|
|
@@ -3116,14 +3164,14 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3116
3164
|
tempChannelCid,
|
|
3117
3165
|
_this$_initializeStat,
|
|
3118
3166
|
messageSet,
|
|
3119
|
-
|
|
3167
|
+
_args32 = arguments;
|
|
3120
3168
|
|
|
3121
|
-
return _regeneratorRuntime.wrap(function
|
|
3169
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
3122
3170
|
while (1) {
|
|
3123
|
-
switch (
|
|
3171
|
+
switch (_context32.prev = _context32.next) {
|
|
3124
3172
|
case 0:
|
|
3125
|
-
messageSetToAddToIfDoesNotExist =
|
|
3126
|
-
|
|
3173
|
+
messageSetToAddToIfDoesNotExist = _args32.length > 1 && _args32[1] !== undefined ? _args32[1] : 'current';
|
|
3174
|
+
_context32.next = 3;
|
|
3127
3175
|
return this.getClient().wsPromise;
|
|
3128
3176
|
|
|
3129
3177
|
case 3:
|
|
@@ -3133,14 +3181,14 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3133
3181
|
queryURL += "/".concat(this.id);
|
|
3134
3182
|
}
|
|
3135
3183
|
|
|
3136
|
-
|
|
3184
|
+
_context32.next = 7;
|
|
3137
3185
|
return this.getClient().post(queryURL + '/query', _objectSpread$5({
|
|
3138
3186
|
data: this._data,
|
|
3139
3187
|
state: true
|
|
3140
3188
|
}, options));
|
|
3141
3189
|
|
|
3142
3190
|
case 7:
|
|
3143
|
-
state =
|
|
3191
|
+
state = _context32.sent;
|
|
3144
3192
|
|
|
3145
3193
|
// update the channel id if it was missing
|
|
3146
3194
|
if (!this.id) {
|
|
@@ -3177,17 +3225,17 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3177
3225
|
isLatestMessageSet: messageSet.isLatest
|
|
3178
3226
|
}
|
|
3179
3227
|
});
|
|
3180
|
-
return
|
|
3228
|
+
return _context32.abrupt("return", state);
|
|
3181
3229
|
|
|
3182
3230
|
case 14:
|
|
3183
3231
|
case "end":
|
|
3184
|
-
return
|
|
3232
|
+
return _context32.stop();
|
|
3185
3233
|
}
|
|
3186
3234
|
}
|
|
3187
|
-
},
|
|
3235
|
+
}, _callee32, this);
|
|
3188
3236
|
}));
|
|
3189
3237
|
|
|
3190
|
-
function query(
|
|
3238
|
+
function query(_x31) {
|
|
3191
3239
|
return _query.apply(this, arguments);
|
|
3192
3240
|
}
|
|
3193
3241
|
|
|
@@ -3204,31 +3252,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3204
3252
|
}, {
|
|
3205
3253
|
key: "banUser",
|
|
3206
3254
|
value: function () {
|
|
3207
|
-
var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
3208
|
-
return _regeneratorRuntime.wrap(function
|
|
3255
|
+
var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(targetUserID, options) {
|
|
3256
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
3209
3257
|
while (1) {
|
|
3210
|
-
switch (
|
|
3258
|
+
switch (_context33.prev = _context33.next) {
|
|
3211
3259
|
case 0:
|
|
3212
3260
|
this._checkInitialized();
|
|
3213
3261
|
|
|
3214
|
-
|
|
3262
|
+
_context33.next = 3;
|
|
3215
3263
|
return this.getClient().banUser(targetUserID, _objectSpread$5(_objectSpread$5({}, options), {}, {
|
|
3216
3264
|
type: this.type,
|
|
3217
3265
|
id: this.id
|
|
3218
3266
|
}));
|
|
3219
3267
|
|
|
3220
3268
|
case 3:
|
|
3221
|
-
return
|
|
3269
|
+
return _context33.abrupt("return", _context33.sent);
|
|
3222
3270
|
|
|
3223
3271
|
case 4:
|
|
3224
3272
|
case "end":
|
|
3225
|
-
return
|
|
3273
|
+
return _context33.stop();
|
|
3226
3274
|
}
|
|
3227
3275
|
}
|
|
3228
|
-
},
|
|
3276
|
+
}, _callee33, this);
|
|
3229
3277
|
}));
|
|
3230
3278
|
|
|
3231
|
-
function banUser(
|
|
3279
|
+
function banUser(_x32, _x33) {
|
|
3232
3280
|
return _banUser.apply(this, arguments);
|
|
3233
3281
|
}
|
|
3234
3282
|
|
|
@@ -3246,34 +3294,34 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3246
3294
|
}, {
|
|
3247
3295
|
key: "hide",
|
|
3248
3296
|
value: function () {
|
|
3249
|
-
var _hide = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
3297
|
+
var _hide = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34() {
|
|
3250
3298
|
var userId,
|
|
3251
3299
|
clearHistory,
|
|
3252
|
-
|
|
3253
|
-
return _regeneratorRuntime.wrap(function
|
|
3300
|
+
_args34 = arguments;
|
|
3301
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
3254
3302
|
while (1) {
|
|
3255
|
-
switch (
|
|
3303
|
+
switch (_context34.prev = _context34.next) {
|
|
3256
3304
|
case 0:
|
|
3257
|
-
userId =
|
|
3258
|
-
clearHistory =
|
|
3305
|
+
userId = _args34.length > 0 && _args34[0] !== undefined ? _args34[0] : null;
|
|
3306
|
+
clearHistory = _args34.length > 1 && _args34[1] !== undefined ? _args34[1] : false;
|
|
3259
3307
|
|
|
3260
3308
|
this._checkInitialized();
|
|
3261
3309
|
|
|
3262
|
-
|
|
3310
|
+
_context34.next = 5;
|
|
3263
3311
|
return this.getClient().post("".concat(this._channelURL(), "/hide"), {
|
|
3264
3312
|
user_id: userId,
|
|
3265
3313
|
clear_history: clearHistory
|
|
3266
3314
|
});
|
|
3267
3315
|
|
|
3268
3316
|
case 5:
|
|
3269
|
-
return
|
|
3317
|
+
return _context34.abrupt("return", _context34.sent);
|
|
3270
3318
|
|
|
3271
3319
|
case 6:
|
|
3272
3320
|
case "end":
|
|
3273
|
-
return
|
|
3321
|
+
return _context34.stop();
|
|
3274
3322
|
}
|
|
3275
3323
|
}
|
|
3276
|
-
},
|
|
3324
|
+
}, _callee34, this);
|
|
3277
3325
|
}));
|
|
3278
3326
|
|
|
3279
3327
|
function hide() {
|
|
@@ -3292,31 +3340,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3292
3340
|
}, {
|
|
3293
3341
|
key: "show",
|
|
3294
3342
|
value: function () {
|
|
3295
|
-
var _show = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
3343
|
+
var _show = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35() {
|
|
3296
3344
|
var userId,
|
|
3297
|
-
|
|
3298
|
-
return _regeneratorRuntime.wrap(function
|
|
3345
|
+
_args35 = arguments;
|
|
3346
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context35) {
|
|
3299
3347
|
while (1) {
|
|
3300
|
-
switch (
|
|
3348
|
+
switch (_context35.prev = _context35.next) {
|
|
3301
3349
|
case 0:
|
|
3302
|
-
userId =
|
|
3350
|
+
userId = _args35.length > 0 && _args35[0] !== undefined ? _args35[0] : null;
|
|
3303
3351
|
|
|
3304
3352
|
this._checkInitialized();
|
|
3305
3353
|
|
|
3306
|
-
|
|
3354
|
+
_context35.next = 4;
|
|
3307
3355
|
return this.getClient().post("".concat(this._channelURL(), "/show"), {
|
|
3308
3356
|
user_id: userId
|
|
3309
3357
|
});
|
|
3310
3358
|
|
|
3311
3359
|
case 4:
|
|
3312
|
-
return
|
|
3360
|
+
return _context35.abrupt("return", _context35.sent);
|
|
3313
3361
|
|
|
3314
3362
|
case 5:
|
|
3315
3363
|
case "end":
|
|
3316
|
-
return
|
|
3364
|
+
return _context35.stop();
|
|
3317
3365
|
}
|
|
3318
3366
|
}
|
|
3319
|
-
},
|
|
3367
|
+
}, _callee35, this);
|
|
3320
3368
|
}));
|
|
3321
3369
|
|
|
3322
3370
|
function show() {
|
|
@@ -3335,31 +3383,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3335
3383
|
}, {
|
|
3336
3384
|
key: "unbanUser",
|
|
3337
3385
|
value: function () {
|
|
3338
|
-
var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
3339
|
-
return _regeneratorRuntime.wrap(function
|
|
3386
|
+
var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(targetUserID) {
|
|
3387
|
+
return _regeneratorRuntime.wrap(function _callee36$(_context36) {
|
|
3340
3388
|
while (1) {
|
|
3341
|
-
switch (
|
|
3389
|
+
switch (_context36.prev = _context36.next) {
|
|
3342
3390
|
case 0:
|
|
3343
3391
|
this._checkInitialized();
|
|
3344
3392
|
|
|
3345
|
-
|
|
3393
|
+
_context36.next = 3;
|
|
3346
3394
|
return this.getClient().unbanUser(targetUserID, {
|
|
3347
3395
|
type: this.type,
|
|
3348
3396
|
id: this.id
|
|
3349
3397
|
});
|
|
3350
3398
|
|
|
3351
3399
|
case 3:
|
|
3352
|
-
return
|
|
3400
|
+
return _context36.abrupt("return", _context36.sent);
|
|
3353
3401
|
|
|
3354
3402
|
case 4:
|
|
3355
3403
|
case "end":
|
|
3356
|
-
return
|
|
3404
|
+
return _context36.stop();
|
|
3357
3405
|
}
|
|
3358
3406
|
}
|
|
3359
|
-
},
|
|
3407
|
+
}, _callee36, this);
|
|
3360
3408
|
}));
|
|
3361
3409
|
|
|
3362
|
-
function unbanUser(
|
|
3410
|
+
function unbanUser(_x34) {
|
|
3363
3411
|
return _unbanUser.apply(this, arguments);
|
|
3364
3412
|
}
|
|
3365
3413
|
|
|
@@ -3376,31 +3424,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3376
3424
|
}, {
|
|
3377
3425
|
key: "shadowBan",
|
|
3378
3426
|
value: function () {
|
|
3379
|
-
var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
3380
|
-
return _regeneratorRuntime.wrap(function
|
|
3427
|
+
var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(targetUserID, options) {
|
|
3428
|
+
return _regeneratorRuntime.wrap(function _callee37$(_context37) {
|
|
3381
3429
|
while (1) {
|
|
3382
|
-
switch (
|
|
3430
|
+
switch (_context37.prev = _context37.next) {
|
|
3383
3431
|
case 0:
|
|
3384
3432
|
this._checkInitialized();
|
|
3385
3433
|
|
|
3386
|
-
|
|
3434
|
+
_context37.next = 3;
|
|
3387
3435
|
return this.getClient().shadowBan(targetUserID, _objectSpread$5(_objectSpread$5({}, options), {}, {
|
|
3388
3436
|
type: this.type,
|
|
3389
3437
|
id: this.id
|
|
3390
3438
|
}));
|
|
3391
3439
|
|
|
3392
3440
|
case 3:
|
|
3393
|
-
return
|
|
3441
|
+
return _context37.abrupt("return", _context37.sent);
|
|
3394
3442
|
|
|
3395
3443
|
case 4:
|
|
3396
3444
|
case "end":
|
|
3397
|
-
return
|
|
3445
|
+
return _context37.stop();
|
|
3398
3446
|
}
|
|
3399
3447
|
}
|
|
3400
|
-
},
|
|
3448
|
+
}, _callee37, this);
|
|
3401
3449
|
}));
|
|
3402
3450
|
|
|
3403
|
-
function shadowBan(
|
|
3451
|
+
function shadowBan(_x35, _x36) {
|
|
3404
3452
|
return _shadowBan.apply(this, arguments);
|
|
3405
3453
|
}
|
|
3406
3454
|
|
|
@@ -3416,31 +3464,31 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3416
3464
|
}, {
|
|
3417
3465
|
key: "removeShadowBan",
|
|
3418
3466
|
value: function () {
|
|
3419
|
-
var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
3420
|
-
return _regeneratorRuntime.wrap(function
|
|
3467
|
+
var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(targetUserID) {
|
|
3468
|
+
return _regeneratorRuntime.wrap(function _callee38$(_context38) {
|
|
3421
3469
|
while (1) {
|
|
3422
|
-
switch (
|
|
3470
|
+
switch (_context38.prev = _context38.next) {
|
|
3423
3471
|
case 0:
|
|
3424
3472
|
this._checkInitialized();
|
|
3425
3473
|
|
|
3426
|
-
|
|
3474
|
+
_context38.next = 3;
|
|
3427
3475
|
return this.getClient().removeShadowBan(targetUserID, {
|
|
3428
3476
|
type: this.type,
|
|
3429
3477
|
id: this.id
|
|
3430
3478
|
});
|
|
3431
3479
|
|
|
3432
3480
|
case 3:
|
|
3433
|
-
return
|
|
3481
|
+
return _context38.abrupt("return", _context38.sent);
|
|
3434
3482
|
|
|
3435
3483
|
case 4:
|
|
3436
3484
|
case "end":
|
|
3437
|
-
return
|
|
3485
|
+
return _context38.stop();
|
|
3438
3486
|
}
|
|
3439
3487
|
}
|
|
3440
|
-
},
|
|
3488
|
+
}, _callee38, this);
|
|
3441
3489
|
}));
|
|
3442
3490
|
|
|
3443
|
-
function removeShadowBan(
|
|
3491
|
+
function removeShadowBan(_x37) {
|
|
3444
3492
|
return _removeShadowBan.apply(this, arguments);
|
|
3445
3493
|
}
|
|
3446
3494
|
|
|
@@ -3456,26 +3504,26 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3456
3504
|
}, {
|
|
3457
3505
|
key: "createCall",
|
|
3458
3506
|
value: function () {
|
|
3459
|
-
var _createCall = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
3460
|
-
return _regeneratorRuntime.wrap(function
|
|
3507
|
+
var _createCall = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(options) {
|
|
3508
|
+
return _regeneratorRuntime.wrap(function _callee39$(_context39) {
|
|
3461
3509
|
while (1) {
|
|
3462
|
-
switch (
|
|
3510
|
+
switch (_context39.prev = _context39.next) {
|
|
3463
3511
|
case 0:
|
|
3464
|
-
|
|
3512
|
+
_context39.next = 2;
|
|
3465
3513
|
return this.getClient().post(this._channelURL() + '/call', options);
|
|
3466
3514
|
|
|
3467
3515
|
case 2:
|
|
3468
|
-
return
|
|
3516
|
+
return _context39.abrupt("return", _context39.sent);
|
|
3469
3517
|
|
|
3470
3518
|
case 3:
|
|
3471
3519
|
case "end":
|
|
3472
|
-
return
|
|
3520
|
+
return _context39.stop();
|
|
3473
3521
|
}
|
|
3474
3522
|
}
|
|
3475
|
-
},
|
|
3523
|
+
}, _callee39, this);
|
|
3476
3524
|
}));
|
|
3477
3525
|
|
|
3478
|
-
function createCall(
|
|
3526
|
+
function createCall(_x38) {
|
|
3479
3527
|
return _createCall.apply(this, arguments);
|
|
3480
3528
|
}
|
|
3481
3529
|
|
|
@@ -9965,7 +10013,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9965
10013
|
}, {
|
|
9966
10014
|
key: "getUserAgent",
|
|
9967
10015
|
value: function getUserAgent() {
|
|
9968
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
10016
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.4.0");
|
|
9969
10017
|
}
|
|
9970
10018
|
}, {
|
|
9971
10019
|
key: "setUserAgent",
|
|
@@ -10005,7 +10053,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10005
10053
|
});
|
|
10006
10054
|
}
|
|
10007
10055
|
|
|
10008
|
-
return _objectSpread(_objectSpread({
|
|
10056
|
+
return _objectSpread(_objectSpread(_objectSpread({
|
|
10009
10057
|
params: _objectSpread({
|
|
10010
10058
|
user_id: this.userID,
|
|
10011
10059
|
connection_id: this._getConnectionID(),
|
|
@@ -10017,7 +10065,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10017
10065
|
}, options.headers)
|
|
10018
10066
|
}, signal ? {
|
|
10019
10067
|
signal: signal
|
|
10020
|
-
} : {}), options.config);
|
|
10068
|
+
} : {}), options.config), this.options.axiosRequestConfig);
|
|
10021
10069
|
}
|
|
10022
10070
|
}, {
|
|
10023
10071
|
key: "_getToken",
|