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