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