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