sceyt-chat-react-uikit 1.6.8-beta.2 → 1.6.8-beta.4
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/index.js +490 -380
- package/index.modern.js +491 -381
- package/package.json +1 -1
package/index.modern.js
CHANGED
|
@@ -4,7 +4,7 @@ import log from 'loglevel';
|
|
|
4
4
|
import createSagaMiddleware, { eventChannel } from 'redux-saga';
|
|
5
5
|
import { createStore, combineReducers, applyMiddleware, compose } from 'redux';
|
|
6
6
|
import FileSaver from 'file-saver';
|
|
7
|
-
import { put, call,
|
|
7
|
+
import { select, put, call, take, takeLatest, takeEvery, all } from 'redux-saga/effects';
|
|
8
8
|
import { v4 } from 'uuid';
|
|
9
9
|
import styled, { createGlobalStyle, keyframes } from 'styled-components';
|
|
10
10
|
import LinkifyIt from 'linkify-it';
|
|
@@ -7390,6 +7390,9 @@ var ChannelReducer = (function (state, _temp) {
|
|
|
7390
7390
|
} else {
|
|
7391
7391
|
newState.channels = newState.channels.map(function (channel) {
|
|
7392
7392
|
if (channel.id === _channelId) {
|
|
7393
|
+
if (newState.activeChannel && Object.prototype.hasOwnProperty.call(newState.activeChannel, 'id') && channel.id === newState.activeChannel.id) {
|
|
7394
|
+
newState.activeChannel = _extends({}, newState.activeChannel, config);
|
|
7395
|
+
}
|
|
7393
7396
|
return _extends({}, channel, config);
|
|
7394
7397
|
}
|
|
7395
7398
|
return channel;
|
|
@@ -7409,9 +7412,10 @@ var ChannelReducer = (function (state, _temp) {
|
|
|
7409
7412
|
var updateData = payload.updateData,
|
|
7410
7413
|
groupName = payload.groupName,
|
|
7411
7414
|
_channelId2 = payload.channelId;
|
|
7412
|
-
|
|
7415
|
+
var groupKey = groupName;
|
|
7416
|
+
if (newState.searchedChannels[groupKey] && newState.searchedChannels[groupKey].length) {
|
|
7413
7417
|
var _extends2;
|
|
7414
|
-
newState.searchedChannels = _extends({}, newState.searchedChannels, (_extends2 = {}, _extends2[groupName] = [].concat(newState.searchedChannels[
|
|
7418
|
+
newState.searchedChannels = _extends({}, newState.searchedChannels, (_extends2 = {}, _extends2[groupName] = [].concat(newState.searchedChannels[groupKey]).map(function (channel) {
|
|
7415
7419
|
if (channel.id === _channelId2) {
|
|
7416
7420
|
return _extends({}, channel, updateData);
|
|
7417
7421
|
}
|
|
@@ -10433,11 +10437,12 @@ function updateMembersPresenceAC(usersMap) {
|
|
|
10433
10437
|
}
|
|
10434
10438
|
};
|
|
10435
10439
|
}
|
|
10436
|
-
function loadMoreMembersAC(limit) {
|
|
10440
|
+
function loadMoreMembersAC(limit, channelId) {
|
|
10437
10441
|
return {
|
|
10438
10442
|
type: LOAD_MORE_MEMBERS,
|
|
10439
10443
|
payload: {
|
|
10440
|
-
limit: limit
|
|
10444
|
+
limit: limit,
|
|
10445
|
+
channelId: channelId
|
|
10441
10446
|
}
|
|
10442
10447
|
};
|
|
10443
10448
|
}
|
|
@@ -11205,12 +11210,12 @@ var UploadingIcon = styled.span(_templateObject35 || (_templateObject35 = _tagge
|
|
|
11205
11210
|
});
|
|
11206
11211
|
var TextInOneLine = styled.span(_templateObject36 || (_templateObject36 = _taggedTemplateLiteralLoose(["\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n"])));
|
|
11207
11212
|
var CancelResumeWrapper = styled.span(_templateObject37 || (_templateObject37 = _taggedTemplateLiteralLoose(["\n position: absolute;\n width: 20px;\n height: 20px;\n z-index: 3;\n\n > svg {\n width: 20px;\n height: 20px;\n }\n"])));
|
|
11208
|
-
var UploadPercent = styled.span(_templateObject38 || (_templateObject38 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n color: #fff;\n width: ", ";\n height: ", ";\n
|
|
11213
|
+
var UploadPercent = styled.span(_templateObject38 || (_templateObject38 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n color: #fff;\n width: ", ";\n height: ", ";\n background-color: ", ";\n border-radius: ", ";\n}\n ", "\n"])), function (props) {
|
|
11209
11214
|
return props.fileAttachment || props.isRepliedMessage || props.isDetailsView ? '40px' : '56px';
|
|
11210
11215
|
}, function (props) {
|
|
11211
11216
|
return props.fileAttachment || props.isRepliedMessage || props.isDetailsView ? '40px' : '56px';
|
|
11212
11217
|
}, function (props) {
|
|
11213
|
-
return props.backgroundColor;
|
|
11218
|
+
return props.backgroundColor + "40";
|
|
11214
11219
|
}, function (props) {
|
|
11215
11220
|
return props.borderRadius ? props.borderRadius : props.fileAttachment ? '8px' : props.isRepliedMessage ? '4px' : ' 50%';
|
|
11216
11221
|
}, function (props) {
|
|
@@ -11459,7 +11464,68 @@ var MessageTextFormat = function MessageTextFormat(_ref2) {
|
|
|
11459
11464
|
}
|
|
11460
11465
|
};
|
|
11461
11466
|
|
|
11462
|
-
var _marked = /*#__PURE__*/_regeneratorRuntime().mark(
|
|
11467
|
+
var _marked = /*#__PURE__*/_regeneratorRuntime().mark(updateActiveChannelMembersAdd),
|
|
11468
|
+
_marked2 = /*#__PURE__*/_regeneratorRuntime().mark(updateActiveChannelMembersRemove);
|
|
11469
|
+
function updateActiveChannelMembersAdd(addedMembers) {
|
|
11470
|
+
var state, activeChannel, updatedMembers;
|
|
11471
|
+
return _regeneratorRuntime().wrap(function updateActiveChannelMembersAdd$(_context) {
|
|
11472
|
+
while (1) switch (_context.prev = _context.next) {
|
|
11473
|
+
case 0:
|
|
11474
|
+
_context.next = 2;
|
|
11475
|
+
return select();
|
|
11476
|
+
case 2:
|
|
11477
|
+
state = _context.sent;
|
|
11478
|
+
activeChannel = state.ChannelReducer.activeChannel;
|
|
11479
|
+
if (!(activeChannel && activeChannel.id)) {
|
|
11480
|
+
_context.next = 8;
|
|
11481
|
+
break;
|
|
11482
|
+
}
|
|
11483
|
+
updatedMembers = [].concat(activeChannel.members || [], addedMembers);
|
|
11484
|
+
updatedMembers = Array.from(new Set(updatedMembers));
|
|
11485
|
+
return _context.abrupt("return", {
|
|
11486
|
+
members: updatedMembers
|
|
11487
|
+
});
|
|
11488
|
+
case 8:
|
|
11489
|
+
return _context.abrupt("return", {});
|
|
11490
|
+
case 9:
|
|
11491
|
+
case "end":
|
|
11492
|
+
return _context.stop();
|
|
11493
|
+
}
|
|
11494
|
+
}, _marked);
|
|
11495
|
+
}
|
|
11496
|
+
function updateActiveChannelMembersRemove(removedMembers) {
|
|
11497
|
+
var state, activeChannel, updatedMembers;
|
|
11498
|
+
return _regeneratorRuntime().wrap(function updateActiveChannelMembersRemove$(_context2) {
|
|
11499
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
11500
|
+
case 0:
|
|
11501
|
+
_context2.next = 2;
|
|
11502
|
+
return select();
|
|
11503
|
+
case 2:
|
|
11504
|
+
state = _context2.sent;
|
|
11505
|
+
activeChannel = state.ChannelReducer.activeChannel;
|
|
11506
|
+
if (!(activeChannel && activeChannel.id)) {
|
|
11507
|
+
_context2.next = 8;
|
|
11508
|
+
break;
|
|
11509
|
+
}
|
|
11510
|
+
updatedMembers = (activeChannel.members || []).filter(function (member) {
|
|
11511
|
+
return !removedMembers.find(function (removed) {
|
|
11512
|
+
return removed.id === member.id;
|
|
11513
|
+
});
|
|
11514
|
+
});
|
|
11515
|
+
updatedMembers = Array.from(new Set(updatedMembers));
|
|
11516
|
+
return _context2.abrupt("return", {
|
|
11517
|
+
members: updatedMembers
|
|
11518
|
+
});
|
|
11519
|
+
case 8:
|
|
11520
|
+
return _context2.abrupt("return", {});
|
|
11521
|
+
case 9:
|
|
11522
|
+
case "end":
|
|
11523
|
+
return _context2.stop();
|
|
11524
|
+
}
|
|
11525
|
+
}, _marked2);
|
|
11526
|
+
}
|
|
11527
|
+
|
|
11528
|
+
var _marked$1 = /*#__PURE__*/_regeneratorRuntime().mark(watchForEvents);
|
|
11463
11529
|
function watchForEvents() {
|
|
11464
11530
|
var SceytChatClient, channelListener, connectionListener, usersTimeout, chan, _loop;
|
|
11465
11531
|
return _regeneratorRuntime().wrap(function watchForEvents$(_context2) {
|
|
@@ -11818,7 +11884,7 @@ function watchForEvents() {
|
|
|
11818
11884
|
};
|
|
11819
11885
|
});
|
|
11820
11886
|
_loop = /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
11821
|
-
var _yield$take, type, args, createdChannel, channelFilterTypes, getFromContacts, channelExists, _chan, channel, _chan2, _channel, member, _channelExists, _activeChannelId, groupName, _channel2, _channelExists2, _channel3, removedMembers, _activeChannelId2, _channelExists3, activeChannel, _groupName, _channel4, addedMembers, _activeChannelId3, _channelExists4, _groupName2, updatedChannel, _channelExists5, subject, avatarUrl, muted, mutedTill, metadata, _activeChannelId4, _groupName3, _channel5, message, messageToHandle, _channelFilterTypes, _activeChannelId5, _channelExists6, channelForAdd, hasNextMessage, _groupName4, showNotifications, tabIsActive, _state$ThemeReducer$n, _state$ThemeReducer$n2, _state$ThemeReducer$n3, _state$ThemeReducer$n4, _state$ThemeReducer$n5, _state$ThemeReducer$n6, contactsMap, _getFromContacts, state, theme, accentColor, textSecondary, messageBody, channelId, markerList, _channel6, _activeChannelId6, updateLastMessage, markersMap, lastMessage, _channelId, _channel7, _channel8, deletedMessage, _activeChannelId7, _channelExists7, _channel9, _message, _activeChannelId8, _channelExists8, _channel0, user, _message2, reaction, isSelf, _activeChannelId9, _state$ThemeReducer$n7, _state$ThemeReducer$n8, _state$ThemeReducer$n9, _state$ThemeReducer$n0, _state$ThemeReducer$n1, _state$ThemeReducer$n10, _contactsMap, _getFromContacts2, _state, _theme, _accentColor, _textSecondary, _messageBody, channelUpdateParams, _channel1, _user, _message3, _reaction, channelFromMap, _isSelf, _activeChannelId0, _channelUpdateParams, _channel10, _updatedChannel, _channel11, _activeChannelId1, channelExist, _channel12, _channel13, _channel14, _channel15, _channel16, _channel17, _channel18, _groupName5, _channel19, _groupName6, _channel20, members, _activeChannelId10, i, _channel21, _channel22, _channelId2, from, name, status;
|
|
11887
|
+
var _yield$take, type, args, createdChannel, channelFilterTypes, getFromContacts, channelExists, _chan, channel, _chan2, _channel, member, _channelExists, _activeChannelId, groupName, updateChannelData, _channel2, _channelExists2, _channel3, removedMembers, _activeChannelId2, _channelExists3, activeChannel, _updateChannelData, _groupName, _channel4, addedMembers, _activeChannelId3, _channelExists4, _updateChannelData2, _groupName2, updatedChannel, _channelExists5, subject, avatarUrl, muted, mutedTill, metadata, _activeChannelId4, _groupName3, _channel5, message, messageToHandle, _channelFilterTypes, _activeChannelId5, _channelExists6, channelForAdd, hasNextMessage, _groupName4, showNotifications, tabIsActive, _state$ThemeReducer$n, _state$ThemeReducer$n2, _state$ThemeReducer$n3, _state$ThemeReducer$n4, _state$ThemeReducer$n5, _state$ThemeReducer$n6, contactsMap, _getFromContacts, state, theme, accentColor, textSecondary, messageBody, channelId, markerList, _channel6, _activeChannelId6, updateLastMessage, markersMap, lastMessage, _channelId, _channel7, _channel8, deletedMessage, _activeChannelId7, _channelExists7, _channel9, _message, _activeChannelId8, _channelExists8, _channel0, user, _message2, reaction, isSelf, _activeChannelId9, _state$ThemeReducer$n7, _state$ThemeReducer$n8, _state$ThemeReducer$n9, _state$ThemeReducer$n0, _state$ThemeReducer$n1, _state$ThemeReducer$n10, _contactsMap, _getFromContacts2, _state, _theme, _accentColor, _textSecondary, _messageBody, channelUpdateParams, _channel1, _user, _message3, _reaction, channelFromMap, _isSelf, _activeChannelId0, _channelUpdateParams, _channel10, _updatedChannel, _channel11, _activeChannelId1, channelExist, _channel12, _channel13, _channel14, _channel15, _channel16, _channel17, _channel18, _groupName5, _channel19, _groupName6, _channel20, members, _activeChannelId10, i, _channel21, _channel22, _channelId2, from, name, status;
|
|
11822
11888
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11823
11889
|
while (1) switch (_context.prev = _context.next) {
|
|
11824
11890
|
case 0:
|
|
@@ -11829,7 +11895,7 @@ function watchForEvents() {
|
|
|
11829
11895
|
type = _yield$take.type;
|
|
11830
11896
|
args = _yield$take.args;
|
|
11831
11897
|
_context.t0 = type;
|
|
11832
|
-
_context.next = _context.t0 === CHANNEL_EVENT_TYPES.CREATE ? 8 : _context.t0 === CHANNEL_EVENT_TYPES.JOIN ? 25 : _context.t0 === CHANNEL_EVENT_TYPES.LEAVE ? 34 : _context.t0 === CHANNEL_EVENT_TYPES.BLOCK ?
|
|
11898
|
+
_context.next = _context.t0 === CHANNEL_EVENT_TYPES.CREATE ? 8 : _context.t0 === CHANNEL_EVENT_TYPES.JOIN ? 25 : _context.t0 === CHANNEL_EVENT_TYPES.LEAVE ? 34 : _context.t0 === CHANNEL_EVENT_TYPES.BLOCK ? 62 : _context.t0 === CHANNEL_EVENT_TYPES.UNBLOCK ? 69 : _context.t0 === CHANNEL_EVENT_TYPES.KICK_MEMBERS ? 71 : _context.t0 === CHANNEL_EVENT_TYPES.ADD_MEMBERS ? 104 : _context.t0 === CHANNEL_EVENT_TYPES.UPDATE_CHANNEL ? 131 : _context.t0 === CHANNEL_EVENT_TYPES.MESSAGE ? 149 : _context.t0 === CHANNEL_EVENT_TYPES.MESSAGE_MARKERS_RECEIVED ? 216 : _context.t0 === CHANNEL_EVENT_TYPES.DELETE ? 239 : _context.t0 === CHANNEL_EVENT_TYPES.DELETE_MESSAGE ? 246 : _context.t0 === CHANNEL_EVENT_TYPES.EDIT_MESSAGE ? 263 : _context.t0 === CHANNEL_EVENT_TYPES.REACTION_ADDED ? 278 : _context.t0 === CHANNEL_EVENT_TYPES.REACTION_DELETED ? 306 : _context.t0 === CHANNEL_EVENT_TYPES.UNREAD_MESSAGES_INFO ? 322 : _context.t0 === CHANNEL_EVENT_TYPES.CLEAR_HISTORY ? 329 : _context.t0 === CHANNEL_EVENT_TYPES.MUTE ? 347 : _context.t0 === CHANNEL_EVENT_TYPES.UNMUTE ? 353 : _context.t0 === CHANNEL_EVENT_TYPES.PINED ? 359 : _context.t0 === CHANNEL_EVENT_TYPES.UNPINED ? 365 : _context.t0 === CHANNEL_EVENT_TYPES.HIDE ? 371 : _context.t0 === CHANNEL_EVENT_TYPES.UNHIDE ? 376 : _context.t0 === CHANNEL_EVENT_TYPES.CHANNEL_MARKED_AS_UNREAD ? 381 : _context.t0 === CHANNEL_EVENT_TYPES.CHANNEL_MARKED_AS_READ ? 389 : _context.t0 === CHANNEL_EVENT_TYPES.CHANGE_ROLE ? 397 : _context.t0 === CHANNEL_EVENT_TYPES.FROZEN ? 416 : _context.t0 === CHANNEL_EVENT_TYPES.UNFROZEN ? 419 : _context.t0 === CHANNEL_EVENT_TYPES.CHANNEL_EVENT ? 422 : _context.t0 === CONNECTION_EVENT_TYPES.CONNECTION_STATUS_CHANGED ? 453 : 461;
|
|
11833
11899
|
break;
|
|
11834
11900
|
case 8:
|
|
11835
11901
|
createdChannel = args.createdChannel;
|
|
@@ -11863,7 +11929,7 @@ function watchForEvents() {
|
|
|
11863
11929
|
addChannelToAllChannels(createdChannel);
|
|
11864
11930
|
}
|
|
11865
11931
|
case 24:
|
|
11866
|
-
return _context.abrupt("break",
|
|
11932
|
+
return _context.abrupt("break", 462);
|
|
11867
11933
|
case 25:
|
|
11868
11934
|
channel = args.channel;
|
|
11869
11935
|
log.info('channel JOIN ... . ', channel);
|
|
@@ -11874,7 +11940,7 @@ function watchForEvents() {
|
|
|
11874
11940
|
if (!_chan2) {
|
|
11875
11941
|
addChannelToAllChannels(channel);
|
|
11876
11942
|
}
|
|
11877
|
-
return _context.abrupt("break",
|
|
11943
|
+
return _context.abrupt("break", 462);
|
|
11878
11944
|
case 34:
|
|
11879
11945
|
_channel = args.channel, member = args.member;
|
|
11880
11946
|
log.info('channel LEAVE ... ', _channel, member);
|
|
@@ -11892,208 +11958,227 @@ function watchForEvents() {
|
|
|
11892
11958
|
case 43:
|
|
11893
11959
|
removeChannelFromMap(_channel.id);
|
|
11894
11960
|
deleteChannelFromAllChannels(_channel.id);
|
|
11895
|
-
_context.next =
|
|
11961
|
+
_context.next = 61;
|
|
11896
11962
|
break;
|
|
11897
11963
|
case 47:
|
|
11898
11964
|
groupName = getChannelGroupName(_channel);
|
|
11899
11965
|
if (!_channelExists) {
|
|
11900
|
-
_context.next =
|
|
11966
|
+
_context.next = 58;
|
|
11901
11967
|
break;
|
|
11902
11968
|
}
|
|
11969
|
+
updateChannelData = {};
|
|
11903
11970
|
if (!(_activeChannelId === _channel.id)) {
|
|
11904
|
-
_context.next =
|
|
11971
|
+
_context.next = 56;
|
|
11905
11972
|
break;
|
|
11906
11973
|
}
|
|
11907
|
-
_context.next =
|
|
11974
|
+
_context.next = 53;
|
|
11908
11975
|
return put(removeMemberFromListAC([member]));
|
|
11909
|
-
case
|
|
11910
|
-
_context.next =
|
|
11911
|
-
return
|
|
11976
|
+
case 53:
|
|
11977
|
+
_context.next = 55;
|
|
11978
|
+
return call(updateActiveChannelMembersRemove, [member]) || {};
|
|
11979
|
+
case 55:
|
|
11980
|
+
updateChannelData = _context.sent;
|
|
11981
|
+
case 56:
|
|
11982
|
+
_context.next = 58;
|
|
11983
|
+
return put(updateChannelDataAC(_channel.id, _extends({
|
|
11912
11984
|
memberCount: _channel.memberCount,
|
|
11913
11985
|
muted: _channel.muted,
|
|
11914
11986
|
mutedTill: _channel.mutedTill
|
|
11915
|
-
}));
|
|
11916
|
-
case
|
|
11917
|
-
_context.next =
|
|
11987
|
+
}, updateChannelData)));
|
|
11988
|
+
case 58:
|
|
11989
|
+
_context.next = 60;
|
|
11918
11990
|
return put(updateSearchedChannelDataAC(_channel.id, {
|
|
11919
11991
|
memberCount: _channel.memberCount,
|
|
11920
11992
|
muted: _channel.muted,
|
|
11921
11993
|
mutedTill: _channel.mutedTill
|
|
11922
11994
|
}, groupName));
|
|
11923
|
-
case
|
|
11995
|
+
case 60:
|
|
11924
11996
|
updateChannelOnAllChannels(_channel.id, {
|
|
11925
11997
|
memberCount: _channel.memberCount,
|
|
11926
11998
|
muted: _channel.muted,
|
|
11927
11999
|
mutedTill: _channel.mutedTill
|
|
11928
12000
|
});
|
|
11929
|
-
case
|
|
11930
|
-
return _context.abrupt("break",
|
|
11931
|
-
case
|
|
12001
|
+
case 61:
|
|
12002
|
+
return _context.abrupt("break", 462);
|
|
12003
|
+
case 62:
|
|
11932
12004
|
log.info('channel BLOCK ... ');
|
|
11933
12005
|
_channel2 = args.channel;
|
|
11934
12006
|
_channelExists2 = checkChannelExists(_channel2.id);
|
|
11935
12007
|
if (!_channelExists2) {
|
|
11936
|
-
_context.next =
|
|
12008
|
+
_context.next = 68;
|
|
11937
12009
|
break;
|
|
11938
12010
|
}
|
|
11939
|
-
_context.next =
|
|
12011
|
+
_context.next = 68;
|
|
11940
12012
|
return put(removeChannelAC(_channel2.id));
|
|
11941
|
-
case
|
|
11942
|
-
return _context.abrupt("break",
|
|
11943
|
-
case
|
|
12013
|
+
case 68:
|
|
12014
|
+
return _context.abrupt("break", 462);
|
|
12015
|
+
case 69:
|
|
11944
12016
|
log.info('channel UNBLOCK ... ');
|
|
11945
|
-
return _context.abrupt("break",
|
|
11946
|
-
case
|
|
12017
|
+
return _context.abrupt("break", 462);
|
|
12018
|
+
case 71:
|
|
11947
12019
|
_channel3 = args.channel, removedMembers = args.removedMembers;
|
|
11948
12020
|
log.info('channel KICK_MEMBERS ... ', removedMembers);
|
|
11949
|
-
_context.next =
|
|
12021
|
+
_context.next = 75;
|
|
11950
12022
|
return call(getActiveChannelId);
|
|
11951
|
-
case
|
|
12023
|
+
case 75:
|
|
11952
12024
|
_activeChannelId2 = _context.sent;
|
|
11953
12025
|
_channelExists3 = checkChannelExists(_channel3.id);
|
|
11954
12026
|
if (!_channelExists3) {
|
|
11955
|
-
_context.next =
|
|
12027
|
+
_context.next = 102;
|
|
11956
12028
|
break;
|
|
11957
12029
|
}
|
|
11958
12030
|
if (!removedMembers.find(function (mem) {
|
|
11959
12031
|
return mem.id === SceytChatClient.user.id;
|
|
11960
12032
|
})) {
|
|
11961
|
-
_context.next =
|
|
12033
|
+
_context.next = 90;
|
|
11962
12034
|
break;
|
|
11963
12035
|
}
|
|
11964
12036
|
removeChannelFromMap(_channel3.id);
|
|
11965
|
-
_context.next =
|
|
12037
|
+
_context.next = 82;
|
|
11966
12038
|
return put(removeChannelAC(_channel3.id));
|
|
11967
|
-
case
|
|
11968
|
-
_context.next =
|
|
12039
|
+
case 82:
|
|
12040
|
+
_context.next = 84;
|
|
11969
12041
|
return call(getLastChannelFromMap);
|
|
11970
|
-
case
|
|
12042
|
+
case 84:
|
|
11971
12043
|
activeChannel = _context.sent;
|
|
11972
12044
|
if (!activeChannel) {
|
|
11973
|
-
_context.next =
|
|
12045
|
+
_context.next = 88;
|
|
11974
12046
|
break;
|
|
11975
12047
|
}
|
|
11976
|
-
_context.next =
|
|
12048
|
+
_context.next = 88;
|
|
11977
12049
|
return put(switchChannelActionAC(JSON.parse(JSON.stringify(activeChannel))));
|
|
11978
|
-
case
|
|
11979
|
-
_context.next =
|
|
12050
|
+
case 88:
|
|
12051
|
+
_context.next = 102;
|
|
11980
12052
|
break;
|
|
11981
|
-
case
|
|
12053
|
+
case 90:
|
|
12054
|
+
_updateChannelData = {};
|
|
11982
12055
|
if (!(_activeChannelId2 === _channel3.id)) {
|
|
11983
|
-
_context.next =
|
|
12056
|
+
_context.next = 97;
|
|
11984
12057
|
break;
|
|
11985
12058
|
}
|
|
11986
|
-
_context.next =
|
|
12059
|
+
_context.next = 94;
|
|
11987
12060
|
return put(removeMemberFromListAC(removedMembers));
|
|
11988
|
-
case
|
|
12061
|
+
case 94:
|
|
12062
|
+
_context.next = 96;
|
|
12063
|
+
return call(updateActiveChannelMembersRemove, removedMembers) || {};
|
|
12064
|
+
case 96:
|
|
12065
|
+
_updateChannelData = _context.sent;
|
|
12066
|
+
case 97:
|
|
11989
12067
|
_groupName = getChannelGroupName(_channel3);
|
|
11990
|
-
_context.next =
|
|
12068
|
+
_context.next = 100;
|
|
11991
12069
|
return put(updateSearchedChannelDataAC(_channel3.id, {
|
|
11992
12070
|
memberCount: _channel3.memberCount,
|
|
11993
12071
|
muted: _channel3.muted,
|
|
11994
12072
|
mutedTill: _channel3.mutedTill
|
|
11995
12073
|
}, _groupName));
|
|
11996
|
-
case
|
|
11997
|
-
_context.next =
|
|
11998
|
-
return put(updateChannelDataAC(_channel3.id, {
|
|
12074
|
+
case 100:
|
|
12075
|
+
_context.next = 102;
|
|
12076
|
+
return put(updateChannelDataAC(_channel3.id, _extends({
|
|
11999
12077
|
memberCount: _channel3.memberCount,
|
|
12000
12078
|
muted: _channel3.muted,
|
|
12001
12079
|
mutedTill: _channel3.mutedTill
|
|
12002
|
-
}));
|
|
12003
|
-
case
|
|
12080
|
+
}, _updateChannelData)));
|
|
12081
|
+
case 102:
|
|
12004
12082
|
updateChannelOnAllChannels(_channel3.id, {
|
|
12005
12083
|
memberCount: _channel3.memberCount,
|
|
12006
12084
|
muted: _channel3.muted,
|
|
12007
12085
|
mutedTill: _channel3.mutedTill
|
|
12008
12086
|
});
|
|
12009
|
-
return _context.abrupt("break",
|
|
12010
|
-
case
|
|
12087
|
+
return _context.abrupt("break", 462);
|
|
12088
|
+
case 104:
|
|
12011
12089
|
_channel4 = args.channel, addedMembers = args.addedMembers;
|
|
12012
12090
|
log.info('channel ADD_MEMBERS ... ', addedMembers);
|
|
12013
|
-
_context.next =
|
|
12091
|
+
_context.next = 108;
|
|
12014
12092
|
return call(getActiveChannelId);
|
|
12015
|
-
case
|
|
12093
|
+
case 108:
|
|
12016
12094
|
_activeChannelId3 = _context.sent;
|
|
12017
12095
|
_channelExists4 = checkChannelExists(_channel4.id);
|
|
12018
12096
|
if (!_channelExists4) {
|
|
12019
|
-
_context.next =
|
|
12097
|
+
_context.next = 122;
|
|
12020
12098
|
break;
|
|
12021
12099
|
}
|
|
12100
|
+
_updateChannelData2 = {};
|
|
12022
12101
|
if (!(_activeChannelId3 === _channel4.id)) {
|
|
12023
|
-
_context.next =
|
|
12102
|
+
_context.next = 118;
|
|
12024
12103
|
break;
|
|
12025
12104
|
}
|
|
12026
|
-
_context.next =
|
|
12105
|
+
_context.next = 115;
|
|
12027
12106
|
return put(addMembersToListAC(addedMembers));
|
|
12028
|
-
case
|
|
12029
|
-
_context.next =
|
|
12030
|
-
return
|
|
12107
|
+
case 115:
|
|
12108
|
+
_context.next = 117;
|
|
12109
|
+
return call(updateActiveChannelMembersAdd, addedMembers) || {};
|
|
12110
|
+
case 117:
|
|
12111
|
+
_updateChannelData2 = _context.sent;
|
|
12112
|
+
case 118:
|
|
12113
|
+
_context.next = 120;
|
|
12114
|
+
return put(updateChannelDataAC(_channel4.id, _extends({
|
|
12031
12115
|
memberCount: _channel4.memberCount,
|
|
12032
12116
|
muted: _channel4.muted,
|
|
12033
12117
|
mutedTill: _channel4.mutedTill
|
|
12034
|
-
}));
|
|
12035
|
-
case
|
|
12036
|
-
_context.next =
|
|
12118
|
+
}, _updateChannelData2)));
|
|
12119
|
+
case 120:
|
|
12120
|
+
_context.next = 126;
|
|
12037
12121
|
break;
|
|
12038
|
-
case
|
|
12039
|
-
_context.next =
|
|
12122
|
+
case 122:
|
|
12123
|
+
_context.next = 124;
|
|
12040
12124
|
return call(setChannelInMap, _channel4);
|
|
12041
|
-
case
|
|
12042
|
-
_context.next =
|
|
12125
|
+
case 124:
|
|
12126
|
+
_context.next = 126;
|
|
12043
12127
|
return put(setAddedToChannelAC(JSON.parse(JSON.stringify(_channel4))));
|
|
12044
|
-
case
|
|
12128
|
+
case 126:
|
|
12045
12129
|
_groupName2 = getChannelGroupName(_channel4);
|
|
12046
|
-
_context.next =
|
|
12130
|
+
_context.next = 129;
|
|
12047
12131
|
return put(updateSearchedChannelDataAC(_channel4.id, {
|
|
12048
12132
|
memberCount: _channel4.memberCount,
|
|
12049
12133
|
muted: _channel4.muted,
|
|
12050
12134
|
mutedTill: _channel4.mutedTill
|
|
12051
12135
|
}, _groupName2));
|
|
12052
|
-
case
|
|
12136
|
+
case 129:
|
|
12053
12137
|
updateChannelOnAllChannels(_channel4.id, {
|
|
12054
12138
|
memberCount: _channel4.memberCount,
|
|
12055
12139
|
muted: _channel4.muted,
|
|
12056
12140
|
mutedTill: _channel4.mutedTill
|
|
12057
12141
|
});
|
|
12058
|
-
return _context.abrupt("break",
|
|
12059
|
-
case
|
|
12142
|
+
return _context.abrupt("break", 462);
|
|
12143
|
+
case 131:
|
|
12144
|
+
log.info('channel UPDATE_CHANNEL ... ');
|
|
12060
12145
|
updatedChannel = args.updatedChannel;
|
|
12061
12146
|
_channelExists5 = checkChannelExists(updatedChannel.id);
|
|
12062
12147
|
subject = updatedChannel.subject, avatarUrl = updatedChannel.avatarUrl, muted = updatedChannel.muted, mutedTill = updatedChannel.mutedTill, metadata = updatedChannel.metadata;
|
|
12063
12148
|
if (!_channelExists5) {
|
|
12064
|
-
_context.next =
|
|
12149
|
+
_context.next = 144;
|
|
12065
12150
|
break;
|
|
12066
12151
|
}
|
|
12067
|
-
_context.next =
|
|
12152
|
+
_context.next = 138;
|
|
12068
12153
|
return put(updateChannelDataAC(updatedChannel.id, {
|
|
12069
12154
|
subject: subject,
|
|
12070
12155
|
avatarUrl: avatarUrl,
|
|
12071
12156
|
muted: muted,
|
|
12072
12157
|
mutedTill: mutedTill
|
|
12073
12158
|
}));
|
|
12074
|
-
case
|
|
12075
|
-
_context.next =
|
|
12159
|
+
case 138:
|
|
12160
|
+
_context.next = 140;
|
|
12076
12161
|
return call(getActiveChannelId);
|
|
12077
|
-
case
|
|
12162
|
+
case 140:
|
|
12078
12163
|
_activeChannelId4 = _context.sent;
|
|
12079
12164
|
if (!(_activeChannelId4 === updatedChannel.id)) {
|
|
12080
|
-
_context.next =
|
|
12165
|
+
_context.next = 144;
|
|
12081
12166
|
break;
|
|
12082
12167
|
}
|
|
12083
|
-
_context.next =
|
|
12168
|
+
_context.next = 144;
|
|
12084
12169
|
return put(setActiveChannelAC(_extends({}, updatedChannel, {
|
|
12085
12170
|
metadata: isJSON(metadata) ? JSON.parse(metadata) : metadata
|
|
12086
12171
|
})));
|
|
12087
|
-
case
|
|
12172
|
+
case 144:
|
|
12088
12173
|
_groupName3 = getChannelGroupName(updatedChannel);
|
|
12089
|
-
_context.next =
|
|
12174
|
+
_context.next = 147;
|
|
12090
12175
|
return put(updateSearchedChannelDataAC(updatedChannel.id, {
|
|
12091
12176
|
subject: subject,
|
|
12092
12177
|
avatarUrl: avatarUrl,
|
|
12093
12178
|
muted: muted,
|
|
12094
12179
|
mutedTill: mutedTill
|
|
12095
12180
|
}, _groupName3));
|
|
12096
|
-
case
|
|
12181
|
+
case 147:
|
|
12097
12182
|
updateChannelOnAllChannels(updatedChannel.id, {
|
|
12098
12183
|
subject: subject,
|
|
12099
12184
|
avatarUrl: avatarUrl,
|
|
@@ -12101,102 +12186,102 @@ function watchForEvents() {
|
|
|
12101
12186
|
mutedTill: mutedTill,
|
|
12102
12187
|
metadata: isJSON(metadata) ? JSON.parse(metadata) : metadata
|
|
12103
12188
|
});
|
|
12104
|
-
return _context.abrupt("break",
|
|
12105
|
-
case
|
|
12189
|
+
return _context.abrupt("break", 462);
|
|
12190
|
+
case 149:
|
|
12106
12191
|
_channel5 = args.channel, message = args.message;
|
|
12107
12192
|
log.info('channel MESSAGE ... id : ', message.id, ' message: ', message, ' channel.id: ', _channel5.id);
|
|
12108
12193
|
messageToHandle = handleNewMessages ? handleNewMessages(message, _channel5) : message;
|
|
12109
12194
|
_channelFilterTypes = getChannelTypesFilter();
|
|
12110
12195
|
if (!(messageToHandle && _channel5 && (_channelFilterTypes !== null && _channelFilterTypes !== void 0 && _channelFilterTypes.length ? _channelFilterTypes.includes(_channel5.type) : true))) {
|
|
12111
|
-
_context.next =
|
|
12196
|
+
_context.next = 215;
|
|
12112
12197
|
break;
|
|
12113
12198
|
}
|
|
12114
12199
|
_channel5.metadata = isJSON(_channel5.metadata) ? JSON.parse(_channel5.metadata) : _channel5.metadata;
|
|
12115
|
-
_context.next =
|
|
12200
|
+
_context.next = 157;
|
|
12116
12201
|
return call(getActiveChannelId);
|
|
12117
|
-
case
|
|
12202
|
+
case 157:
|
|
12118
12203
|
_activeChannelId5 = _context.sent;
|
|
12119
12204
|
_channelExists6 = checkChannelExists(_channel5.id);
|
|
12120
12205
|
channelForAdd = JSON.parse(JSON.stringify(_channel5));
|
|
12121
|
-
_context.next =
|
|
12206
|
+
_context.next = 162;
|
|
12122
12207
|
return put(addChannelAC(channelForAdd));
|
|
12123
|
-
case
|
|
12208
|
+
case 162:
|
|
12124
12209
|
if (_channelExists6) {
|
|
12125
|
-
_context.next =
|
|
12210
|
+
_context.next = 167;
|
|
12126
12211
|
break;
|
|
12127
12212
|
}
|
|
12128
|
-
_context.next =
|
|
12213
|
+
_context.next = 165;
|
|
12129
12214
|
return call(setChannelInMap, _channel5);
|
|
12130
|
-
case
|
|
12131
|
-
_context.next =
|
|
12215
|
+
case 165:
|
|
12216
|
+
_context.next = 170;
|
|
12132
12217
|
break;
|
|
12133
|
-
case
|
|
12218
|
+
case 167:
|
|
12134
12219
|
if (message.repliedInThread) {
|
|
12135
|
-
_context.next =
|
|
12220
|
+
_context.next = 170;
|
|
12136
12221
|
break;
|
|
12137
12222
|
}
|
|
12138
|
-
_context.next =
|
|
12223
|
+
_context.next = 170;
|
|
12139
12224
|
return put(updateChannelLastMessageAC(message, channelForAdd));
|
|
12140
|
-
case
|
|
12225
|
+
case 170:
|
|
12141
12226
|
if (!(_channel5.id === _activeChannelId5)) {
|
|
12142
|
-
_context.next =
|
|
12227
|
+
_context.next = 182;
|
|
12143
12228
|
break;
|
|
12144
12229
|
}
|
|
12145
12230
|
if (getHasNextCached()) {
|
|
12146
|
-
_context.next =
|
|
12231
|
+
_context.next = 174;
|
|
12147
12232
|
break;
|
|
12148
12233
|
}
|
|
12149
|
-
_context.next =
|
|
12234
|
+
_context.next = 174;
|
|
12150
12235
|
return put(addMessageAC(message));
|
|
12151
|
-
case
|
|
12236
|
+
case 174:
|
|
12152
12237
|
addAllMessages([message], MESSAGE_LOAD_DIRECTION.NEXT);
|
|
12153
|
-
_context.next =
|
|
12238
|
+
_context.next = 178;
|
|
12154
12239
|
return select(messagesHasNextSelector);
|
|
12155
|
-
case
|
|
12240
|
+
case 178:
|
|
12156
12241
|
hasNextMessage = _context.sent;
|
|
12157
12242
|
if (!(!getHasNextCached() && !hasNextMessage)) {
|
|
12158
|
-
_context.next =
|
|
12243
|
+
_context.next = 182;
|
|
12159
12244
|
break;
|
|
12160
12245
|
}
|
|
12161
|
-
_context.next =
|
|
12246
|
+
_context.next = 182;
|
|
12162
12247
|
return put(scrollToNewMessageAC(true, false, true));
|
|
12163
|
-
case
|
|
12248
|
+
case 182:
|
|
12164
12249
|
if (getMessagesFromMap(_channel5.id) && getMessagesFromMap(_channel5.id).length) {
|
|
12165
12250
|
addMessageToMap(_channel5.id, message);
|
|
12166
12251
|
}
|
|
12167
|
-
_context.next =
|
|
12168
|
-
return put(updateChannelDataAC(_channel5.id,
|
|
12252
|
+
_context.next = 185;
|
|
12253
|
+
return put(updateChannelDataAC(_channel5.id, {
|
|
12169
12254
|
userMessageReactions: [],
|
|
12170
12255
|
lastReactedMessage: null
|
|
12171
|
-
}))
|
|
12172
|
-
case
|
|
12256
|
+
}));
|
|
12257
|
+
case 185:
|
|
12173
12258
|
_groupName4 = getChannelGroupName(_channel5);
|
|
12174
|
-
_context.next =
|
|
12175
|
-
return put(updateSearchedChannelDataAC(_channel5.id,
|
|
12259
|
+
_context.next = 188;
|
|
12260
|
+
return put(updateSearchedChannelDataAC(_channel5.id, {
|
|
12176
12261
|
userMessageReactions: [],
|
|
12177
12262
|
lastReactedMessage: null
|
|
12178
|
-
}
|
|
12179
|
-
case
|
|
12263
|
+
}, _groupName4));
|
|
12264
|
+
case 188:
|
|
12180
12265
|
showNotifications = getShowNotifications();
|
|
12181
12266
|
if (!(showNotifications && !message.silent && message.user.id !== SceytChatClient.user.id && !_channel5.muted)) {
|
|
12182
|
-
_context.next =
|
|
12267
|
+
_context.next = 205;
|
|
12183
12268
|
break;
|
|
12184
12269
|
}
|
|
12185
12270
|
if (!(Notification.permission === 'granted')) {
|
|
12186
|
-
_context.next =
|
|
12271
|
+
_context.next = 205;
|
|
12187
12272
|
break;
|
|
12188
12273
|
}
|
|
12189
|
-
_context.next =
|
|
12274
|
+
_context.next = 193;
|
|
12190
12275
|
return select(browserTabIsActiveSelector);
|
|
12191
|
-
case
|
|
12276
|
+
case 193:
|
|
12192
12277
|
tabIsActive = _context.sent;
|
|
12193
12278
|
if (!(document.visibilityState !== 'visible' || !tabIsActive || _channel5.id !== _activeChannelId5)) {
|
|
12194
|
-
_context.next =
|
|
12279
|
+
_context.next = 205;
|
|
12195
12280
|
break;
|
|
12196
12281
|
}
|
|
12197
|
-
_context.next =
|
|
12282
|
+
_context.next = 197;
|
|
12198
12283
|
return select(contactsMapSelector);
|
|
12199
|
-
case
|
|
12284
|
+
case 197:
|
|
12200
12285
|
contactsMap = _context.sent;
|
|
12201
12286
|
_getFromContacts = getShowOnlyContactUsers();
|
|
12202
12287
|
state = store.getState();
|
|
@@ -12216,42 +12301,42 @@ function watchForEvents() {
|
|
|
12216
12301
|
setNotification(messageBody, message.user, _channel5, undefined, message.attachments && message.attachments.length ? message.attachments.find(function (att) {
|
|
12217
12302
|
return att.type !== attachmentTypes.link;
|
|
12218
12303
|
}) : undefined);
|
|
12219
|
-
case
|
|
12304
|
+
case 205:
|
|
12220
12305
|
log.info('send delivered for message . .. . ', message);
|
|
12221
12306
|
if (!(message.repliedInThread && message.parentMessage.id)) {
|
|
12222
|
-
_context.next =
|
|
12307
|
+
_context.next = 211;
|
|
12223
12308
|
break;
|
|
12224
12309
|
}
|
|
12225
|
-
_context.next =
|
|
12310
|
+
_context.next = 209;
|
|
12226
12311
|
return put(markMessagesAsDeliveredAC(message.parentMessage.id, [message.id]));
|
|
12227
|
-
case
|
|
12228
|
-
_context.next =
|
|
12312
|
+
case 209:
|
|
12313
|
+
_context.next = 213;
|
|
12229
12314
|
break;
|
|
12230
|
-
case
|
|
12231
|
-
_context.next =
|
|
12315
|
+
case 211:
|
|
12316
|
+
_context.next = 213;
|
|
12232
12317
|
return put(markMessagesAsDeliveredAC(_channel5.id, [message.id]));
|
|
12233
|
-
case
|
|
12234
|
-
updateChannelOnAllChannels(_channel5.id,
|
|
12318
|
+
case 213:
|
|
12319
|
+
updateChannelOnAllChannels(_channel5.id, {
|
|
12235
12320
|
userMessageReactions: [],
|
|
12236
12321
|
lastReactedMessage: null
|
|
12237
|
-
})
|
|
12322
|
+
});
|
|
12238
12323
|
updateChannelLastMessageOnAllChannels(_channel5.id, _channel5.lastMessage);
|
|
12239
|
-
case
|
|
12240
|
-
return _context.abrupt("break",
|
|
12241
|
-
case
|
|
12324
|
+
case 215:
|
|
12325
|
+
return _context.abrupt("break", 462);
|
|
12326
|
+
case 216:
|
|
12242
12327
|
channelId = args.channelId, markerList = args.markerList;
|
|
12243
|
-
_context.next =
|
|
12328
|
+
_context.next = 219;
|
|
12244
12329
|
return call(getChannelFromMap, channelId);
|
|
12245
|
-
case
|
|
12330
|
+
case 219:
|
|
12246
12331
|
_channel6 = _context.sent;
|
|
12247
12332
|
log.info('channel MESSAGE_MARKERS_RECEIVED ... channel: ', _channel6, 'markers list: ', markerList);
|
|
12248
12333
|
if (!_channel6) {
|
|
12249
|
-
_context.next =
|
|
12334
|
+
_context.next = 238;
|
|
12250
12335
|
break;
|
|
12251
12336
|
}
|
|
12252
|
-
_context.next =
|
|
12337
|
+
_context.next = 224;
|
|
12253
12338
|
return call(getActiveChannelId);
|
|
12254
|
-
case
|
|
12339
|
+
case 224:
|
|
12255
12340
|
_activeChannelId6 = _context.sent;
|
|
12256
12341
|
updateLastMessage = false;
|
|
12257
12342
|
markersMap = {};
|
|
@@ -12269,91 +12354,91 @@ function watchForEvents() {
|
|
|
12269
12354
|
});
|
|
12270
12355
|
});
|
|
12271
12356
|
if (!updateLastMessage) {
|
|
12272
|
-
_context.next =
|
|
12357
|
+
_context.next = 233;
|
|
12273
12358
|
break;
|
|
12274
12359
|
}
|
|
12275
12360
|
lastMessage = _extends({}, _channel6.lastMessage, {
|
|
12276
12361
|
deliveryStatus: markerList.name
|
|
12277
12362
|
});
|
|
12278
12363
|
updateChannelLastMessageOnAllChannels(_channel6.id, lastMessage);
|
|
12279
|
-
_context.next =
|
|
12364
|
+
_context.next = 233;
|
|
12280
12365
|
return put(updateChannelLastMessageStatusAC(lastMessage, JSON.parse(JSON.stringify(_channel6))));
|
|
12281
|
-
case
|
|
12366
|
+
case 233:
|
|
12282
12367
|
if (!(_activeChannelId6 === channelId)) {
|
|
12283
|
-
_context.next =
|
|
12368
|
+
_context.next = 237;
|
|
12284
12369
|
break;
|
|
12285
12370
|
}
|
|
12286
|
-
_context.next =
|
|
12371
|
+
_context.next = 236;
|
|
12287
12372
|
return put(updateMessagesStatusAC(markerList.name, markersMap));
|
|
12288
|
-
case
|
|
12373
|
+
case 236:
|
|
12289
12374
|
updateMarkersOnAllMessages(markersMap, markerList.name);
|
|
12290
|
-
case
|
|
12375
|
+
case 237:
|
|
12291
12376
|
updateMessageStatusOnMap(_channel6.id, {
|
|
12292
12377
|
name: markerList.name,
|
|
12293
12378
|
markersMap: markersMap
|
|
12294
12379
|
});
|
|
12295
|
-
case
|
|
12296
|
-
return _context.abrupt("break",
|
|
12297
|
-
case
|
|
12380
|
+
case 238:
|
|
12381
|
+
return _context.abrupt("break", 462);
|
|
12382
|
+
case 239:
|
|
12298
12383
|
_channelId = args.channelId;
|
|
12299
12384
|
log.info('channel DELETE ... ');
|
|
12300
12385
|
_channel7 = getChannelFromMap(_channelId);
|
|
12301
|
-
_context.next =
|
|
12386
|
+
_context.next = 244;
|
|
12302
12387
|
return put(setChannelToRemoveAC(_channel7));
|
|
12303
|
-
case
|
|
12388
|
+
case 244:
|
|
12304
12389
|
deleteChannelFromAllChannels(_channelId);
|
|
12305
|
-
return _context.abrupt("break",
|
|
12306
|
-
case
|
|
12390
|
+
return _context.abrupt("break", 462);
|
|
12391
|
+
case 246:
|
|
12307
12392
|
_channel8 = args.channel, deletedMessage = args.deletedMessage;
|
|
12308
12393
|
_activeChannelId7 = getActiveChannelId();
|
|
12309
12394
|
log.info('channel DELETE_MESSAGE ... ');
|
|
12310
12395
|
_channelExists7 = checkChannelExists(_channel8.id);
|
|
12311
12396
|
if (!(_channel8.id === _activeChannelId7)) {
|
|
12312
|
-
_context.next =
|
|
12397
|
+
_context.next = 254;
|
|
12313
12398
|
break;
|
|
12314
12399
|
}
|
|
12315
12400
|
updateMessageOnAllMessages(deletedMessage.id, deletedMessage);
|
|
12316
|
-
_context.next =
|
|
12401
|
+
_context.next = 254;
|
|
12317
12402
|
return put(updateMessageAC(deletedMessage.id, deletedMessage));
|
|
12318
|
-
case
|
|
12403
|
+
case 254:
|
|
12319
12404
|
updateMessageOnMap(_channel8.id, {
|
|
12320
12405
|
messageId: deletedMessage.id,
|
|
12321
12406
|
params: deletedMessage
|
|
12322
12407
|
});
|
|
12323
12408
|
if (!_channelExists7) {
|
|
12324
|
-
_context.next =
|
|
12409
|
+
_context.next = 261;
|
|
12325
12410
|
break;
|
|
12326
12411
|
}
|
|
12327
|
-
_context.next =
|
|
12412
|
+
_context.next = 258;
|
|
12328
12413
|
return put(updateChannelDataAC(_channel8.id, {
|
|
12329
12414
|
newMessageCount: _channel8.newMessageCount,
|
|
12330
12415
|
muted: _channel8.muted,
|
|
12331
12416
|
mutedTill: _channel8.mutedTill
|
|
12332
12417
|
}));
|
|
12333
|
-
case
|
|
12418
|
+
case 258:
|
|
12334
12419
|
if (!(_channel8.lastMessage.id === deletedMessage.id)) {
|
|
12335
|
-
_context.next =
|
|
12420
|
+
_context.next = 261;
|
|
12336
12421
|
break;
|
|
12337
12422
|
}
|
|
12338
|
-
_context.next =
|
|
12423
|
+
_context.next = 261;
|
|
12339
12424
|
return put(updateChannelLastMessageAC(deletedMessage, _channel8));
|
|
12340
|
-
case
|
|
12425
|
+
case 261:
|
|
12341
12426
|
updateChannelOnAllChannels(_channel8.id, {
|
|
12342
12427
|
newMessageCount: _channel8.newMessageCount,
|
|
12343
12428
|
muted: _channel8.muted,
|
|
12344
12429
|
mutedTill: _channel8.mutedTill
|
|
12345
12430
|
}, deletedMessage);
|
|
12346
|
-
return _context.abrupt("break",
|
|
12347
|
-
case
|
|
12431
|
+
return _context.abrupt("break", 462);
|
|
12432
|
+
case 263:
|
|
12348
12433
|
_channel9 = args.channel, _message = args.message;
|
|
12349
12434
|
log.info('channel EDIT_MESSAGE ... ', _message);
|
|
12350
12435
|
_activeChannelId8 = getActiveChannelId();
|
|
12351
12436
|
_channelExists8 = checkChannelExists(_channel9.id);
|
|
12352
12437
|
if (!(_channel9.id === _activeChannelId8)) {
|
|
12353
|
-
_context.next =
|
|
12438
|
+
_context.next = 271;
|
|
12354
12439
|
break;
|
|
12355
12440
|
}
|
|
12356
|
-
_context.next =
|
|
12441
|
+
_context.next = 270;
|
|
12357
12442
|
return put(updateMessageAC(_message.id, {
|
|
12358
12443
|
body: _message.body,
|
|
12359
12444
|
state: _message.state,
|
|
@@ -12362,7 +12447,7 @@ function watchForEvents() {
|
|
|
12362
12447
|
mentionedUsers: _message.mentionedUsers,
|
|
12363
12448
|
updatedAt: _message.updatedAt
|
|
12364
12449
|
}));
|
|
12365
|
-
case
|
|
12450
|
+
case 270:
|
|
12366
12451
|
updateMessageOnAllMessages(_message.id, {
|
|
12367
12452
|
body: _message.body,
|
|
12368
12453
|
state: _message.state,
|
|
@@ -12371,18 +12456,18 @@ function watchForEvents() {
|
|
|
12371
12456
|
mentionedUsers: _message.mentionedUsers,
|
|
12372
12457
|
updatedAt: _message.updatedAt
|
|
12373
12458
|
});
|
|
12374
|
-
case
|
|
12459
|
+
case 271:
|
|
12375
12460
|
if (!_channelExists8) {
|
|
12376
|
-
_context.next =
|
|
12461
|
+
_context.next = 275;
|
|
12377
12462
|
break;
|
|
12378
12463
|
}
|
|
12379
12464
|
if (!(_channel9.lastMessage.id === _message.id)) {
|
|
12380
|
-
_context.next =
|
|
12465
|
+
_context.next = 275;
|
|
12381
12466
|
break;
|
|
12382
12467
|
}
|
|
12383
|
-
_context.next =
|
|
12468
|
+
_context.next = 275;
|
|
12384
12469
|
return put(updateChannelLastMessageAC(_message, _channel9));
|
|
12385
|
-
case
|
|
12470
|
+
case 275:
|
|
12386
12471
|
if (checkChannelExistsOnMessagesMap(_channel9.id)) {
|
|
12387
12472
|
updateMessageOnMap(_channel9.id, {
|
|
12388
12473
|
messageId: _message.id,
|
|
@@ -12390,36 +12475,36 @@ function watchForEvents() {
|
|
|
12390
12475
|
});
|
|
12391
12476
|
}
|
|
12392
12477
|
updateChannelOnAllChannels(_channel9.id, {}, _message);
|
|
12393
|
-
return _context.abrupt("break",
|
|
12394
|
-
case
|
|
12478
|
+
return _context.abrupt("break", 462);
|
|
12479
|
+
case 278:
|
|
12395
12480
|
_channel0 = args.channel, user = args.user, _message2 = args.message, reaction = args.reaction;
|
|
12396
12481
|
log.info('channel REACTION_ADDED ... ', args);
|
|
12397
12482
|
isSelf = user.id === SceytChatClient.user.id;
|
|
12398
12483
|
_activeChannelId9 = getActiveChannelId();
|
|
12399
12484
|
if (!(_channel0.id === _activeChannelId9)) {
|
|
12400
|
-
_context.next =
|
|
12485
|
+
_context.next = 286;
|
|
12401
12486
|
break;
|
|
12402
12487
|
}
|
|
12403
|
-
_context.next =
|
|
12488
|
+
_context.next = 285;
|
|
12404
12489
|
return put(addReactionToMessageAC(_message2, reaction, isSelf));
|
|
12405
|
-
case
|
|
12490
|
+
case 285:
|
|
12406
12491
|
addReactionOnAllMessages(_message2, reaction, true);
|
|
12407
|
-
case
|
|
12492
|
+
case 286:
|
|
12408
12493
|
if (!(_message2.user.id === SceytChatClient.user.id)) {
|
|
12409
|
-
_context.next =
|
|
12494
|
+
_context.next = 304;
|
|
12410
12495
|
break;
|
|
12411
12496
|
}
|
|
12412
12497
|
if (!(!isSelf && Notification.permission === 'granted')) {
|
|
12413
|
-
_context.next =
|
|
12498
|
+
_context.next = 299;
|
|
12414
12499
|
break;
|
|
12415
12500
|
}
|
|
12416
12501
|
if (!(document.visibilityState !== 'visible' || _channel0.id !== _activeChannelId9)) {
|
|
12417
|
-
_context.next =
|
|
12502
|
+
_context.next = 299;
|
|
12418
12503
|
break;
|
|
12419
12504
|
}
|
|
12420
|
-
_context.next =
|
|
12505
|
+
_context.next = 291;
|
|
12421
12506
|
return select(contactsMapSelector);
|
|
12422
|
-
case
|
|
12507
|
+
case 291:
|
|
12423
12508
|
_contactsMap = _context.sent;
|
|
12424
12509
|
_getFromContacts2 = getShowOnlyContactUsers();
|
|
12425
12510
|
_state = store.getState();
|
|
@@ -12439,9 +12524,9 @@ function watchForEvents() {
|
|
|
12439
12524
|
setNotification(_messageBody, reaction.user, _channel0, reaction.key, _message2.attachments && _message2.attachments.length ? _message2.attachments.find(function (att) {
|
|
12440
12525
|
return att.type !== attachmentTypes.link;
|
|
12441
12526
|
}) : undefined);
|
|
12442
|
-
case
|
|
12527
|
+
case 299:
|
|
12443
12528
|
if (!(_channel0.newReactions && _channel0.newReactions.length)) {
|
|
12444
|
-
_context.next =
|
|
12529
|
+
_context.next = 303;
|
|
12445
12530
|
break;
|
|
12446
12531
|
}
|
|
12447
12532
|
channelUpdateParams = {
|
|
@@ -12451,9 +12536,9 @@ function watchForEvents() {
|
|
|
12451
12536
|
muted: _channel0.muted,
|
|
12452
12537
|
mutedTill: _channel0.mutedTill
|
|
12453
12538
|
};
|
|
12454
|
-
_context.next =
|
|
12539
|
+
_context.next = 303;
|
|
12455
12540
|
return put(updateChannelDataAC(_channel0.id, channelUpdateParams));
|
|
12456
|
-
case
|
|
12541
|
+
case 303:
|
|
12457
12542
|
updateChannelOnAllChannels(_channel0.id, {
|
|
12458
12543
|
userMessageReactions: _channel0.newReactions,
|
|
12459
12544
|
lastReactedMessage: _message2,
|
|
@@ -12461,77 +12546,77 @@ function watchForEvents() {
|
|
|
12461
12546
|
muted: _channel0.muted,
|
|
12462
12547
|
mutedTill: _channel0.mutedTill
|
|
12463
12548
|
});
|
|
12464
|
-
case
|
|
12549
|
+
case 304:
|
|
12465
12550
|
if (checkChannelExistsOnMessagesMap(_channel0.id)) {
|
|
12466
12551
|
addReactionToMessageOnMap(_channel0.id, _message2, reaction, true);
|
|
12467
12552
|
}
|
|
12468
|
-
return _context.abrupt("break",
|
|
12469
|
-
case
|
|
12553
|
+
return _context.abrupt("break", 462);
|
|
12554
|
+
case 306:
|
|
12470
12555
|
_channel1 = args.channel, _user = args.user, _message3 = args.message, _reaction = args.reaction;
|
|
12471
12556
|
log.info('channel REACTION_DELETED ... ', _channel1);
|
|
12472
12557
|
channelFromMap = getChannelFromMap(_channel1.id);
|
|
12473
12558
|
_isSelf = _user.id === SceytChatClient.user.id;
|
|
12474
12559
|
_activeChannelId0 = getActiveChannelId();
|
|
12475
12560
|
if (!(_channel1.id === _activeChannelId0)) {
|
|
12476
|
-
_context.next =
|
|
12561
|
+
_context.next = 315;
|
|
12477
12562
|
break;
|
|
12478
12563
|
}
|
|
12479
|
-
_context.next =
|
|
12564
|
+
_context.next = 314;
|
|
12480
12565
|
return put(deleteReactionFromMessageAC(_message3, _reaction, _isSelf));
|
|
12481
|
-
case
|
|
12566
|
+
case 314:
|
|
12482
12567
|
removeReactionOnAllMessages(_message3, _reaction, true);
|
|
12483
|
-
case
|
|
12568
|
+
case 315:
|
|
12484
12569
|
_channelUpdateParams = JSON.parse(JSON.stringify(_channel1));
|
|
12485
12570
|
if (channelFromMap && channelFromMap.lastReactedMessage && channelFromMap.lastReactedMessage.id === _message3.id) {
|
|
12486
12571
|
_channelUpdateParams.lastReactedMessage = null;
|
|
12487
12572
|
}
|
|
12488
|
-
_context.next =
|
|
12573
|
+
_context.next = 319;
|
|
12489
12574
|
return put(updateChannelDataAC(_channel1.id, _channelUpdateParams));
|
|
12490
|
-
case
|
|
12575
|
+
case 319:
|
|
12491
12576
|
updateChannelOnAllChannels(_channel1.id, _channelUpdateParams);
|
|
12492
12577
|
if (checkChannelExistsOnMessagesMap(_channel1.id)) {
|
|
12493
12578
|
removeReactionToMessageOnMap(_channel1.id, _message3, _reaction, true);
|
|
12494
12579
|
}
|
|
12495
|
-
return _context.abrupt("break",
|
|
12496
|
-
case
|
|
12580
|
+
return _context.abrupt("break", 462);
|
|
12581
|
+
case 322:
|
|
12497
12582
|
_channel10 = args.channel;
|
|
12498
12583
|
if (!_channel10) {
|
|
12499
|
-
_context.next =
|
|
12584
|
+
_context.next = 328;
|
|
12500
12585
|
break;
|
|
12501
12586
|
}
|
|
12502
12587
|
_updatedChannel = JSON.parse(JSON.stringify(_channel10));
|
|
12503
|
-
_context.next =
|
|
12588
|
+
_context.next = 327;
|
|
12504
12589
|
return put(updateChannelDataAC(_channel10.id, _updatedChannel));
|
|
12505
|
-
case
|
|
12590
|
+
case 327:
|
|
12506
12591
|
updateChannelOnAllChannels(_channel10.id, _updatedChannel);
|
|
12507
|
-
case
|
|
12508
|
-
return _context.abrupt("break",
|
|
12509
|
-
case
|
|
12592
|
+
case 328:
|
|
12593
|
+
return _context.abrupt("break", 462);
|
|
12594
|
+
case 329:
|
|
12510
12595
|
_channel11 = args.channel;
|
|
12511
12596
|
log.info('CLEAR_HISTORY: ', _channel11);
|
|
12512
|
-
_context.next =
|
|
12597
|
+
_context.next = 333;
|
|
12513
12598
|
return call(getActiveChannelId);
|
|
12514
|
-
case
|
|
12599
|
+
case 333:
|
|
12515
12600
|
_activeChannelId1 = _context.sent;
|
|
12516
|
-
_context.next =
|
|
12601
|
+
_context.next = 336;
|
|
12517
12602
|
return call(checkChannelExists, _channel11.id);
|
|
12518
|
-
case
|
|
12603
|
+
case 336:
|
|
12519
12604
|
channelExist = _context.sent;
|
|
12520
12605
|
if (!(_channel11.id === _activeChannelId1)) {
|
|
12521
|
-
_context.next =
|
|
12606
|
+
_context.next = 341;
|
|
12522
12607
|
break;
|
|
12523
12608
|
}
|
|
12524
|
-
_context.next =
|
|
12609
|
+
_context.next = 340;
|
|
12525
12610
|
return put(clearMessagesAC());
|
|
12526
|
-
case
|
|
12611
|
+
case 340:
|
|
12527
12612
|
removeAllMessages();
|
|
12528
|
-
case
|
|
12613
|
+
case 341:
|
|
12529
12614
|
removeMessagesFromMap(_channel11.id);
|
|
12530
12615
|
if (!channelExist) {
|
|
12531
|
-
_context.next =
|
|
12616
|
+
_context.next = 345;
|
|
12532
12617
|
break;
|
|
12533
12618
|
}
|
|
12534
|
-
_context.next =
|
|
12619
|
+
_context.next = 345;
|
|
12535
12620
|
return put(updateChannelDataAC(_channel11.id, {
|
|
12536
12621
|
lastMessage: null,
|
|
12537
12622
|
newMessageCount: 0,
|
|
@@ -12539,7 +12624,7 @@ function watchForEvents() {
|
|
|
12539
12624
|
muted: _channel11.muted,
|
|
12540
12625
|
mutedTill: _channel11.mutedTill
|
|
12541
12626
|
}));
|
|
12542
|
-
case
|
|
12627
|
+
case 345:
|
|
12543
12628
|
updateChannelOnAllChannels(_channel11.id, {
|
|
12544
12629
|
lastMessage: null,
|
|
12545
12630
|
newMessageCount: 0,
|
|
@@ -12547,173 +12632,173 @@ function watchForEvents() {
|
|
|
12547
12632
|
muted: _channel11.muted,
|
|
12548
12633
|
mutedTill: _channel11.mutedTill
|
|
12549
12634
|
});
|
|
12550
|
-
return _context.abrupt("break",
|
|
12551
|
-
case
|
|
12635
|
+
return _context.abrupt("break", 462);
|
|
12636
|
+
case 347:
|
|
12552
12637
|
_channel12 = args.channel;
|
|
12553
12638
|
log.info('channel MUTE ... ');
|
|
12554
|
-
_context.next =
|
|
12639
|
+
_context.next = 351;
|
|
12555
12640
|
return put(updateChannelDataAC(_channel12.id, {
|
|
12556
12641
|
muted: _channel12.muted,
|
|
12557
12642
|
mutedTill: _channel12.mutedTill
|
|
12558
12643
|
}));
|
|
12559
|
-
case
|
|
12644
|
+
case 351:
|
|
12560
12645
|
updateChannelOnAllChannels(_channel12.id, {
|
|
12561
12646
|
muted: _channel12.muted,
|
|
12562
12647
|
mutedTill: _channel12.mutedTill
|
|
12563
12648
|
});
|
|
12564
|
-
return _context.abrupt("break",
|
|
12565
|
-
case
|
|
12649
|
+
return _context.abrupt("break", 462);
|
|
12650
|
+
case 353:
|
|
12566
12651
|
_channel13 = args.channel;
|
|
12567
12652
|
log.info('channel UNMUTE ... ');
|
|
12568
|
-
_context.next =
|
|
12653
|
+
_context.next = 357;
|
|
12569
12654
|
return put(updateChannelDataAC(_channel13.id, {
|
|
12570
12655
|
muted: _channel13.muted,
|
|
12571
12656
|
mutedTill: _channel13.mutedTill
|
|
12572
12657
|
}));
|
|
12573
|
-
case
|
|
12658
|
+
case 357:
|
|
12574
12659
|
updateChannelOnAllChannels(_channel13.id, {
|
|
12575
12660
|
muted: _channel13.muted,
|
|
12576
12661
|
mutedTill: _channel13.mutedTill
|
|
12577
12662
|
});
|
|
12578
|
-
return _context.abrupt("break",
|
|
12579
|
-
case
|
|
12663
|
+
return _context.abrupt("break", 462);
|
|
12664
|
+
case 359:
|
|
12580
12665
|
_channel14 = args.channel;
|
|
12581
12666
|
log.info('channel PINED ... ');
|
|
12582
|
-
_context.next =
|
|
12667
|
+
_context.next = 363;
|
|
12583
12668
|
return put(updateChannelDataAC(_channel14.id, {
|
|
12584
12669
|
pinnedAt: _channel14.pinnedAt
|
|
12585
12670
|
}, true));
|
|
12586
|
-
case
|
|
12671
|
+
case 363:
|
|
12587
12672
|
updateChannelOnAllChannels(_channel14.id, {
|
|
12588
12673
|
pinnedAt: _channel14.pinnedAt
|
|
12589
12674
|
});
|
|
12590
|
-
return _context.abrupt("break",
|
|
12591
|
-
case
|
|
12675
|
+
return _context.abrupt("break", 462);
|
|
12676
|
+
case 365:
|
|
12592
12677
|
_channel15 = args.channel;
|
|
12593
12678
|
log.info('channel UNPINED ... ');
|
|
12594
|
-
_context.next =
|
|
12679
|
+
_context.next = 369;
|
|
12595
12680
|
return put(updateChannelDataAC(_channel15.id, {
|
|
12596
12681
|
pinnedAt: _channel15.pinnedAt
|
|
12597
12682
|
}, false, true));
|
|
12598
|
-
case
|
|
12683
|
+
case 369:
|
|
12599
12684
|
updateChannelOnAllChannels(_channel15.id, {
|
|
12600
12685
|
pinnedAt: _channel15.pinnedAt
|
|
12601
12686
|
});
|
|
12602
|
-
return _context.abrupt("break",
|
|
12603
|
-
case
|
|
12687
|
+
return _context.abrupt("break", 462);
|
|
12688
|
+
case 371:
|
|
12604
12689
|
_channel16 = args.channel;
|
|
12605
12690
|
log.info('channel HIDE ... ');
|
|
12606
|
-
_context.next =
|
|
12691
|
+
_context.next = 375;
|
|
12607
12692
|
return put(setChannelToHideAC(_channel16));
|
|
12608
|
-
case
|
|
12609
|
-
return _context.abrupt("break",
|
|
12610
|
-
case
|
|
12693
|
+
case 375:
|
|
12694
|
+
return _context.abrupt("break", 462);
|
|
12695
|
+
case 376:
|
|
12611
12696
|
_channel17 = args.channel;
|
|
12612
12697
|
log.info('channel UNHIDE ... ');
|
|
12613
|
-
_context.next =
|
|
12698
|
+
_context.next = 380;
|
|
12614
12699
|
return put(setChannelToUnHideAC(_channel17));
|
|
12615
|
-
case
|
|
12616
|
-
return _context.abrupt("break",
|
|
12617
|
-
case
|
|
12700
|
+
case 380:
|
|
12701
|
+
return _context.abrupt("break", 462);
|
|
12702
|
+
case 381:
|
|
12618
12703
|
_channel18 = args.channel;
|
|
12619
|
-
_context.next =
|
|
12704
|
+
_context.next = 384;
|
|
12620
12705
|
return put(updateChannelDataAC(_channel18.id, {
|
|
12621
12706
|
unread: _channel18.unread,
|
|
12622
12707
|
muted: _channel18.muted,
|
|
12623
12708
|
mutedTill: _channel18.mutedTill
|
|
12624
12709
|
}));
|
|
12625
|
-
case
|
|
12710
|
+
case 384:
|
|
12626
12711
|
_groupName5 = getChannelGroupName(_channel18);
|
|
12627
|
-
_context.next =
|
|
12712
|
+
_context.next = 387;
|
|
12628
12713
|
return put(updateSearchedChannelDataAC(_channel18.id, {
|
|
12629
12714
|
unread: _channel18.unread
|
|
12630
12715
|
}, _groupName5));
|
|
12631
|
-
case
|
|
12716
|
+
case 387:
|
|
12632
12717
|
updateChannelOnAllChannels(_channel18.id, {
|
|
12633
12718
|
unread: _channel18.unread
|
|
12634
12719
|
});
|
|
12635
|
-
return _context.abrupt("break",
|
|
12636
|
-
case
|
|
12720
|
+
return _context.abrupt("break", 462);
|
|
12721
|
+
case 389:
|
|
12637
12722
|
_channel19 = args.channel;
|
|
12638
|
-
_context.next =
|
|
12723
|
+
_context.next = 392;
|
|
12639
12724
|
return put(updateChannelDataAC(_channel19.id, {
|
|
12640
12725
|
unread: _channel19.unread,
|
|
12641
12726
|
muted: _channel19.muted,
|
|
12642
12727
|
mutedTill: _channel19.mutedTill
|
|
12643
12728
|
}));
|
|
12644
|
-
case
|
|
12729
|
+
case 392:
|
|
12645
12730
|
_groupName6 = getChannelGroupName(_channel19);
|
|
12646
|
-
_context.next =
|
|
12731
|
+
_context.next = 395;
|
|
12647
12732
|
return put(updateSearchedChannelDataAC(_channel19.id, {
|
|
12648
12733
|
unread: _channel19.unread
|
|
12649
12734
|
}, _groupName6));
|
|
12650
|
-
case
|
|
12735
|
+
case 395:
|
|
12651
12736
|
updateChannelOnAllChannels(_channel19.id, {
|
|
12652
12737
|
unread: _channel19.unread
|
|
12653
12738
|
});
|
|
12654
|
-
return _context.abrupt("break",
|
|
12655
|
-
case
|
|
12739
|
+
return _context.abrupt("break", 462);
|
|
12740
|
+
case 397:
|
|
12656
12741
|
_channel20 = args.channel, members = args.members;
|
|
12657
12742
|
log.info('channel CHANGE_ROLE channel ... ', _channel20);
|
|
12658
12743
|
log.info('channel CHANGE_ROLE member ... ', members);
|
|
12659
|
-
_context.next =
|
|
12744
|
+
_context.next = 402;
|
|
12660
12745
|
return call(getActiveChannelId);
|
|
12661
|
-
case
|
|
12746
|
+
case 402:
|
|
12662
12747
|
_activeChannelId10 = _context.sent;
|
|
12663
12748
|
if (!(_channel20.id === _activeChannelId10)) {
|
|
12664
|
-
_context.next =
|
|
12749
|
+
_context.next = 406;
|
|
12665
12750
|
break;
|
|
12666
12751
|
}
|
|
12667
|
-
_context.next =
|
|
12752
|
+
_context.next = 406;
|
|
12668
12753
|
return put(updateMembersAC(members));
|
|
12669
|
-
case
|
|
12754
|
+
case 406:
|
|
12670
12755
|
i = 0;
|
|
12671
|
-
case
|
|
12756
|
+
case 407:
|
|
12672
12757
|
if (!(i < members.length)) {
|
|
12673
|
-
_context.next =
|
|
12758
|
+
_context.next = 415;
|
|
12674
12759
|
break;
|
|
12675
12760
|
}
|
|
12676
12761
|
if (!(members[i].id === SceytChatClient.user.id)) {
|
|
12677
|
-
_context.next =
|
|
12762
|
+
_context.next = 412;
|
|
12678
12763
|
break;
|
|
12679
12764
|
}
|
|
12680
|
-
_context.next =
|
|
12765
|
+
_context.next = 411;
|
|
12681
12766
|
return put(updateChannelDataAC(_channel20.id, {
|
|
12682
12767
|
userRole: members[i].role,
|
|
12683
12768
|
muted: _channel20.muted,
|
|
12684
12769
|
mutedTill: _channel20.mutedTill
|
|
12685
12770
|
}));
|
|
12686
|
-
case
|
|
12771
|
+
case 411:
|
|
12687
12772
|
updateChannelOnAllChannels(_channel20.id, {
|
|
12688
12773
|
userRole: members[i].role,
|
|
12689
12774
|
muted: _channel20.muted,
|
|
12690
12775
|
mutedTill: _channel20.mutedTill
|
|
12691
12776
|
});
|
|
12692
|
-
case
|
|
12777
|
+
case 412:
|
|
12693
12778
|
i++;
|
|
12694
|
-
_context.next =
|
|
12779
|
+
_context.next = 407;
|
|
12695
12780
|
break;
|
|
12696
|
-
case
|
|
12697
|
-
return _context.abrupt("break",
|
|
12698
|
-
case
|
|
12781
|
+
case 415:
|
|
12782
|
+
return _context.abrupt("break", 462);
|
|
12783
|
+
case 416:
|
|
12699
12784
|
_channel21 = args.channel;
|
|
12700
12785
|
log.info('channel frozen channel ... ', _channel21);
|
|
12701
|
-
return _context.abrupt("break",
|
|
12702
|
-
case
|
|
12786
|
+
return _context.abrupt("break", 462);
|
|
12787
|
+
case 419:
|
|
12703
12788
|
_channel22 = args.channel;
|
|
12704
12789
|
log.info('channel unfrozen channel ... ', _channel22);
|
|
12705
|
-
return _context.abrupt("break",
|
|
12706
|
-
case
|
|
12790
|
+
return _context.abrupt("break", 462);
|
|
12791
|
+
case 422:
|
|
12707
12792
|
_channelId2 = args.channelId, from = args.from, name = args.name;
|
|
12708
12793
|
log.info('channel event received >>>... . . . . . ', args);
|
|
12709
12794
|
if (!(from.id === SceytChatClient.user.id)) {
|
|
12710
|
-
_context.next =
|
|
12795
|
+
_context.next = 426;
|
|
12711
12796
|
break;
|
|
12712
12797
|
}
|
|
12713
|
-
return _context.abrupt("break",
|
|
12714
|
-
case
|
|
12798
|
+
return _context.abrupt("break", 462);
|
|
12799
|
+
case 426:
|
|
12715
12800
|
if (!(name === 'start_typing')) {
|
|
12716
|
-
_context.next =
|
|
12801
|
+
_context.next = 434;
|
|
12717
12802
|
break;
|
|
12718
12803
|
}
|
|
12719
12804
|
if (!usersTimeout[_channelId2]) {
|
|
@@ -12725,27 +12810,27 @@ function watchForEvents() {
|
|
|
12725
12810
|
usersTimeout[_channelId2][from.id] = setTimeout(function () {
|
|
12726
12811
|
channelListener.onReceivedChannelEvent(_channelId2, from, 'stop_typing');
|
|
12727
12812
|
}, 5000);
|
|
12728
|
-
_context.next =
|
|
12813
|
+
_context.next = 432;
|
|
12729
12814
|
return put(switchTypingIndicatorAC(true, _channelId2, from));
|
|
12730
|
-
case
|
|
12731
|
-
_context.next =
|
|
12815
|
+
case 432:
|
|
12816
|
+
_context.next = 452;
|
|
12732
12817
|
break;
|
|
12733
|
-
case
|
|
12818
|
+
case 434:
|
|
12734
12819
|
if (!(name === 'stop_typing')) {
|
|
12735
|
-
_context.next =
|
|
12820
|
+
_context.next = 440;
|
|
12736
12821
|
break;
|
|
12737
12822
|
}
|
|
12738
12823
|
if (usersTimeout[_channelId2] && usersTimeout[_channelId2][from.id]) {
|
|
12739
12824
|
clearTimeout(usersTimeout[_channelId2][from.id]);
|
|
12740
12825
|
}
|
|
12741
|
-
_context.next =
|
|
12826
|
+
_context.next = 438;
|
|
12742
12827
|
return put(switchTypingIndicatorAC(false, _channelId2, from));
|
|
12743
|
-
case
|
|
12744
|
-
_context.next =
|
|
12828
|
+
case 438:
|
|
12829
|
+
_context.next = 452;
|
|
12745
12830
|
break;
|
|
12746
|
-
case
|
|
12831
|
+
case 440:
|
|
12747
12832
|
if (!(name === 'start_recording')) {
|
|
12748
|
-
_context.next =
|
|
12833
|
+
_context.next = 448;
|
|
12749
12834
|
break;
|
|
12750
12835
|
}
|
|
12751
12836
|
if (!usersTimeout[_channelId2]) {
|
|
@@ -12757,40 +12842,40 @@ function watchForEvents() {
|
|
|
12757
12842
|
usersTimeout[_channelId2][from.id] = setTimeout(function () {
|
|
12758
12843
|
channelListener.onReceivedChannelEvent(_channelId2, from, 'stop_recording');
|
|
12759
12844
|
}, 5000);
|
|
12760
|
-
_context.next =
|
|
12845
|
+
_context.next = 446;
|
|
12761
12846
|
return put(switchRecordingIndicatorAC(true, _channelId2, from));
|
|
12762
|
-
case
|
|
12763
|
-
_context.next =
|
|
12847
|
+
case 446:
|
|
12848
|
+
_context.next = 452;
|
|
12764
12849
|
break;
|
|
12765
|
-
case
|
|
12850
|
+
case 448:
|
|
12766
12851
|
if (!(name === 'stop_recording')) {
|
|
12767
|
-
_context.next =
|
|
12852
|
+
_context.next = 452;
|
|
12768
12853
|
break;
|
|
12769
12854
|
}
|
|
12770
12855
|
if (usersTimeout[_channelId2] && usersTimeout[_channelId2][from.id]) {
|
|
12771
12856
|
clearTimeout(usersTimeout[_channelId2][from.id]);
|
|
12772
12857
|
}
|
|
12773
|
-
_context.next =
|
|
12858
|
+
_context.next = 452;
|
|
12774
12859
|
return put(switchRecordingIndicatorAC(false, _channelId2, from));
|
|
12775
|
-
case
|
|
12776
|
-
return _context.abrupt("break",
|
|
12777
|
-
case
|
|
12860
|
+
case 452:
|
|
12861
|
+
return _context.abrupt("break", 462);
|
|
12862
|
+
case 453:
|
|
12778
12863
|
status = args.status;
|
|
12779
12864
|
log.info('connection status changed . . . . . ', status);
|
|
12780
|
-
_context.next =
|
|
12865
|
+
_context.next = 457;
|
|
12781
12866
|
return put(setConnectionStatusAC(status));
|
|
12782
|
-
case
|
|
12867
|
+
case 457:
|
|
12783
12868
|
if (!(status === CONNECTION_STATUS.CONNECTED)) {
|
|
12784
|
-
_context.next =
|
|
12869
|
+
_context.next = 460;
|
|
12785
12870
|
break;
|
|
12786
12871
|
}
|
|
12787
|
-
_context.next =
|
|
12872
|
+
_context.next = 460;
|
|
12788
12873
|
return put(getRolesAC());
|
|
12789
|
-
case
|
|
12790
|
-
return _context.abrupt("break",
|
|
12791
|
-
case
|
|
12874
|
+
case 460:
|
|
12875
|
+
return _context.abrupt("break", 462);
|
|
12876
|
+
case 461:
|
|
12792
12877
|
log.warn('UNHANDLED EVENT FROM REDUX-SAGA EVENT-CHANNEL');
|
|
12793
|
-
case
|
|
12878
|
+
case 462:
|
|
12794
12879
|
case "end":
|
|
12795
12880
|
return _context.stop();
|
|
12796
12881
|
}
|
|
@@ -12805,7 +12890,7 @@ function watchForEvents() {
|
|
|
12805
12890
|
case "end":
|
|
12806
12891
|
return _context2.stop();
|
|
12807
12892
|
}
|
|
12808
|
-
}, _marked);
|
|
12893
|
+
}, _marked$1);
|
|
12809
12894
|
}
|
|
12810
12895
|
|
|
12811
12896
|
var channelsSelector = function channelsSelector(store) {
|
|
@@ -12883,8 +12968,8 @@ var channelMessageDraftIsRemovedSelector = function channelMessageDraftIsRemoved
|
|
|
12883
12968
|
return store.ChannelReducer.draftIsRemoved;
|
|
12884
12969
|
};
|
|
12885
12970
|
|
|
12886
|
-
var _marked$
|
|
12887
|
-
_marked2 = /*#__PURE__*/_regeneratorRuntime().mark(getChannels),
|
|
12971
|
+
var _marked$2 = /*#__PURE__*/_regeneratorRuntime().mark(createChannel),
|
|
12972
|
+
_marked2$1 = /*#__PURE__*/_regeneratorRuntime().mark(getChannels),
|
|
12888
12973
|
_marked3 = /*#__PURE__*/_regeneratorRuntime().mark(searchChannels),
|
|
12889
12974
|
_marked4 = /*#__PURE__*/_regeneratorRuntime().mark(getChannelsForForward),
|
|
12890
12975
|
_marked5 = /*#__PURE__*/_regeneratorRuntime().mark(searchChannelsForForward),
|
|
@@ -13089,7 +13174,7 @@ function createChannel(action) {
|
|
|
13089
13174
|
case "end":
|
|
13090
13175
|
return _context.stop();
|
|
13091
13176
|
}
|
|
13092
|
-
}, _marked$
|
|
13177
|
+
}, _marked$2, null, [[0, 53]]);
|
|
13093
13178
|
}
|
|
13094
13179
|
function getChannels(action) {
|
|
13095
13180
|
var _params$filter, _types, payload, params, SceytChatClient, channelQueryBuilder, channelTypesFilter, types, channelQuery, channelsData, channelList, channelId, activeChannel, _yield$call, mappedChannels, channelsForUpdateLastReactionMessage, channelMessageMap, hiddenList, allChannelsQueryBuilder, allChannelsQuery, hasNext, i, allChannelsData, allChannelList;
|
|
@@ -13272,7 +13357,7 @@ function getChannels(action) {
|
|
|
13272
13357
|
case "end":
|
|
13273
13358
|
return _context2.stop();
|
|
13274
13359
|
}
|
|
13275
|
-
}, _marked2, null, [[0, 89], [72, 81]]);
|
|
13360
|
+
}, _marked2$1, null, [[0, 89], [72, 81]]);
|
|
13276
13361
|
}
|
|
13277
13362
|
function searchChannels(action) {
|
|
13278
13363
|
var payload, params, contactsMap, SceytChatClient, getFromContacts, searchBy, _params$filter2, _types2, channelQueryBuilder, channelTypesFilter, types, allChannels, publicChannels, chatsGroups, contactsList, contactsWithChannelsMap, lowerCaseSearchBy, channelQuery, channelsData, channelsToAdd;
|
|
@@ -14389,7 +14474,8 @@ function checkUsersStatus() {
|
|
|
14389
14474
|
usersToUpdateMap = {};
|
|
14390
14475
|
update = false;
|
|
14391
14476
|
updatedUsers.forEach(function (updatedUser) {
|
|
14392
|
-
|
|
14477
|
+
var _usersMap$updatedUser, _usersMap$updatedUser2, _usersMap$updatedUser3, _usersMap$updatedUser4, _usersMap$updatedUser5, _usersMap$updatedUser6, _usersMap$updatedUser7, _usersMap$updatedUser8, _usersMap$updatedUser9;
|
|
14478
|
+
if (updatedUser.presence && (updatedUser.presence.state !== ((_usersMap$updatedUser = usersMap[updatedUser.id]) === null || _usersMap$updatedUser === void 0 ? void 0 : (_usersMap$updatedUser2 = _usersMap$updatedUser.presence) === null || _usersMap$updatedUser2 === void 0 ? void 0 : _usersMap$updatedUser2.state) || updatedUser.presence.status !== ((_usersMap$updatedUser3 = usersMap[updatedUser.id]) === null || _usersMap$updatedUser3 === void 0 ? void 0 : (_usersMap$updatedUser4 = _usersMap$updatedUser3.presence) === null || _usersMap$updatedUser4 === void 0 ? void 0 : _usersMap$updatedUser4.status) || updatedUser.presence.lastActiveAt && new Date(updatedUser.presence.lastActiveAt).getTime() !== new Date(((_usersMap$updatedUser5 = usersMap[updatedUser.id]) === null || _usersMap$updatedUser5 === void 0 ? void 0 : (_usersMap$updatedUser6 = _usersMap$updatedUser5.presence) === null || _usersMap$updatedUser6 === void 0 ? void 0 : _usersMap$updatedUser6.lastActiveAt) || 0).getTime() || updatedUser.avatarUrl !== ((_usersMap$updatedUser7 = usersMap[updatedUser.id]) === null || _usersMap$updatedUser7 === void 0 ? void 0 : _usersMap$updatedUser7.avatarUrl) || updatedUser.firstName !== ((_usersMap$updatedUser8 = usersMap[updatedUser.id]) === null || _usersMap$updatedUser8 === void 0 ? void 0 : _usersMap$updatedUser8.firstName) || updatedUser.lastName !== ((_usersMap$updatedUser9 = usersMap[updatedUser.id]) === null || _usersMap$updatedUser9 === void 0 ? void 0 : _usersMap$updatedUser9.lastName))) {
|
|
14393
14479
|
updateUserOnMap(updatedUser);
|
|
14394
14480
|
usersToUpdateMap[updatedUser.id] = updatedUser;
|
|
14395
14481
|
update = true;
|
|
@@ -15332,8 +15418,8 @@ var getFrame = function getFrame(videoSrc, time) {
|
|
|
15332
15418
|
}
|
|
15333
15419
|
};
|
|
15334
15420
|
|
|
15335
|
-
var _marked$
|
|
15336
|
-
_marked2$
|
|
15421
|
+
var _marked$3 = /*#__PURE__*/_regeneratorRuntime().mark(sendMessage),
|
|
15422
|
+
_marked2$2 = /*#__PURE__*/_regeneratorRuntime().mark(sendTextMessage),
|
|
15337
15423
|
_marked3$1 = /*#__PURE__*/_regeneratorRuntime().mark(forwardMessage),
|
|
15338
15424
|
_marked4$1 = /*#__PURE__*/_regeneratorRuntime().mark(resendMessage),
|
|
15339
15425
|
_marked5$1 = /*#__PURE__*/_regeneratorRuntime().mark(deleteMessage),
|
|
@@ -15931,7 +16017,7 @@ function sendMessage(action) {
|
|
|
15931
16017
|
case "end":
|
|
15932
16018
|
return _context3.stop();
|
|
15933
16019
|
}
|
|
15934
|
-
}, _marked$
|
|
16020
|
+
}, _marked$3, null, [[2, 80]]);
|
|
15935
16021
|
}
|
|
15936
16022
|
function sendTextMessage(action) {
|
|
15937
16023
|
var payload, message, connectionState, channelId, channel, sendMessageTid, SceytChatClient, createChannelData, mentionedUserIds, attachments, attachmentBuilder, att, messageBuilder, messageToSend, pendingMessage, hasNextMessages, messagesToAdd, messageResponse, messageUpdateData, messageToUpdate, channelUpdateParam;
|
|
@@ -16129,7 +16215,7 @@ function sendTextMessage(action) {
|
|
|
16129
16215
|
case "end":
|
|
16130
16216
|
return _context4.stop();
|
|
16131
16217
|
}
|
|
16132
|
-
}, _marked2$
|
|
16218
|
+
}, _marked2$2, null, [[8, 82]]);
|
|
16133
16219
|
}
|
|
16134
16220
|
function forwardMessage(action) {
|
|
16135
16221
|
var payload, message, channelId, connectionState, channel, SceytChatClient, mentionedUserIds, attachments, attachmentBuilder, att, messageBuilder, messageToSend, pendingMessage, activeChannelId, isCachedChannel, hasNextMessages, messageResponse, messageUpdateData, messageToUpdate, channelUpdateParam;
|
|
@@ -17659,8 +17745,8 @@ function MessageSaga() {
|
|
|
17659
17745
|
}, _marked15$1);
|
|
17660
17746
|
}
|
|
17661
17747
|
|
|
17662
|
-
var _marked$
|
|
17663
|
-
_marked2$
|
|
17748
|
+
var _marked$4 = /*#__PURE__*/_regeneratorRuntime().mark(getMembers),
|
|
17749
|
+
_marked2$3 = /*#__PURE__*/_regeneratorRuntime().mark(loadMoreMembers),
|
|
17664
17750
|
_marked3$2 = /*#__PURE__*/_regeneratorRuntime().mark(addMembers),
|
|
17665
17751
|
_marked4$2 = /*#__PURE__*/_regeneratorRuntime().mark(kickMemberFromChannel),
|
|
17666
17752
|
_marked5$2 = /*#__PURE__*/_regeneratorRuntime().mark(blockMember),
|
|
@@ -17708,47 +17794,55 @@ function getMembers(action) {
|
|
|
17708
17794
|
case "end":
|
|
17709
17795
|
return _context.stop();
|
|
17710
17796
|
}
|
|
17711
|
-
}, _marked$
|
|
17797
|
+
}, _marked$4, null, [[0, 22]]);
|
|
17712
17798
|
}
|
|
17713
17799
|
function loadMoreMembers(action) {
|
|
17714
|
-
var payload, limit, membersQuery, _yield$call2, members;
|
|
17800
|
+
var payload, limit, channelId, membersQuery, _yield$call2, members, updateChannelData;
|
|
17715
17801
|
return _regeneratorRuntime().wrap(function loadMoreMembers$(_context2) {
|
|
17716
17802
|
while (1) switch (_context2.prev = _context2.next) {
|
|
17717
17803
|
case 0:
|
|
17718
17804
|
_context2.prev = 0;
|
|
17719
17805
|
payload = action.payload;
|
|
17720
17806
|
limit = payload.limit;
|
|
17807
|
+
channelId = payload.channelId;
|
|
17721
17808
|
membersQuery = query.membersQuery;
|
|
17722
17809
|
if (limit && membersQuery) {
|
|
17723
17810
|
membersQuery.limit = limit;
|
|
17724
17811
|
}
|
|
17725
|
-
_context2.next =
|
|
17812
|
+
_context2.next = 8;
|
|
17726
17813
|
return put(setMembersLoadingStateAC(LOADING_STATE.LOADING));
|
|
17727
|
-
case
|
|
17728
|
-
_context2.next =
|
|
17814
|
+
case 8:
|
|
17815
|
+
_context2.next = 10;
|
|
17729
17816
|
return call(membersQuery.loadNextPage);
|
|
17730
|
-
case
|
|
17817
|
+
case 10:
|
|
17731
17818
|
_yield$call2 = _context2.sent;
|
|
17732
17819
|
members = _yield$call2.members;
|
|
17733
|
-
_context2.next =
|
|
17820
|
+
_context2.next = 14;
|
|
17734
17821
|
return put(addMembersToListAC(members));
|
|
17735
|
-
case
|
|
17736
|
-
_context2.next =
|
|
17822
|
+
case 14:
|
|
17823
|
+
_context2.next = 16;
|
|
17737
17824
|
return put(setMembersLoadingStateAC(LOADING_STATE.LOADED));
|
|
17738
|
-
case
|
|
17739
|
-
_context2.next =
|
|
17825
|
+
case 16:
|
|
17826
|
+
_context2.next = 18;
|
|
17827
|
+
return call(updateActiveChannelMembersAdd, members) || {};
|
|
17828
|
+
case 18:
|
|
17829
|
+
updateChannelData = _context2.sent;
|
|
17830
|
+
_context2.next = 21;
|
|
17831
|
+
return put(updateChannelDataAC(channelId, _extends({}, updateChannelData)));
|
|
17832
|
+
case 21:
|
|
17833
|
+
_context2.next = 26;
|
|
17740
17834
|
break;
|
|
17741
|
-
case
|
|
17742
|
-
_context2.prev =
|
|
17835
|
+
case 23:
|
|
17836
|
+
_context2.prev = 23;
|
|
17743
17837
|
_context2.t0 = _context2["catch"](0);
|
|
17744
|
-
case
|
|
17838
|
+
case 26:
|
|
17745
17839
|
case "end":
|
|
17746
17840
|
return _context2.stop();
|
|
17747
17841
|
}
|
|
17748
|
-
}, _marked2$
|
|
17842
|
+
}, _marked2$3, null, [[0, 23]]);
|
|
17749
17843
|
}
|
|
17750
17844
|
function addMembers(action) {
|
|
17751
|
-
var payload, members, channelId, channel, membersToAdd, addedMembers, membersIds, messageToSend;
|
|
17845
|
+
var payload, members, channelId, channel, membersToAdd, addedMembers, membersIds, messageToSend, updateChannelData;
|
|
17752
17846
|
return _regeneratorRuntime().wrap(function addMembers$(_context3) {
|
|
17753
17847
|
while (1) switch (_context3.prev = _context3.next) {
|
|
17754
17848
|
case 0:
|
|
@@ -17760,7 +17854,7 @@ function addMembers(action) {
|
|
|
17760
17854
|
case 5:
|
|
17761
17855
|
channel = _context3.sent;
|
|
17762
17856
|
if (!channel) {
|
|
17763
|
-
_context3.next =
|
|
17857
|
+
_context3.next = 25;
|
|
17764
17858
|
break;
|
|
17765
17859
|
}
|
|
17766
17860
|
membersToAdd = members.map(function (mem) {
|
|
@@ -17798,24 +17892,28 @@ function addMembers(action) {
|
|
|
17798
17892
|
memberCount: channel.memberCount + addedMembers.length
|
|
17799
17893
|
});
|
|
17800
17894
|
_context3.next = 22;
|
|
17801
|
-
return
|
|
17802
|
-
memberCount: channel.memberCount + addedMembers.length
|
|
17803
|
-
}));
|
|
17895
|
+
return call(updateActiveChannelMembersAdd, addedMembers) || {};
|
|
17804
17896
|
case 22:
|
|
17805
|
-
|
|
17897
|
+
updateChannelData = _context3.sent;
|
|
17898
|
+
_context3.next = 25;
|
|
17899
|
+
return put(updateChannelDataAC(channel.id, _extends({
|
|
17900
|
+
memberCount: channel.memberCount + addedMembers.length
|
|
17901
|
+
}, updateChannelData)));
|
|
17902
|
+
case 25:
|
|
17903
|
+
_context3.next = 30;
|
|
17806
17904
|
break;
|
|
17807
|
-
case
|
|
17808
|
-
_context3.prev =
|
|
17905
|
+
case 27:
|
|
17906
|
+
_context3.prev = 27;
|
|
17809
17907
|
_context3.t0 = _context3["catch"](0);
|
|
17810
17908
|
log.error('error on add members... ', _context3.t0);
|
|
17811
|
-
case
|
|
17909
|
+
case 30:
|
|
17812
17910
|
case "end":
|
|
17813
17911
|
return _context3.stop();
|
|
17814
17912
|
}
|
|
17815
|
-
}, _marked3$2, null, [[0,
|
|
17913
|
+
}, _marked3$2, null, [[0, 27]]);
|
|
17816
17914
|
}
|
|
17817
17915
|
function kickMemberFromChannel(action) {
|
|
17818
|
-
var payload, memberId, channelId, channel, removedMembers, membersIds, messageToSend;
|
|
17916
|
+
var payload, memberId, channelId, channel, removedMembers, membersIds, messageToSend, updateChannelData;
|
|
17819
17917
|
return _regeneratorRuntime().wrap(function kickMemberFromChannel$(_context4) {
|
|
17820
17918
|
while (1) switch (_context4.prev = _context4.next) {
|
|
17821
17919
|
case 0:
|
|
@@ -17857,23 +17955,27 @@ function kickMemberFromChannel(action) {
|
|
|
17857
17955
|
memberCount: channel.memberCount - removedMembers.length
|
|
17858
17956
|
});
|
|
17859
17957
|
_context4.next = 20;
|
|
17860
|
-
return
|
|
17861
|
-
memberCount: channel.memberCount - removedMembers.length
|
|
17862
|
-
}));
|
|
17958
|
+
return call(updateActiveChannelMembersRemove, removedMembers) || {};
|
|
17863
17959
|
case 20:
|
|
17864
|
-
|
|
17960
|
+
updateChannelData = _context4.sent;
|
|
17961
|
+
_context4.next = 23;
|
|
17962
|
+
return put(updateChannelDataAC(channel.id, _extends({
|
|
17963
|
+
memberCount: channel.memberCount - removedMembers.length
|
|
17964
|
+
}, updateChannelData)));
|
|
17965
|
+
case 23:
|
|
17966
|
+
_context4.next = 27;
|
|
17865
17967
|
break;
|
|
17866
|
-
case
|
|
17867
|
-
_context4.prev =
|
|
17968
|
+
case 25:
|
|
17969
|
+
_context4.prev = 25;
|
|
17868
17970
|
_context4.t0 = _context4["catch"](0);
|
|
17869
|
-
case
|
|
17971
|
+
case 27:
|
|
17870
17972
|
case "end":
|
|
17871
17973
|
return _context4.stop();
|
|
17872
17974
|
}
|
|
17873
|
-
}, _marked4$2, null, [[0,
|
|
17975
|
+
}, _marked4$2, null, [[0, 25]]);
|
|
17874
17976
|
}
|
|
17875
17977
|
function blockMember(action) {
|
|
17876
|
-
var payload, memberId, channelId, channel, removedMembers;
|
|
17978
|
+
var payload, memberId, channelId, channel, removedMembers, updateChannelData;
|
|
17877
17979
|
return _regeneratorRuntime().wrap(function blockMember$(_context5) {
|
|
17878
17980
|
while (1) switch (_context5.prev = _context5.next) {
|
|
17879
17981
|
case 0:
|
|
@@ -17895,20 +17997,24 @@ function blockMember(action) {
|
|
|
17895
17997
|
memberCount: channel.memberCount - removedMembers.length
|
|
17896
17998
|
});
|
|
17897
17999
|
_context5.next = 14;
|
|
17898
|
-
return
|
|
17899
|
-
memberCount: channel.memberCount - removedMembers.length
|
|
17900
|
-
}));
|
|
18000
|
+
return call(updateActiveChannelMembersRemove, removedMembers) || {};
|
|
17901
18001
|
case 14:
|
|
17902
|
-
|
|
18002
|
+
updateChannelData = _context5.sent;
|
|
18003
|
+
_context5.next = 17;
|
|
18004
|
+
return put(updateChannelDataAC(channel.id, _extends({
|
|
18005
|
+
memberCount: channel.memberCount - removedMembers.length
|
|
18006
|
+
}, updateChannelData)));
|
|
18007
|
+
case 17:
|
|
18008
|
+
_context5.next = 21;
|
|
17903
18009
|
break;
|
|
17904
|
-
case
|
|
17905
|
-
_context5.prev =
|
|
18010
|
+
case 19:
|
|
18011
|
+
_context5.prev = 19;
|
|
17906
18012
|
_context5.t0 = _context5["catch"](0);
|
|
17907
|
-
case
|
|
18013
|
+
case 21:
|
|
17908
18014
|
case "end":
|
|
17909
18015
|
return _context5.stop();
|
|
17910
18016
|
}
|
|
17911
|
-
}, _marked5$2, null, [[0,
|
|
18017
|
+
}, _marked5$2, null, [[0, 19]]);
|
|
17912
18018
|
}
|
|
17913
18019
|
function changeMemberRole(action) {
|
|
17914
18020
|
var payload, channelId, members, channel, updatedMembers;
|
|
@@ -18030,8 +18136,8 @@ function MembersSaga() {
|
|
|
18030
18136
|
}, _marked9$2);
|
|
18031
18137
|
}
|
|
18032
18138
|
|
|
18033
|
-
var _marked$
|
|
18034
|
-
_marked2$
|
|
18139
|
+
var _marked$5 = /*#__PURE__*/_regeneratorRuntime().mark(getContacts),
|
|
18140
|
+
_marked2$4 = /*#__PURE__*/_regeneratorRuntime().mark(blockUser),
|
|
18035
18141
|
_marked3$3 = /*#__PURE__*/_regeneratorRuntime().mark(unblockUser),
|
|
18036
18142
|
_marked4$3 = /*#__PURE__*/_regeneratorRuntime().mark(updateProfile),
|
|
18037
18143
|
_marked5$3 = /*#__PURE__*/_regeneratorRuntime().mark(getUsers),
|
|
@@ -18064,7 +18170,7 @@ function getContacts() {
|
|
|
18064
18170
|
case "end":
|
|
18065
18171
|
return _context.stop();
|
|
18066
18172
|
}
|
|
18067
|
-
}, _marked$
|
|
18173
|
+
}, _marked$5, null, [[0, 11]]);
|
|
18068
18174
|
}
|
|
18069
18175
|
function blockUser(action) {
|
|
18070
18176
|
var SceytChatClient, payload, userIds, blockedUsers, activeChannelId, activeChannel, isDirectChannel, directChannelUser;
|
|
@@ -18126,7 +18232,7 @@ function blockUser(action) {
|
|
|
18126
18232
|
case "end":
|
|
18127
18233
|
return _context2.stop();
|
|
18128
18234
|
}
|
|
18129
|
-
}, _marked2$
|
|
18235
|
+
}, _marked2$4, null, [[0, 21]]);
|
|
18130
18236
|
}
|
|
18131
18237
|
function unblockUser(action) {
|
|
18132
18238
|
var SceytChatClient, payload, userIds, unblockedUsers, activeChannelId, activeChannel, isDirectChannel, directChannelUser;
|
|
@@ -18384,7 +18490,7 @@ function MembersSaga$1() {
|
|
|
18384
18490
|
}, _marked7$3);
|
|
18385
18491
|
}
|
|
18386
18492
|
|
|
18387
|
-
var _marked$
|
|
18493
|
+
var _marked$6 = /*#__PURE__*/_regeneratorRuntime().mark(rootSaga);
|
|
18388
18494
|
function rootSaga() {
|
|
18389
18495
|
return _regeneratorRuntime().wrap(function rootSaga$(_context) {
|
|
18390
18496
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -18395,7 +18501,7 @@ function rootSaga() {
|
|
|
18395
18501
|
case "end":
|
|
18396
18502
|
return _context.stop();
|
|
18397
18503
|
}
|
|
18398
|
-
}, _marked$
|
|
18504
|
+
}, _marked$6);
|
|
18399
18505
|
}
|
|
18400
18506
|
|
|
18401
18507
|
var sagaMiddleware = createSagaMiddleware();
|
|
@@ -18870,9 +18976,10 @@ function useUpdatePresence(channel, isVisible) {
|
|
|
18870
18976
|
}
|
|
18871
18977
|
useEffect(function () {
|
|
18872
18978
|
if (userId && isVisible && directChannelUser) {
|
|
18979
|
+
var _usersMap$userId, _usersMap$userId$pres;
|
|
18873
18980
|
if (!usersMap[userId]) {
|
|
18874
18981
|
setUserToMap(directChannelUser);
|
|
18875
|
-
} else if (usersMap[userId].presence.state !== directChannelUser.presence.state) {
|
|
18982
|
+
} else if (((_usersMap$userId = usersMap[userId]) === null || _usersMap$userId === void 0 ? void 0 : (_usersMap$userId$pres = _usersMap$userId.presence) === null || _usersMap$userId$pres === void 0 ? void 0 : _usersMap$userId$pres.state) !== directChannelUser.presence.state) {
|
|
18876
18983
|
var _updateUserStatusOnCh;
|
|
18877
18984
|
updateUserOnMap(directChannelUser);
|
|
18878
18985
|
dispatch(updateUserStatusOnChannelAC((_updateUserStatusOnCh = {}, _updateUserStatusOnCh[directChannelUser.id] = directChannelUser, _updateUserStatusOnCh)));
|
|
@@ -18888,7 +18995,8 @@ function useUpdatePresence(channel, isVisible) {
|
|
|
18888
18995
|
}
|
|
18889
18996
|
}, [connectionStatus]);
|
|
18890
18997
|
useEffect(function () {
|
|
18891
|
-
|
|
18998
|
+
var _usersMap$directChann, _usersMap$directChann2;
|
|
18999
|
+
if (directChannelUser && usersMap[directChannelUser.id] && directChannelUser.presence && (directChannelUser.presence.state !== usersMap[directChannelUser.id].state || directChannelUser.presence.lastActiveAt && new Date(directChannelUser.presence.lastActiveAt).getTime() !== new Date(((_usersMap$directChann = usersMap[directChannelUser.id]) === null || _usersMap$directChann === void 0 ? void 0 : (_usersMap$directChann2 = _usersMap$directChann.presence) === null || _usersMap$directChann2 === void 0 ? void 0 : _usersMap$directChann2.lastActiveAt) || 0).getTime())) {
|
|
18892
19000
|
var _updateUserStatusOnCh2;
|
|
18893
19001
|
dispatch(updateUserStatusOnChannelAC((_updateUserStatusOnCh2 = {}, _updateUserStatusOnCh2[directChannelUser.id] = directChannelUser, _updateUserStatusOnCh2)));
|
|
18894
19002
|
updateUserOnMap(directChannelUser);
|
|
@@ -21648,7 +21756,7 @@ var ChannelList = function ChannelList(_ref) {
|
|
|
21648
21756
|
if (getSelectedChannel) {
|
|
21649
21757
|
getSelectedChannel(activeChannel);
|
|
21650
21758
|
}
|
|
21651
|
-
}, [activeChannel]);
|
|
21759
|
+
}, [activeChannel && activeChannel.members && activeChannel.members.length]);
|
|
21652
21760
|
useDidUpdate(function () {
|
|
21653
21761
|
if (closeSearchChannels) {
|
|
21654
21762
|
getMyChannels();
|
|
@@ -27730,7 +27838,8 @@ var Attachment = function Attachment(_ref) {
|
|
|
27730
27838
|
borderColor: borderColor
|
|
27731
27839
|
}, /*#__PURE__*/React__default.createElement(UploadPercent, {
|
|
27732
27840
|
isRepliedMessage: isRepliedMessage,
|
|
27733
|
-
isDetailsView: isDetailsView
|
|
27841
|
+
isDetailsView: isDetailsView,
|
|
27842
|
+
backgroundColor: overlayBackground2
|
|
27734
27843
|
}, isInUploadingState ? (/*#__PURE__*/React__default.createElement(CancelResumeWrapper, {
|
|
27735
27844
|
onClick: handlePauseResumeUpload
|
|
27736
27845
|
}, attachmentCompilationState[attachment.tid] === UPLOAD_STATE.UPLOADING ? (/*#__PURE__*/React__default.createElement(SvgCancel, null)) : (/*#__PURE__*/React__default.createElement(SvgUpload, null)))) : !isCached && (/*#__PURE__*/React__default.createElement(CancelResumeWrapper, {
|
|
@@ -27744,7 +27853,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
27744
27853
|
text: '',
|
|
27745
27854
|
styles: {
|
|
27746
27855
|
background: {
|
|
27747
|
-
fill: overlayBackground2
|
|
27856
|
+
fill: overlayBackground2 + "40"
|
|
27748
27857
|
},
|
|
27749
27858
|
path: {
|
|
27750
27859
|
stroke: textOnPrimary,
|
|
@@ -27794,7 +27903,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
27794
27903
|
text: '',
|
|
27795
27904
|
styles: {
|
|
27796
27905
|
background: {
|
|
27797
|
-
fill: overlayBackground2
|
|
27906
|
+
fill: overlayBackground2 + "40"
|
|
27798
27907
|
},
|
|
27799
27908
|
path: {
|
|
27800
27909
|
stroke: textOnPrimary,
|
|
@@ -27889,7 +27998,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
27889
27998
|
fileAttachment: true,
|
|
27890
27999
|
borderRadius: !(attachmentThumb || attachment.attachmentUrl && isPreview) ? '50%' : undefined,
|
|
27891
28000
|
isDetailsView: isDetailsView,
|
|
27892
|
-
backgroundColor:
|
|
28001
|
+
backgroundColor: overlayBackground2
|
|
27893
28002
|
}, (isInUploadingState || downloadingFile) && (/*#__PURE__*/React__default.createElement(CancelResumeWrapper, {
|
|
27894
28003
|
onClick: handlePauseResumeUpload
|
|
27895
28004
|
}, attachmentCompilationState[attachment.tid] === UPLOAD_STATE.UPLOADING || downloadingFile ? (/*#__PURE__*/React__default.createElement(SvgCancel, null)) : isInUploadingState && /*#__PURE__*/React__default.createElement(SvgUpload, null))), (attachmentCompilationState[attachment.tid] === UPLOAD_STATE.UPLOADING || downloadingFile) && (/*#__PURE__*/React__default.createElement(ProgressWrapper$1, null, /*#__PURE__*/React__default.createElement(CircularProgressbar, {
|
|
@@ -27901,7 +28010,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
27901
28010
|
text: '',
|
|
27902
28011
|
styles: {
|
|
27903
28012
|
background: {
|
|
27904
|
-
fill:
|
|
28013
|
+
fill: overlayBackground2 + "40"
|
|
27905
28014
|
},
|
|
27906
28015
|
path: {
|
|
27907
28016
|
stroke: textOnPrimary,
|
|
@@ -36413,7 +36522,7 @@ var Members = function Members(_ref) {
|
|
|
36413
36522
|
var handleMembersListScroll = function handleMembersListScroll(event) {
|
|
36414
36523
|
if (event.target.scrollTop >= event.target.scrollHeight - event.target.offsetHeight - 100) {
|
|
36415
36524
|
if (membersLoading === LOADING_STATE.LOADED) {
|
|
36416
|
-
dispatch(loadMoreMembersAC(15));
|
|
36525
|
+
dispatch(loadMoreMembersAC(15, channel.id));
|
|
36417
36526
|
}
|
|
36418
36527
|
}
|
|
36419
36528
|
};
|
|
@@ -36800,7 +36909,8 @@ var Files = function Files(_ref) {
|
|
|
36800
36909
|
textPrimary = _useColor[THEME_COLORS.TEXT_PRIMARY],
|
|
36801
36910
|
textSecondary = _useColor[THEME_COLORS.TEXT_SECONDARY],
|
|
36802
36911
|
backgroundHovered = _useColor[THEME_COLORS.BACKGROUND_HOVERED],
|
|
36803
|
-
surface1 = _useColor[THEME_COLORS.SURFACE_1]
|
|
36912
|
+
surface1 = _useColor[THEME_COLORS.SURFACE_1],
|
|
36913
|
+
overlayBackground2 = _useColor[THEME_COLORS.OVERLAY_BACKGROUND_2];
|
|
36804
36914
|
var dispatch = useDispatch();
|
|
36805
36915
|
var _useState = useState({}),
|
|
36806
36916
|
downloadingFilesMap = _useState[0],
|
|
@@ -36884,7 +36994,7 @@ var Files = function Files(_ref) {
|
|
|
36884
36994
|
text: '',
|
|
36885
36995
|
styles: {
|
|
36886
36996
|
background: {
|
|
36887
|
-
fill:
|
|
36997
|
+
fill: overlayBackground2 + "40"
|
|
36888
36998
|
},
|
|
36889
36999
|
path: {
|
|
36890
37000
|
stroke: accentColor,
|
|
@@ -37871,7 +37981,7 @@ var Details = function Details(_ref) {
|
|
|
37871
37981
|
if (event.target.scrollTop >= event.target.scrollHeight - event.target.offsetHeight - 100) {
|
|
37872
37982
|
if (activeTab === channelDetailsTabs.member) {
|
|
37873
37983
|
if (membersLoading === LOADING_STATE.LOADED) {
|
|
37874
|
-
dispatch(loadMoreMembersAC(15));
|
|
37984
|
+
dispatch(loadMoreMembersAC(15, activeChannel.id));
|
|
37875
37985
|
}
|
|
37876
37986
|
} else if (messagesLoading === LOADING_STATE.LOADED && attachmentsHasNex) {
|
|
37877
37987
|
dispatch(loadMoreAttachmentsAC(20));
|