sceyt-chat-react-uikit 1.7.7-beta.7 → 1.7.7-beta.9
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/components/ChatContainer/index.d.ts +2 -1
- package/components/SceytChat/index.d.ts +1 -1
- package/index.js +330 -249
- package/index.modern.js +330 -249
- package/package.json +1 -1
package/index.modern.js
CHANGED
|
@@ -9033,6 +9033,7 @@ var showChannelDetails = false;
|
|
|
9033
9033
|
var channelTypesFilter = [];
|
|
9034
9034
|
var memberCount = 10;
|
|
9035
9035
|
var disableFrowardMentionsCount = false;
|
|
9036
|
+
var onUpdateChannel = function onUpdateChannel() {};
|
|
9036
9037
|
var useInviteLink = false;
|
|
9037
9038
|
var inviteLinkOptions = null;
|
|
9038
9039
|
function setBaseUrlForInviteMembers(url) {
|
|
@@ -9147,6 +9148,12 @@ function setDisableFrowardMentionsCount(disable) {
|
|
|
9147
9148
|
function getDisableFrowardMentionsCount() {
|
|
9148
9149
|
return disableFrowardMentionsCount;
|
|
9149
9150
|
}
|
|
9151
|
+
function setOnUpdateChannel(callback) {
|
|
9152
|
+
onUpdateChannel = callback;
|
|
9153
|
+
}
|
|
9154
|
+
function getOnUpdateChannel() {
|
|
9155
|
+
return onUpdateChannel;
|
|
9156
|
+
}
|
|
9150
9157
|
var handleNewMessages;
|
|
9151
9158
|
function setHandleNewMessages(callback) {
|
|
9152
9159
|
handleNewMessages = callback;
|
|
@@ -11948,6 +11955,26 @@ var _memberSlice$actions = memberSlice.actions,
|
|
|
11948
11955
|
getRolesFail = _memberSlice$actions.getRolesFail;
|
|
11949
11956
|
var MembersReducer = memberSlice.reducer;
|
|
11950
11957
|
|
|
11958
|
+
var SET_CONTACT_LOADING_STATE = 'SET_CONTACT_LOADING_STATE';
|
|
11959
|
+
var GET_CONTACTS = 'GET_CONTACTS';
|
|
11960
|
+
var GET_USERS = 'GET_USERS';
|
|
11961
|
+
var LOAD_MORE_USERS = 'LOAD_MORE_USERS';
|
|
11962
|
+
var BLOCK_USERS = 'BLOCK_USERS';
|
|
11963
|
+
var UNBLOCK_USERS = 'UNBLOCK_USERS';
|
|
11964
|
+
var UPDATE_PROFILE = 'UPDATE_PROFILE';
|
|
11965
|
+
var CHECK_USER_STATUS = 'CHECK_USER_STATUS';
|
|
11966
|
+
var CONNECTION_EVENT_TYPES = {
|
|
11967
|
+
TOKEN_WILL_EXPIRE: 'TOKEN_WILL_EXPIRE',
|
|
11968
|
+
CONNECTION_STATUS_CHANGED: 'CONNECTION_STATUS_CHANGED',
|
|
11969
|
+
TOKEN_EXPIRED: 'TOKEN_EXPIRED'
|
|
11970
|
+
};
|
|
11971
|
+
var CONNECTION_STATUS = {
|
|
11972
|
+
CONNECTING: 'Connecting',
|
|
11973
|
+
CONNECTED: 'Connected',
|
|
11974
|
+
CONNECTING_FAILED: 'Failed',
|
|
11975
|
+
DISCONNECTED: 'Disconnected'
|
|
11976
|
+
};
|
|
11977
|
+
|
|
11951
11978
|
var initialState$3 = {
|
|
11952
11979
|
connectionStatus: '',
|
|
11953
11980
|
contactList: [],
|
|
@@ -11961,7 +11988,8 @@ var initialState$3 = {
|
|
|
11961
11988
|
lastName: '',
|
|
11962
11989
|
state: ''
|
|
11963
11990
|
},
|
|
11964
|
-
browserTabIsActive: true
|
|
11991
|
+
browserTabIsActive: true,
|
|
11992
|
+
waitToSendPendingMessages: false
|
|
11965
11993
|
};
|
|
11966
11994
|
var userSlice = createSlice({
|
|
11967
11995
|
name: 'users',
|
|
@@ -11969,6 +11997,9 @@ var userSlice = createSlice({
|
|
|
11969
11997
|
reducers: {
|
|
11970
11998
|
setConnectionStatus: function setConnectionStatus(state, action) {
|
|
11971
11999
|
state.connectionStatus = action.payload.status;
|
|
12000
|
+
if (action.payload.status === CONNECTION_STATUS.CONNECTED) {
|
|
12001
|
+
state.waitToSendPendingMessages = true;
|
|
12002
|
+
}
|
|
11972
12003
|
},
|
|
11973
12004
|
setUser: function setUser(state, action) {
|
|
11974
12005
|
state.user = _extends({}, action.payload.user);
|
|
@@ -12000,6 +12031,9 @@ var userSlice = createSlice({
|
|
|
12000
12031
|
},
|
|
12001
12032
|
setBrowserTabIsActive: function setBrowserTabIsActive(state, action) {
|
|
12002
12033
|
state.browserTabIsActive = action.payload.state;
|
|
12034
|
+
},
|
|
12035
|
+
setWaitToSendPendingMessages: function setWaitToSendPendingMessages(state, action) {
|
|
12036
|
+
state.waitToSendPendingMessages = action.payload.state;
|
|
12003
12037
|
}
|
|
12004
12038
|
},
|
|
12005
12039
|
extraReducers: function extraReducers(builder) {
|
|
@@ -12017,7 +12051,8 @@ var _userSlice$actions = userSlice.actions,
|
|
|
12017
12051
|
updateUserMap = _userSlice$actions.updateUserMap,
|
|
12018
12052
|
setContacts = _userSlice$actions.setContacts,
|
|
12019
12053
|
updateUserProfile = _userSlice$actions.updateUserProfile,
|
|
12020
|
-
setBrowserTabIsActive = _userSlice$actions.setBrowserTabIsActive
|
|
12054
|
+
setBrowserTabIsActive = _userSlice$actions.setBrowserTabIsActive,
|
|
12055
|
+
setWaitToSendPendingMessages = _userSlice$actions.setWaitToSendPendingMessages;
|
|
12021
12056
|
var UserReducer = userSlice.reducer;
|
|
12022
12057
|
|
|
12023
12058
|
var SET_THEME = 'SET_THEME';
|
|
@@ -12700,26 +12735,6 @@ var joinChannelWithInviteKeyAC = function joinChannelWithInviteKeyAC(key) {
|
|
|
12700
12735
|
};
|
|
12701
12736
|
};
|
|
12702
12737
|
|
|
12703
|
-
var SET_CONTACT_LOADING_STATE = 'SET_CONTACT_LOADING_STATE';
|
|
12704
|
-
var GET_CONTACTS = 'GET_CONTACTS';
|
|
12705
|
-
var GET_USERS = 'GET_USERS';
|
|
12706
|
-
var LOAD_MORE_USERS = 'LOAD_MORE_USERS';
|
|
12707
|
-
var BLOCK_USERS = 'BLOCK_USERS';
|
|
12708
|
-
var UNBLOCK_USERS = 'UNBLOCK_USERS';
|
|
12709
|
-
var UPDATE_PROFILE = 'UPDATE_PROFILE';
|
|
12710
|
-
var CHECK_USER_STATUS = 'CHECK_USER_STATUS';
|
|
12711
|
-
var CONNECTION_EVENT_TYPES = {
|
|
12712
|
-
TOKEN_WILL_EXPIRE: 'TOKEN_WILL_EXPIRE',
|
|
12713
|
-
CONNECTION_STATUS_CHANGED: 'CONNECTION_STATUS_CHANGED',
|
|
12714
|
-
TOKEN_EXPIRED: 'TOKEN_EXPIRED'
|
|
12715
|
-
};
|
|
12716
|
-
var CONNECTION_STATUS = {
|
|
12717
|
-
CONNECTING: 'Connecting',
|
|
12718
|
-
CONNECTED: 'Connected',
|
|
12719
|
-
CONNECTING_FAILED: 'Failed',
|
|
12720
|
-
DISCONNECTED: 'Disconnected'
|
|
12721
|
-
};
|
|
12722
|
-
|
|
12723
12738
|
var getUsersAC = function getUsersAC(params) {
|
|
12724
12739
|
return {
|
|
12725
12740
|
type: GET_USERS,
|
|
@@ -12831,6 +12846,11 @@ var updateUserStatusOnMapAC = function updateUserStatusOnMapAC(usersMap) {
|
|
|
12831
12846
|
usersMap: usersMap
|
|
12832
12847
|
});
|
|
12833
12848
|
};
|
|
12849
|
+
var setWaitToSendPendingMessagesAC = function setWaitToSendPendingMessagesAC(state) {
|
|
12850
|
+
return setWaitToSendPendingMessages({
|
|
12851
|
+
state: state
|
|
12852
|
+
});
|
|
12853
|
+
};
|
|
12834
12854
|
|
|
12835
12855
|
var userDisplayNameFromContact = false;
|
|
12836
12856
|
var setShowOnlyContactUsers = function setShowOnlyContactUsers(value) {
|
|
@@ -14520,7 +14540,7 @@ function watchForEvents() {
|
|
|
14520
14540
|
};
|
|
14521
14541
|
});
|
|
14522
14542
|
_loop = /*#__PURE__*/_regenerator().m(function _callee() {
|
|
14523
|
-
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,
|
|
14543
|
+
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, onUpdateChannel, updatedChannel, _channelExists5, subject, avatarUrl, muted, mutedTill, metadata, _channel5, fields, _activeChannelId4, _groupName3, _channel6, 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, _channel7, _activeChannelId6, updateLastMessage, markersMap, activeChannelMessages, _iterator, _step, messageId, isPendingMessage, lastMessage, _channelId, _channel8, _channel9, deletedMessage, _activeChannelId7, _channelExists7, _channel0, _message, _activeChannelId8, _channelExists8, _channel1, 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, _pollDetailsData$chan, _pollDetailsData$chan2, _channel10, pollDetails, _messageId, pollDetailsData, _activeChannelId0, addedVotes, deletedVotes, objs, _iterator2, _step2, vote, _iterator3, _step3, _vote, _i, _objs, obj, _store$getState$Messa, key, hasNext, _i2, _objs2, _obj, _pollDetailsData$chan3, _channel11, _pollDetails, _messageId2, _pollDetailsData, _activeChannelId1, _deletedVotes, _objs3, _iterator4, _step4, _vote2, _i3, _objs4, _obj2, _i4, _objs5, _obj3, _pollDetailsData2$cha, _channel12, _pollDetails2, _messageId3, _activeChannelId10, _pollDetailsData2, retractedVotes, _objs6, _iterator5, _step5, _vote4, _i5, _objs7, _obj4, _iterator6, _step6, _vote3, _channel13, _messageId4, _activeChannelId11, _obj5, _channel14, _user, _message3, _reaction, channelFromMap, _isSelf, _activeChannelId12, _channelUpdateParams, _channel15, _updatedChannel, _channel16, _activeChannelId13, channelExist, _channel17, _channel18, _channel19, _channel20, _channel21, _channel22, _channel23, _groupName5, _channel24, _groupName6, _channel25, members, _activeChannelId14, i, _channel26, _channel27, _channelId2, from, name, status, _t, _t2;
|
|
14524
14544
|
return _regenerator().w(function (_context) {
|
|
14525
14545
|
while (1) switch (_context.p = _context.n) {
|
|
14526
14546
|
case 0:
|
|
@@ -14787,10 +14807,33 @@ function watchForEvents() {
|
|
|
14787
14807
|
});
|
|
14788
14808
|
return _context.a(3, 183);
|
|
14789
14809
|
case 46:
|
|
14810
|
+
onUpdateChannel = getOnUpdateChannel();
|
|
14790
14811
|
log.info('channel UPDATE_CHANNEL ... ');
|
|
14791
14812
|
updatedChannel = args.updatedChannel;
|
|
14792
14813
|
_channelExists5 = checkChannelExists(updatedChannel.id);
|
|
14793
14814
|
subject = updatedChannel.subject, avatarUrl = updatedChannel.avatarUrl, muted = updatedChannel.muted, mutedTill = updatedChannel.mutedTill, metadata = updatedChannel.metadata;
|
|
14815
|
+
_channel5 = getChannelFromMap(updatedChannel.id);
|
|
14816
|
+
fields = [];
|
|
14817
|
+
if (_channel5) {
|
|
14818
|
+
if (_channel5.subject !== subject) {
|
|
14819
|
+
fields.push('subject');
|
|
14820
|
+
}
|
|
14821
|
+
if (_channel5.avatarUrl !== avatarUrl) {
|
|
14822
|
+
fields.push('avatarUrl');
|
|
14823
|
+
}
|
|
14824
|
+
if (_channel5.muted !== muted) {
|
|
14825
|
+
fields.push('muted');
|
|
14826
|
+
}
|
|
14827
|
+
if (_channel5.mutedTill !== mutedTill) {
|
|
14828
|
+
fields.push('mutedTill');
|
|
14829
|
+
}
|
|
14830
|
+
if (_channel5.metadata !== isJSON(metadata) ? JSON.parse(metadata) : metadata) {
|
|
14831
|
+
fields.push('metadata');
|
|
14832
|
+
}
|
|
14833
|
+
}
|
|
14834
|
+
if (onUpdateChannel) {
|
|
14835
|
+
onUpdateChannel(updatedChannel, fields);
|
|
14836
|
+
}
|
|
14794
14837
|
if (!_channelExists5) {
|
|
14795
14838
|
_context.n = 49;
|
|
14796
14839
|
break;
|
|
@@ -14834,18 +14877,18 @@ function watchForEvents() {
|
|
|
14834
14877
|
});
|
|
14835
14878
|
return _context.a(3, 183);
|
|
14836
14879
|
case 51:
|
|
14837
|
-
|
|
14838
|
-
log.info('channel MESSAGE ... id : ', message.id, ', channel.id: ',
|
|
14839
|
-
messageToHandle = handleNewMessages ? handleNewMessages(message,
|
|
14880
|
+
_channel6 = args.channel, message = args.message;
|
|
14881
|
+
log.info('channel MESSAGE ... id : ', message.id, ', channel.id: ', _channel6.id);
|
|
14882
|
+
messageToHandle = handleNewMessages ? handleNewMessages(message, _channel6) : message;
|
|
14840
14883
|
_channelFilterTypes = getChannelTypesFilter();
|
|
14841
|
-
if (!(messageToHandle &&
|
|
14884
|
+
if (!(messageToHandle && _channel6 && (_channelFilterTypes !== null && _channelFilterTypes !== void 0 && _channelFilterTypes.length ? _channelFilterTypes.includes(_channel6.type) : true))) {
|
|
14842
14885
|
_context.n = 65;
|
|
14843
14886
|
break;
|
|
14844
14887
|
}
|
|
14845
|
-
|
|
14888
|
+
_channel6.metadata = isJSON(_channel6.metadata) ? JSON.parse(_channel6.metadata) : _channel6.metadata;
|
|
14846
14889
|
_activeChannelId5 = getActiveChannelId();
|
|
14847
|
-
_channelExists6 = checkChannelExists(
|
|
14848
|
-
channelForAdd = JSON.parse(JSON.stringify(
|
|
14890
|
+
_channelExists6 = checkChannelExists(_channel6.id);
|
|
14891
|
+
channelForAdd = JSON.parse(JSON.stringify(_channel6));
|
|
14849
14892
|
_context.n = 52;
|
|
14850
14893
|
return put(addChannelAC(channelForAdd));
|
|
14851
14894
|
case 52:
|
|
@@ -14853,7 +14896,7 @@ function watchForEvents() {
|
|
|
14853
14896
|
_context.n = 53;
|
|
14854
14897
|
break;
|
|
14855
14898
|
}
|
|
14856
|
-
setChannelInMap(
|
|
14899
|
+
setChannelInMap(_channel6);
|
|
14857
14900
|
_context.n = 54;
|
|
14858
14901
|
break;
|
|
14859
14902
|
case 53:
|
|
@@ -14864,7 +14907,7 @@ function watchForEvents() {
|
|
|
14864
14907
|
_context.n = 54;
|
|
14865
14908
|
return put(updateChannelLastMessageAC(message, channelForAdd));
|
|
14866
14909
|
case 54:
|
|
14867
|
-
if (!(
|
|
14910
|
+
if (!(_channel6.id === _activeChannelId5)) {
|
|
14868
14911
|
_context.n = 56;
|
|
14869
14912
|
break;
|
|
14870
14913
|
}
|
|
@@ -14884,9 +14927,9 @@ function watchForEvents() {
|
|
|
14884
14927
|
_context.n = 56;
|
|
14885
14928
|
return put(scrollToNewMessageAC(true, false, true));
|
|
14886
14929
|
case 56:
|
|
14887
|
-
addMessageToMap(
|
|
14930
|
+
addMessageToMap(_channel6.id, message);
|
|
14888
14931
|
_context.n = 57;
|
|
14889
|
-
return put(updateChannelDataAC(
|
|
14932
|
+
return put(updateChannelDataAC(_channel6.id, {
|
|
14890
14933
|
messageCount: channelForAdd.messageCount,
|
|
14891
14934
|
unread: channelForAdd.unread,
|
|
14892
14935
|
newMessageCount: channelForAdd.newMessageCount,
|
|
@@ -14902,9 +14945,9 @@ function watchForEvents() {
|
|
|
14902
14945
|
lastReactedMessage: null
|
|
14903
14946
|
}));
|
|
14904
14947
|
case 57:
|
|
14905
|
-
_groupName4 = getChannelGroupName(
|
|
14948
|
+
_groupName4 = getChannelGroupName(_channel6);
|
|
14906
14949
|
_context.n = 58;
|
|
14907
|
-
return put(updateSearchedChannelDataAC(
|
|
14950
|
+
return put(updateSearchedChannelDataAC(_channel6.id, {
|
|
14908
14951
|
messageCount: channelForAdd.messageCount,
|
|
14909
14952
|
unread: channelForAdd.unread,
|
|
14910
14953
|
newMessageCount: channelForAdd.newMessageCount,
|
|
@@ -14921,7 +14964,7 @@ function watchForEvents() {
|
|
|
14921
14964
|
}, _groupName4));
|
|
14922
14965
|
case 58:
|
|
14923
14966
|
showNotifications = getShowNotifications();
|
|
14924
|
-
if (!(showNotifications && !message.silent && message.user.id !== SceytChatClient.user.id && !
|
|
14967
|
+
if (!(showNotifications && !message.silent && message.user.id !== SceytChatClient.user.id && !_channel6.muted)) {
|
|
14925
14968
|
_context.n = 61;
|
|
14926
14969
|
break;
|
|
14927
14970
|
}
|
|
@@ -14933,7 +14976,7 @@ function watchForEvents() {
|
|
|
14933
14976
|
return select(browserTabIsActiveSelector);
|
|
14934
14977
|
case 59:
|
|
14935
14978
|
tabIsActive = _context.v;
|
|
14936
|
-
if (!(document.visibilityState !== 'visible' || !tabIsActive ||
|
|
14979
|
+
if (!(document.visibilityState !== 'visible' || !tabIsActive || _channel6.id !== _activeChannelId5)) {
|
|
14937
14980
|
_context.n = 61;
|
|
14938
14981
|
break;
|
|
14939
14982
|
}
|
|
@@ -14956,7 +14999,7 @@ function watchForEvents() {
|
|
|
14956
14999
|
accentColor: accentColor,
|
|
14957
15000
|
textSecondary: textSecondary
|
|
14958
15001
|
});
|
|
14959
|
-
setNotification(messageBody, message.user,
|
|
15002
|
+
setNotification(messageBody, message.user, _channel6, undefined, message.attachments && message.attachments.length ? message.attachments.find(function (att) {
|
|
14960
15003
|
return att.type !== attachmentTypes.link;
|
|
14961
15004
|
}) : undefined);
|
|
14962
15005
|
case 61:
|
|
@@ -14971,9 +15014,9 @@ function watchForEvents() {
|
|
|
14971
15014
|
break;
|
|
14972
15015
|
case 63:
|
|
14973
15016
|
_context.n = 64;
|
|
14974
|
-
return put(markMessagesAsDeliveredAC(
|
|
15017
|
+
return put(markMessagesAsDeliveredAC(_channel6.id, [message.id]));
|
|
14975
15018
|
case 64:
|
|
14976
|
-
updateChannelOnAllChannels(
|
|
15019
|
+
updateChannelOnAllChannels(_channel6.id, {
|
|
14977
15020
|
messageCount: channelForAdd.messageCount,
|
|
14978
15021
|
unread: channelForAdd.unread,
|
|
14979
15022
|
newMessageCount: channelForAdd.newMessageCount,
|
|
@@ -14985,10 +15028,10 @@ function watchForEvents() {
|
|
|
14985
15028
|
lastMessage: channelForAdd.lastMessage,
|
|
14986
15029
|
messages: channelForAdd.messages,
|
|
14987
15030
|
newReactions: channelForAdd.newReactions,
|
|
14988
|
-
lastReactedMessage:
|
|
14989
|
-
userMessageReactions:
|
|
15031
|
+
lastReactedMessage: _channel6.lastReactedMessage,
|
|
15032
|
+
userMessageReactions: _channel6.userMessageReactions
|
|
14990
15033
|
});
|
|
14991
|
-
updateChannelLastMessageOnAllChannels(
|
|
15034
|
+
updateChannelLastMessageOnAllChannels(_channel6.id, _channel6.lastMessage);
|
|
14992
15035
|
case 65:
|
|
14993
15036
|
return _context.a(3, 183);
|
|
14994
15037
|
case 66:
|
|
@@ -14996,9 +15039,9 @@ function watchForEvents() {
|
|
|
14996
15039
|
_context.n = 67;
|
|
14997
15040
|
return call(getChannelFromMap, channelId);
|
|
14998
15041
|
case 67:
|
|
14999
|
-
|
|
15000
|
-
log.info('channel MESSAGE_MARKERS_RECEIVED ... channel: ',
|
|
15001
|
-
if (!
|
|
15042
|
+
_channel7 = _context.v;
|
|
15043
|
+
log.info('channel MESSAGE_MARKERS_RECEIVED ... channel: ', _channel7, 'markers list: ', markerList);
|
|
15044
|
+
if (!_channel7) {
|
|
15002
15045
|
_context.n = 78;
|
|
15003
15046
|
break;
|
|
15004
15047
|
}
|
|
@@ -15034,8 +15077,8 @@ function watchForEvents() {
|
|
|
15034
15077
|
}
|
|
15035
15078
|
case 72:
|
|
15036
15079
|
markersMap[messageId] = true;
|
|
15037
|
-
if (
|
|
15038
|
-
if (
|
|
15080
|
+
if (_channel7) {
|
|
15081
|
+
if (_channel7.lastMessage && messageId === _channel7.lastMessage.id) {
|
|
15039
15082
|
updateLastMessage = true;
|
|
15040
15083
|
}
|
|
15041
15084
|
}
|
|
@@ -15051,10 +15094,10 @@ function watchForEvents() {
|
|
|
15051
15094
|
_context.n = 75;
|
|
15052
15095
|
break;
|
|
15053
15096
|
}
|
|
15054
|
-
lastMessage = _extends({},
|
|
15055
|
-
updateChannelLastMessageOnAllChannels(
|
|
15097
|
+
lastMessage = _extends({}, _channel7.lastMessage, updateMessageDeliveryStatusAndMarkers(_channel7.lastMessage, markerList.name));
|
|
15098
|
+
updateChannelLastMessageOnAllChannels(_channel7.id, lastMessage);
|
|
15056
15099
|
_context.n = 75;
|
|
15057
|
-
return put(updateChannelLastMessageStatusAC(lastMessage,
|
|
15100
|
+
return put(updateChannelLastMessageStatusAC(lastMessage, _channel7));
|
|
15058
15101
|
case 75:
|
|
15059
15102
|
if (!(_activeChannelId6 === channelId)) {
|
|
15060
15103
|
_context.n = 77;
|
|
@@ -15065,7 +15108,7 @@ function watchForEvents() {
|
|
|
15065
15108
|
case 76:
|
|
15066
15109
|
updateMarkersOnAllMessages(markersMap, markerList.name);
|
|
15067
15110
|
case 77:
|
|
15068
|
-
updateMessageStatusOnMap(
|
|
15111
|
+
updateMessageStatusOnMap(_channel7.id, {
|
|
15069
15112
|
name: markerList.name,
|
|
15070
15113
|
markersMap: markersMap
|
|
15071
15114
|
});
|
|
@@ -15077,21 +15120,21 @@ function watchForEvents() {
|
|
|
15077
15120
|
case 79:
|
|
15078
15121
|
_channelId = args.channelId;
|
|
15079
15122
|
log.info('channel DELETE ... ');
|
|
15080
|
-
|
|
15123
|
+
_channel8 = getChannelFromMap(_channelId);
|
|
15081
15124
|
_context.n = 80;
|
|
15082
|
-
return put(setChannelToRemoveAC(
|
|
15125
|
+
return put(setChannelToRemoveAC(_channel8));
|
|
15083
15126
|
case 80:
|
|
15084
15127
|
deleteChannelFromAllChannels(_channelId);
|
|
15085
15128
|
return _context.a(3, 183);
|
|
15086
15129
|
case 81:
|
|
15087
|
-
|
|
15130
|
+
_channel9 = args.channel, deletedMessage = args.deletedMessage;
|
|
15088
15131
|
_context.n = 82;
|
|
15089
15132
|
return call(getActiveChannelId);
|
|
15090
15133
|
case 82:
|
|
15091
15134
|
_activeChannelId7 = _context.v;
|
|
15092
15135
|
log.info('channel DELETE_MESSAGE ... ');
|
|
15093
|
-
_channelExists7 = checkChannelExists(
|
|
15094
|
-
if (!(
|
|
15136
|
+
_channelExists7 = checkChannelExists(_channel9.id);
|
|
15137
|
+
if (!(_channel9.id === _activeChannelId7)) {
|
|
15095
15138
|
_context.n = 83;
|
|
15096
15139
|
break;
|
|
15097
15140
|
}
|
|
@@ -15099,7 +15142,7 @@ function watchForEvents() {
|
|
|
15099
15142
|
_context.n = 83;
|
|
15100
15143
|
return put(updateMessageAC(deletedMessage.id, deletedMessage));
|
|
15101
15144
|
case 83:
|
|
15102
|
-
updateMessageOnMap(
|
|
15145
|
+
updateMessageOnMap(_channel9.id, {
|
|
15103
15146
|
messageId: deletedMessage.id,
|
|
15104
15147
|
params: deletedMessage
|
|
15105
15148
|
});
|
|
@@ -15108,33 +15151,33 @@ function watchForEvents() {
|
|
|
15108
15151
|
break;
|
|
15109
15152
|
}
|
|
15110
15153
|
_context.n = 84;
|
|
15111
|
-
return put(updateChannelDataAC(
|
|
15112
|
-
newMessageCount:
|
|
15113
|
-
muted:
|
|
15114
|
-
mutedTill:
|
|
15154
|
+
return put(updateChannelDataAC(_channel9.id, {
|
|
15155
|
+
newMessageCount: _channel9.newMessageCount,
|
|
15156
|
+
muted: _channel9.muted,
|
|
15157
|
+
mutedTill: _channel9.mutedTill
|
|
15115
15158
|
}));
|
|
15116
15159
|
case 84:
|
|
15117
|
-
if (!(
|
|
15160
|
+
if (!(_channel9.lastMessage.id === deletedMessage.id)) {
|
|
15118
15161
|
_context.n = 85;
|
|
15119
15162
|
break;
|
|
15120
15163
|
}
|
|
15121
15164
|
_context.n = 85;
|
|
15122
|
-
return put(updateChannelLastMessageAC(deletedMessage,
|
|
15165
|
+
return put(updateChannelLastMessageAC(deletedMessage, _channel9));
|
|
15123
15166
|
case 85:
|
|
15124
|
-
updateChannelOnAllChannels(
|
|
15125
|
-
newMessageCount:
|
|
15126
|
-
muted:
|
|
15127
|
-
mutedTill:
|
|
15167
|
+
updateChannelOnAllChannels(_channel9.id, {
|
|
15168
|
+
newMessageCount: _channel9.newMessageCount,
|
|
15169
|
+
muted: _channel9.muted,
|
|
15170
|
+
mutedTill: _channel9.mutedTill
|
|
15128
15171
|
}, deletedMessage);
|
|
15129
15172
|
return _context.a(3, 183);
|
|
15130
15173
|
case 86:
|
|
15131
|
-
|
|
15174
|
+
_channel0 = args.channel, _message = args.message;
|
|
15132
15175
|
_context.n = 87;
|
|
15133
15176
|
return call(getActiveChannelId);
|
|
15134
15177
|
case 87:
|
|
15135
15178
|
_activeChannelId8 = _context.v;
|
|
15136
|
-
_channelExists8 = checkChannelExists(
|
|
15137
|
-
if (!(
|
|
15179
|
+
_channelExists8 = checkChannelExists(_channel0.id);
|
|
15180
|
+
if (!(_channel0.id === _activeChannelId8)) {
|
|
15138
15181
|
_context.n = 89;
|
|
15139
15182
|
break;
|
|
15140
15183
|
}
|
|
@@ -15161,29 +15204,29 @@ function watchForEvents() {
|
|
|
15161
15204
|
_context.n = 90;
|
|
15162
15205
|
break;
|
|
15163
15206
|
}
|
|
15164
|
-
if (!(
|
|
15207
|
+
if (!(_channel0.lastMessage.id === _message.id)) {
|
|
15165
15208
|
_context.n = 90;
|
|
15166
15209
|
break;
|
|
15167
15210
|
}
|
|
15168
15211
|
_context.n = 90;
|
|
15169
|
-
return put(updateChannelLastMessageAC(_message,
|
|
15212
|
+
return put(updateChannelLastMessageAC(_message, _channel0));
|
|
15170
15213
|
case 90:
|
|
15171
|
-
if (checkChannelExistsOnMessagesMap(
|
|
15172
|
-
updateMessageOnMap(
|
|
15214
|
+
if (checkChannelExistsOnMessagesMap(_channel0.id)) {
|
|
15215
|
+
updateMessageOnMap(_channel0.id, {
|
|
15173
15216
|
messageId: _message.id,
|
|
15174
15217
|
params: _message
|
|
15175
15218
|
});
|
|
15176
15219
|
}
|
|
15177
|
-
updateChannelOnAllChannels(
|
|
15220
|
+
updateChannelOnAllChannels(_channel0.id, {}, _message);
|
|
15178
15221
|
return _context.a(3, 183);
|
|
15179
15222
|
case 91:
|
|
15180
|
-
|
|
15223
|
+
_channel1 = args.channel, user = args.user, _message2 = args.message, reaction = args.reaction;
|
|
15181
15224
|
isSelf = user.id === SceytChatClient.user.id;
|
|
15182
15225
|
_context.n = 92;
|
|
15183
15226
|
return call(getActiveChannelId);
|
|
15184
15227
|
case 92:
|
|
15185
15228
|
_activeChannelId9 = _context.v;
|
|
15186
|
-
if (!(
|
|
15229
|
+
if (!(_channel1.id === _activeChannelId9)) {
|
|
15187
15230
|
_context.n = 94;
|
|
15188
15231
|
break;
|
|
15189
15232
|
}
|
|
@@ -15200,7 +15243,7 @@ function watchForEvents() {
|
|
|
15200
15243
|
_context.n = 96;
|
|
15201
15244
|
break;
|
|
15202
15245
|
}
|
|
15203
|
-
if (!(document.visibilityState !== 'visible' ||
|
|
15246
|
+
if (!(document.visibilityState !== 'visible' || _channel1.id !== _activeChannelId9)) {
|
|
15204
15247
|
_context.n = 96;
|
|
15205
15248
|
break;
|
|
15206
15249
|
}
|
|
@@ -15223,38 +15266,38 @@ function watchForEvents() {
|
|
|
15223
15266
|
accentColor: _accentColor,
|
|
15224
15267
|
textSecondary: _textSecondary
|
|
15225
15268
|
});
|
|
15226
|
-
setNotification(_messageBody, reaction.user,
|
|
15269
|
+
setNotification(_messageBody, reaction.user, _channel1, reaction.key, _message2.attachments && _message2.attachments.length ? _message2.attachments.find(function (att) {
|
|
15227
15270
|
return att.type !== attachmentTypes.link;
|
|
15228
15271
|
}) : undefined);
|
|
15229
15272
|
case 96:
|
|
15230
|
-
if (!(
|
|
15273
|
+
if (!(_channel1.newReactions && _channel1.newReactions.length)) {
|
|
15231
15274
|
_context.n = 97;
|
|
15232
15275
|
break;
|
|
15233
15276
|
}
|
|
15234
15277
|
channelUpdateParams = {
|
|
15235
|
-
userMessageReactions:
|
|
15278
|
+
userMessageReactions: _channel1.newReactions,
|
|
15236
15279
|
lastReactedMessage: _message2,
|
|
15237
|
-
newReactions:
|
|
15238
|
-
muted:
|
|
15239
|
-
mutedTill:
|
|
15280
|
+
newReactions: _channel1.newReactions,
|
|
15281
|
+
muted: _channel1.muted,
|
|
15282
|
+
mutedTill: _channel1.mutedTill
|
|
15240
15283
|
};
|
|
15241
15284
|
_context.n = 97;
|
|
15242
|
-
return put(updateChannelDataAC(
|
|
15285
|
+
return put(updateChannelDataAC(_channel1.id, channelUpdateParams));
|
|
15243
15286
|
case 97:
|
|
15244
|
-
updateChannelOnAllChannels(
|
|
15245
|
-
userMessageReactions:
|
|
15287
|
+
updateChannelOnAllChannels(_channel1.id, {
|
|
15288
|
+
userMessageReactions: _channel1.newReactions,
|
|
15246
15289
|
lastReactedMessage: _message2,
|
|
15247
|
-
newReactions:
|
|
15248
|
-
muted:
|
|
15249
|
-
mutedTill:
|
|
15290
|
+
newReactions: _channel1.newReactions,
|
|
15291
|
+
muted: _channel1.muted,
|
|
15292
|
+
mutedTill: _channel1.mutedTill
|
|
15250
15293
|
});
|
|
15251
15294
|
case 98:
|
|
15252
|
-
if (checkChannelExistsOnMessagesMap(
|
|
15253
|
-
addReactionToMessageOnMap(
|
|
15295
|
+
if (checkChannelExistsOnMessagesMap(_channel1.id)) {
|
|
15296
|
+
addReactionToMessageOnMap(_channel1.id, _message2, reaction, true);
|
|
15254
15297
|
}
|
|
15255
15298
|
return _context.a(3, 183);
|
|
15256
15299
|
case 99:
|
|
15257
|
-
|
|
15300
|
+
_channel10 = args.channel, pollDetails = args.pollDetails, _messageId = args.messageId;
|
|
15258
15301
|
pollDetailsData = pollDetails;
|
|
15259
15302
|
_context.n = 100;
|
|
15260
15303
|
return call(getActiveChannelId);
|
|
@@ -15316,7 +15359,7 @@ function watchForEvents() {
|
|
|
15316
15359
|
break;
|
|
15317
15360
|
}
|
|
15318
15361
|
_obj = _objs2[_i2];
|
|
15319
|
-
updateMessageOnMap(
|
|
15362
|
+
updateMessageOnMap(_channel10.id, {
|
|
15320
15363
|
messageId: _messageId,
|
|
15321
15364
|
params: {}
|
|
15322
15365
|
}, {
|
|
@@ -15324,7 +15367,7 @@ function watchForEvents() {
|
|
|
15324
15367
|
vote: _obj.vote,
|
|
15325
15368
|
incrementVotesPerOptionCount: _obj.incrementVotesPerOptionCount
|
|
15326
15369
|
});
|
|
15327
|
-
if (!(
|
|
15370
|
+
if (!(_channel10.id === _activeChannelId0)) {
|
|
15328
15371
|
_context.n = 107;
|
|
15329
15372
|
break;
|
|
15330
15373
|
}
|
|
@@ -15338,7 +15381,7 @@ function watchForEvents() {
|
|
|
15338
15381
|
case 108:
|
|
15339
15382
|
return _context.a(3, 183);
|
|
15340
15383
|
case 109:
|
|
15341
|
-
|
|
15384
|
+
_channel11 = args.channel, _pollDetails = args.pollDetails, _messageId2 = args.messageId;
|
|
15342
15385
|
_pollDetailsData = _pollDetails;
|
|
15343
15386
|
_context.n = 110;
|
|
15344
15387
|
return call(getActiveChannelId);
|
|
@@ -15379,11 +15422,11 @@ function watchForEvents() {
|
|
|
15379
15422
|
break;
|
|
15380
15423
|
}
|
|
15381
15424
|
_obj3 = _objs5[_i4];
|
|
15382
|
-
updateMessageOnMap(
|
|
15425
|
+
updateMessageOnMap(_channel11.id, {
|
|
15383
15426
|
messageId: _messageId2,
|
|
15384
15427
|
params: {}
|
|
15385
15428
|
}, _obj3);
|
|
15386
|
-
if (!(
|
|
15429
|
+
if (!(_channel11.id === _activeChannelId1)) {
|
|
15387
15430
|
_context.n = 115;
|
|
15388
15431
|
break;
|
|
15389
15432
|
}
|
|
@@ -15397,7 +15440,7 @@ function watchForEvents() {
|
|
|
15397
15440
|
case 116:
|
|
15398
15441
|
return _context.a(3, 183);
|
|
15399
15442
|
case 117:
|
|
15400
|
-
|
|
15443
|
+
_channel12 = args.channel, _pollDetails2 = args.pollDetails, _messageId3 = args.messageId;
|
|
15401
15444
|
_context.n = 118;
|
|
15402
15445
|
return call(getActiveChannelId);
|
|
15403
15446
|
case 118:
|
|
@@ -15420,7 +15463,7 @@ function watchForEvents() {
|
|
|
15420
15463
|
break;
|
|
15421
15464
|
}
|
|
15422
15465
|
_obj4 = _objs7[_i5];
|
|
15423
|
-
updateMessageOnMap(
|
|
15466
|
+
updateMessageOnMap(_channel12.id, {
|
|
15424
15467
|
messageId: _messageId3,
|
|
15425
15468
|
params: {}
|
|
15426
15469
|
}, _obj4);
|
|
@@ -15441,7 +15484,7 @@ function watchForEvents() {
|
|
|
15441
15484
|
_context.n = 120;
|
|
15442
15485
|
break;
|
|
15443
15486
|
case 122:
|
|
15444
|
-
if (!(
|
|
15487
|
+
if (!(_channel12.id === _activeChannelId10)) {
|
|
15445
15488
|
_context.n = 123;
|
|
15446
15489
|
break;
|
|
15447
15490
|
}
|
|
@@ -15455,7 +15498,7 @@ function watchForEvents() {
|
|
|
15455
15498
|
case 124:
|
|
15456
15499
|
return _context.a(3, 183);
|
|
15457
15500
|
case 125:
|
|
15458
|
-
|
|
15501
|
+
_channel13 = args.channel, _messageId4 = args.messageId;
|
|
15459
15502
|
_context.n = 126;
|
|
15460
15503
|
return call(getActiveChannelId);
|
|
15461
15504
|
case 126:
|
|
@@ -15464,11 +15507,11 @@ function watchForEvents() {
|
|
|
15464
15507
|
type: 'close',
|
|
15465
15508
|
incrementVotesPerOptionCount: 0
|
|
15466
15509
|
};
|
|
15467
|
-
updateMessageOnMap(
|
|
15510
|
+
updateMessageOnMap(_channel13.id, {
|
|
15468
15511
|
messageId: _messageId4,
|
|
15469
15512
|
params: {}
|
|
15470
15513
|
}, _obj5);
|
|
15471
|
-
if (!(
|
|
15514
|
+
if (!(_channel13.id === _activeChannelId11)) {
|
|
15472
15515
|
_context.n = 128;
|
|
15473
15516
|
break;
|
|
15474
15517
|
}
|
|
@@ -15480,15 +15523,15 @@ function watchForEvents() {
|
|
|
15480
15523
|
case 128:
|
|
15481
15524
|
return _context.a(3, 183);
|
|
15482
15525
|
case 129:
|
|
15483
|
-
|
|
15484
|
-
log.info('channel REACTION_DELETED ... ',
|
|
15485
|
-
channelFromMap = getChannelFromMap(
|
|
15526
|
+
_channel14 = args.channel, _user = args.user, _message3 = args.message, _reaction = args.reaction;
|
|
15527
|
+
log.info('channel REACTION_DELETED ... ', _channel14);
|
|
15528
|
+
channelFromMap = getChannelFromMap(_channel14.id);
|
|
15486
15529
|
_isSelf = _user.id === SceytChatClient.user.id;
|
|
15487
15530
|
_context.n = 130;
|
|
15488
15531
|
return call(getActiveChannelId);
|
|
15489
15532
|
case 130:
|
|
15490
15533
|
_activeChannelId12 = _context.v;
|
|
15491
|
-
if (!(
|
|
15534
|
+
if (!(_channel14.id === _activeChannelId12)) {
|
|
15492
15535
|
_context.n = 132;
|
|
15493
15536
|
break;
|
|
15494
15537
|
}
|
|
@@ -15497,54 +15540,54 @@ function watchForEvents() {
|
|
|
15497
15540
|
case 131:
|
|
15498
15541
|
removeReactionOnAllMessages(_message3, _reaction, true);
|
|
15499
15542
|
case 132:
|
|
15500
|
-
_channelUpdateParams = JSON.parse(JSON.stringify(
|
|
15543
|
+
_channelUpdateParams = JSON.parse(JSON.stringify(_channel14));
|
|
15501
15544
|
if (channelFromMap && channelFromMap.lastReactedMessage && channelFromMap.lastReactedMessage.id === _message3.id) {
|
|
15502
15545
|
_channelUpdateParams.lastReactedMessage = null;
|
|
15503
15546
|
}
|
|
15504
15547
|
_context.n = 133;
|
|
15505
|
-
return put(updateChannelDataAC(
|
|
15548
|
+
return put(updateChannelDataAC(_channel14.id, _channelUpdateParams));
|
|
15506
15549
|
case 133:
|
|
15507
|
-
updateChannelOnAllChannels(
|
|
15508
|
-
if (checkChannelExistsOnMessagesMap(
|
|
15509
|
-
removeReactionToMessageOnMap(
|
|
15550
|
+
updateChannelOnAllChannels(_channel14.id, _channelUpdateParams);
|
|
15551
|
+
if (checkChannelExistsOnMessagesMap(_channel14.id)) {
|
|
15552
|
+
removeReactionToMessageOnMap(_channel14.id, _message3, _reaction, true);
|
|
15510
15553
|
}
|
|
15511
15554
|
return _context.a(3, 183);
|
|
15512
15555
|
case 134:
|
|
15513
|
-
|
|
15514
|
-
if (!
|
|
15556
|
+
_channel15 = args.channel;
|
|
15557
|
+
if (!_channel15) {
|
|
15515
15558
|
_context.n = 136;
|
|
15516
15559
|
break;
|
|
15517
15560
|
}
|
|
15518
|
-
_updatedChannel = JSON.parse(JSON.stringify(
|
|
15561
|
+
_updatedChannel = JSON.parse(JSON.stringify(_channel15));
|
|
15519
15562
|
_context.n = 135;
|
|
15520
|
-
return put(updateChannelDataAC(
|
|
15521
|
-
lastMessage:
|
|
15522
|
-
newMessageCount:
|
|
15523
|
-
newMentionCount:
|
|
15524
|
-
unread:
|
|
15525
|
-
newReactedMessageCount:
|
|
15526
|
-
newReactions:
|
|
15527
|
-
lastReactedMessage:
|
|
15528
|
-
lastReceivedMsgId:
|
|
15529
|
-
lastDisplayedMessageId:
|
|
15530
|
-
messageRetentionPeriod:
|
|
15563
|
+
return put(updateChannelDataAC(_channel15.id, {
|
|
15564
|
+
lastMessage: _channel15.lastMessage,
|
|
15565
|
+
newMessageCount: _channel15.newMessageCount,
|
|
15566
|
+
newMentionCount: _channel15.newMentionCount,
|
|
15567
|
+
unread: _channel15.unread,
|
|
15568
|
+
newReactedMessageCount: _channel15.newReactedMessageCount,
|
|
15569
|
+
newReactions: _channel15.newReactions,
|
|
15570
|
+
lastReactedMessage: _channel15.lastReactedMessage,
|
|
15571
|
+
lastReceivedMsgId: _channel15.lastReceivedMsgId,
|
|
15572
|
+
lastDisplayedMessageId: _channel15.lastDisplayedMessageId,
|
|
15573
|
+
messageRetentionPeriod: _channel15.messageRetentionPeriod
|
|
15531
15574
|
}));
|
|
15532
15575
|
case 135:
|
|
15533
|
-
updateChannelOnAllChannels(
|
|
15576
|
+
updateChannelOnAllChannels(_channel15.id, _updatedChannel);
|
|
15534
15577
|
case 136:
|
|
15535
15578
|
return _context.a(3, 183);
|
|
15536
15579
|
case 137:
|
|
15537
|
-
|
|
15538
|
-
log.info('CLEAR_HISTORY: ',
|
|
15580
|
+
_channel16 = args.channel;
|
|
15581
|
+
log.info('CLEAR_HISTORY: ', _channel16);
|
|
15539
15582
|
_context.n = 138;
|
|
15540
15583
|
return call(getActiveChannelId);
|
|
15541
15584
|
case 138:
|
|
15542
15585
|
_activeChannelId13 = _context.v;
|
|
15543
15586
|
_context.n = 139;
|
|
15544
|
-
return call(checkChannelExists,
|
|
15587
|
+
return call(checkChannelExists, _channel16.id);
|
|
15545
15588
|
case 139:
|
|
15546
15589
|
channelExist = _context.v;
|
|
15547
|
-
if (!(
|
|
15590
|
+
if (!(_channel16.id === _activeChannelId13)) {
|
|
15548
15591
|
_context.n = 141;
|
|
15549
15592
|
break;
|
|
15550
15593
|
}
|
|
@@ -15553,141 +15596,141 @@ function watchForEvents() {
|
|
|
15553
15596
|
case 140:
|
|
15554
15597
|
removeAllMessages();
|
|
15555
15598
|
case 141:
|
|
15556
|
-
removeMessagesFromMap(
|
|
15599
|
+
removeMessagesFromMap(_channel16.id);
|
|
15557
15600
|
if (!channelExist) {
|
|
15558
15601
|
_context.n = 142;
|
|
15559
15602
|
break;
|
|
15560
15603
|
}
|
|
15561
15604
|
_context.n = 142;
|
|
15562
|
-
return put(updateChannelDataAC(
|
|
15605
|
+
return put(updateChannelDataAC(_channel16.id, {
|
|
15563
15606
|
lastMessage: null,
|
|
15564
15607
|
newMessageCount: 0,
|
|
15565
15608
|
newMentionCount: 0,
|
|
15566
|
-
muted:
|
|
15567
|
-
mutedTill:
|
|
15609
|
+
muted: _channel16.muted,
|
|
15610
|
+
mutedTill: _channel16.mutedTill
|
|
15568
15611
|
}));
|
|
15569
15612
|
case 142:
|
|
15570
|
-
updateChannelOnAllChannels(
|
|
15613
|
+
updateChannelOnAllChannels(_channel16.id, {
|
|
15571
15614
|
lastMessage: null,
|
|
15572
15615
|
newMessageCount: 0,
|
|
15573
15616
|
newMentionCount: 0,
|
|
15574
|
-
muted:
|
|
15575
|
-
mutedTill:
|
|
15617
|
+
muted: _channel16.muted,
|
|
15618
|
+
mutedTill: _channel16.mutedTill
|
|
15576
15619
|
});
|
|
15577
15620
|
return _context.a(3, 183);
|
|
15578
15621
|
case 143:
|
|
15579
|
-
|
|
15622
|
+
_channel17 = args.channel;
|
|
15580
15623
|
log.info('channel MUTE ... ');
|
|
15581
15624
|
_context.n = 144;
|
|
15582
|
-
return put(updateChannelDataAC(
|
|
15583
|
-
muted:
|
|
15584
|
-
mutedTill:
|
|
15625
|
+
return put(updateChannelDataAC(_channel17.id, {
|
|
15626
|
+
muted: _channel17.muted,
|
|
15627
|
+
mutedTill: _channel17.mutedTill
|
|
15585
15628
|
}));
|
|
15586
15629
|
case 144:
|
|
15587
|
-
updateChannelOnAllChannels(
|
|
15588
|
-
muted:
|
|
15589
|
-
mutedTill:
|
|
15630
|
+
updateChannelOnAllChannels(_channel17.id, {
|
|
15631
|
+
muted: _channel17.muted,
|
|
15632
|
+
mutedTill: _channel17.mutedTill
|
|
15590
15633
|
});
|
|
15591
15634
|
return _context.a(3, 183);
|
|
15592
15635
|
case 145:
|
|
15593
|
-
|
|
15636
|
+
_channel18 = args.channel;
|
|
15594
15637
|
log.info('channel UNMUTE ... ');
|
|
15595
15638
|
_context.n = 146;
|
|
15596
|
-
return put(updateChannelDataAC(
|
|
15597
|
-
muted:
|
|
15598
|
-
mutedTill:
|
|
15639
|
+
return put(updateChannelDataAC(_channel18.id, {
|
|
15640
|
+
muted: _channel18.muted,
|
|
15641
|
+
mutedTill: _channel18.mutedTill
|
|
15599
15642
|
}));
|
|
15600
15643
|
case 146:
|
|
15601
|
-
updateChannelOnAllChannels(
|
|
15602
|
-
muted:
|
|
15603
|
-
mutedTill:
|
|
15644
|
+
updateChannelOnAllChannels(_channel18.id, {
|
|
15645
|
+
muted: _channel18.muted,
|
|
15646
|
+
mutedTill: _channel18.mutedTill
|
|
15604
15647
|
});
|
|
15605
15648
|
return _context.a(3, 183);
|
|
15606
15649
|
case 147:
|
|
15607
|
-
|
|
15650
|
+
_channel19 = args.channel;
|
|
15608
15651
|
log.info('channel PINED ... ');
|
|
15609
15652
|
_context.n = 148;
|
|
15610
|
-
return put(updateChannelDataAC(
|
|
15611
|
-
pinnedAt:
|
|
15653
|
+
return put(updateChannelDataAC(_channel19.id, {
|
|
15654
|
+
pinnedAt: _channel19.pinnedAt
|
|
15612
15655
|
}, true));
|
|
15613
15656
|
case 148:
|
|
15614
|
-
updateChannelOnAllChannels(
|
|
15615
|
-
pinnedAt:
|
|
15657
|
+
updateChannelOnAllChannels(_channel19.id, {
|
|
15658
|
+
pinnedAt: _channel19.pinnedAt
|
|
15616
15659
|
});
|
|
15617
15660
|
return _context.a(3, 183);
|
|
15618
15661
|
case 149:
|
|
15619
|
-
|
|
15662
|
+
_channel20 = args.channel;
|
|
15620
15663
|
log.info('channel UNPINED ... ');
|
|
15621
15664
|
_context.n = 150;
|
|
15622
|
-
return put(updateChannelDataAC(
|
|
15623
|
-
pinnedAt:
|
|
15665
|
+
return put(updateChannelDataAC(_channel20.id, {
|
|
15666
|
+
pinnedAt: _channel20.pinnedAt
|
|
15624
15667
|
}, false, true));
|
|
15625
15668
|
case 150:
|
|
15626
|
-
updateChannelOnAllChannels(
|
|
15627
|
-
pinnedAt:
|
|
15669
|
+
updateChannelOnAllChannels(_channel20.id, {
|
|
15670
|
+
pinnedAt: _channel20.pinnedAt
|
|
15628
15671
|
});
|
|
15629
15672
|
return _context.a(3, 183);
|
|
15630
15673
|
case 151:
|
|
15631
|
-
|
|
15674
|
+
_channel21 = args.channel;
|
|
15632
15675
|
log.info('channel HIDE ... ');
|
|
15633
15676
|
_context.n = 152;
|
|
15634
|
-
return put(setChannelToHideAC(
|
|
15677
|
+
return put(setChannelToHideAC(_channel21));
|
|
15635
15678
|
case 152:
|
|
15636
15679
|
return _context.a(3, 183);
|
|
15637
15680
|
case 153:
|
|
15638
|
-
|
|
15681
|
+
_channel22 = args.channel;
|
|
15639
15682
|
log.info('channel UNHIDE ... ');
|
|
15640
15683
|
_context.n = 154;
|
|
15641
|
-
return put(setChannelToUnHideAC(
|
|
15684
|
+
return put(setChannelToUnHideAC(_channel22));
|
|
15642
15685
|
case 154:
|
|
15643
15686
|
return _context.a(3, 183);
|
|
15644
15687
|
case 155:
|
|
15645
|
-
|
|
15688
|
+
_channel23 = args.channel;
|
|
15646
15689
|
_context.n = 156;
|
|
15647
|
-
return put(updateChannelDataAC(
|
|
15648
|
-
unread:
|
|
15649
|
-
muted:
|
|
15650
|
-
mutedTill:
|
|
15690
|
+
return put(updateChannelDataAC(_channel23.id, {
|
|
15691
|
+
unread: _channel23.unread,
|
|
15692
|
+
muted: _channel23.muted,
|
|
15693
|
+
mutedTill: _channel23.mutedTill
|
|
15651
15694
|
}));
|
|
15652
15695
|
case 156:
|
|
15653
|
-
_groupName5 = getChannelGroupName(
|
|
15696
|
+
_groupName5 = getChannelGroupName(_channel23);
|
|
15654
15697
|
_context.n = 157;
|
|
15655
|
-
return put(updateSearchedChannelDataAC(
|
|
15656
|
-
unread:
|
|
15698
|
+
return put(updateSearchedChannelDataAC(_channel23.id, {
|
|
15699
|
+
unread: _channel23.unread
|
|
15657
15700
|
}, _groupName5));
|
|
15658
15701
|
case 157:
|
|
15659
|
-
updateChannelOnAllChannels(
|
|
15660
|
-
unread:
|
|
15702
|
+
updateChannelOnAllChannels(_channel23.id, {
|
|
15703
|
+
unread: _channel23.unread
|
|
15661
15704
|
});
|
|
15662
15705
|
return _context.a(3, 183);
|
|
15663
15706
|
case 158:
|
|
15664
|
-
|
|
15707
|
+
_channel24 = args.channel;
|
|
15665
15708
|
_context.n = 159;
|
|
15666
|
-
return put(updateChannelDataAC(
|
|
15667
|
-
unread:
|
|
15668
|
-
muted:
|
|
15669
|
-
mutedTill:
|
|
15709
|
+
return put(updateChannelDataAC(_channel24.id, {
|
|
15710
|
+
unread: _channel24.unread,
|
|
15711
|
+
muted: _channel24.muted,
|
|
15712
|
+
mutedTill: _channel24.mutedTill
|
|
15670
15713
|
}));
|
|
15671
15714
|
case 159:
|
|
15672
|
-
_groupName6 = getChannelGroupName(
|
|
15715
|
+
_groupName6 = getChannelGroupName(_channel24);
|
|
15673
15716
|
_context.n = 160;
|
|
15674
|
-
return put(updateSearchedChannelDataAC(
|
|
15675
|
-
unread:
|
|
15717
|
+
return put(updateSearchedChannelDataAC(_channel24.id, {
|
|
15718
|
+
unread: _channel24.unread
|
|
15676
15719
|
}, _groupName6));
|
|
15677
15720
|
case 160:
|
|
15678
|
-
updateChannelOnAllChannels(
|
|
15679
|
-
unread:
|
|
15721
|
+
updateChannelOnAllChannels(_channel24.id, {
|
|
15722
|
+
unread: _channel24.unread
|
|
15680
15723
|
});
|
|
15681
15724
|
return _context.a(3, 183);
|
|
15682
15725
|
case 161:
|
|
15683
|
-
|
|
15684
|
-
log.info('channel CHANGE_ROLE channel ... ',
|
|
15726
|
+
_channel25 = args.channel, members = args.members;
|
|
15727
|
+
log.info('channel CHANGE_ROLE channel ... ', _channel25);
|
|
15685
15728
|
log.info('channel CHANGE_ROLE member ... ', members);
|
|
15686
15729
|
_context.n = 162;
|
|
15687
15730
|
return call(getActiveChannelId);
|
|
15688
15731
|
case 162:
|
|
15689
15732
|
_activeChannelId14 = _context.v;
|
|
15690
|
-
if (!(
|
|
15733
|
+
if (!(_channel25.id === _activeChannelId14)) {
|
|
15691
15734
|
_context.n = 163;
|
|
15692
15735
|
break;
|
|
15693
15736
|
}
|
|
@@ -15705,16 +15748,16 @@ function watchForEvents() {
|
|
|
15705
15748
|
break;
|
|
15706
15749
|
}
|
|
15707
15750
|
_context.n = 165;
|
|
15708
|
-
return put(updateChannelDataAC(
|
|
15751
|
+
return put(updateChannelDataAC(_channel25.id, {
|
|
15709
15752
|
userRole: members[i].role,
|
|
15710
|
-
muted:
|
|
15711
|
-
mutedTill:
|
|
15753
|
+
muted: _channel25.muted,
|
|
15754
|
+
mutedTill: _channel25.mutedTill
|
|
15712
15755
|
}));
|
|
15713
15756
|
case 165:
|
|
15714
|
-
updateChannelOnAllChannels(
|
|
15757
|
+
updateChannelOnAllChannels(_channel25.id, {
|
|
15715
15758
|
userRole: members[i].role,
|
|
15716
|
-
muted:
|
|
15717
|
-
mutedTill:
|
|
15759
|
+
muted: _channel25.muted,
|
|
15760
|
+
mutedTill: _channel25.mutedTill
|
|
15718
15761
|
});
|
|
15719
15762
|
case 166:
|
|
15720
15763
|
i++;
|
|
@@ -15723,12 +15766,12 @@ function watchForEvents() {
|
|
|
15723
15766
|
case 167:
|
|
15724
15767
|
return _context.a(3, 183);
|
|
15725
15768
|
case 168:
|
|
15726
|
-
|
|
15727
|
-
log.info('channel frozen channel ... ',
|
|
15769
|
+
_channel26 = args.channel;
|
|
15770
|
+
log.info('channel frozen channel ... ', _channel26);
|
|
15728
15771
|
return _context.a(3, 183);
|
|
15729
15772
|
case 169:
|
|
15730
|
-
|
|
15731
|
-
log.info('channel unfrozen channel ... ',
|
|
15773
|
+
_channel27 = args.channel;
|
|
15774
|
+
log.info('channel unfrozen channel ... ', _channel27);
|
|
15732
15775
|
return _context.a(3, 183);
|
|
15733
15776
|
case 170:
|
|
15734
15777
|
_channelId2 = args.channelId, from = args.from, name = args.name;
|
|
@@ -17468,7 +17511,7 @@ function blockChannel(action) {
|
|
|
17468
17511
|
}, _marked20, null, [[0, 5]]);
|
|
17469
17512
|
}
|
|
17470
17513
|
function updateChannel(action) {
|
|
17471
|
-
var payload, channelId, config, _SceytChatClient6, channel, paramsToUpdate, fileToUpload, _yield$call5, subject, avatarUrl, metadata, _t22;
|
|
17514
|
+
var payload, channelId, config, _SceytChatClient6, channel, paramsToUpdate, fileToUpload, _yield$call5, subject, avatarUrl, metadata, onUpdateChannel, _channel3, _channel4, _channel5, fields, updatedChannel, _t22;
|
|
17472
17515
|
return _regenerator().w(function (_context21) {
|
|
17473
17516
|
while (1) switch (_context21.p = _context21.n) {
|
|
17474
17517
|
case 0:
|
|
@@ -17532,16 +17575,37 @@ function updateChannel(action) {
|
|
|
17532
17575
|
avatarUrl: avatarUrl,
|
|
17533
17576
|
metadata: isJSON(metadata) ? JSON.parse(metadata) : metadata
|
|
17534
17577
|
});
|
|
17535
|
-
|
|
17536
|
-
|
|
17578
|
+
onUpdateChannel = getOnUpdateChannel();
|
|
17579
|
+
if (!onUpdateChannel) {
|
|
17580
|
+
_context21.n = 7;
|
|
17581
|
+
break;
|
|
17582
|
+
}
|
|
17583
|
+
fields = [];
|
|
17584
|
+
if (((_channel3 = channel) === null || _channel3 === void 0 ? void 0 : _channel3.subject) !== subject) {
|
|
17585
|
+
fields.push('subject');
|
|
17586
|
+
}
|
|
17587
|
+
if (((_channel4 = channel) === null || _channel4 === void 0 ? void 0 : _channel4.avatarUrl) !== avatarUrl) {
|
|
17588
|
+
fields.push('avatarUrl');
|
|
17589
|
+
}
|
|
17590
|
+
if (JSON.stringify((_channel5 = channel) === null || _channel5 === void 0 ? void 0 : _channel5.metadata) !== metadata) {
|
|
17591
|
+
fields.push('metadata');
|
|
17592
|
+
}
|
|
17593
|
+
_context21.n = 6;
|
|
17594
|
+
return call(getChannelFromMap, channelId);
|
|
17537
17595
|
case 6:
|
|
17538
|
-
|
|
17596
|
+
updatedChannel = _context21.v;
|
|
17597
|
+
onUpdateChannel(updatedChannel, fields);
|
|
17598
|
+
case 7:
|
|
17599
|
+
_context21.n = 9;
|
|
17600
|
+
break;
|
|
17601
|
+
case 8:
|
|
17602
|
+
_context21.p = 8;
|
|
17539
17603
|
_t22 = _context21.v;
|
|
17540
17604
|
log.error('ERROR in update channel', _t22.message);
|
|
17541
|
-
case
|
|
17605
|
+
case 9:
|
|
17542
17606
|
return _context21.a(2);
|
|
17543
17607
|
}
|
|
17544
|
-
}, _marked21, null, [[0,
|
|
17608
|
+
}, _marked21, null, [[0, 8]]);
|
|
17545
17609
|
}
|
|
17546
17610
|
function checkUsersStatus() {
|
|
17547
17611
|
var _SceytChatClient7, usersForUpdate, updatedUsers, usersToUpdateMap, update, updateData, _t23;
|
|
@@ -19759,7 +19823,7 @@ function editMessage(action) {
|
|
|
19759
19823
|
}, _marked6$1, null, [[0, 5]]);
|
|
19760
19824
|
}
|
|
19761
19825
|
function getMessagesQuery(action) {
|
|
19762
|
-
var _action$payload, channel, loadWithLastMessage, messageId, limit, withDeliveredMessages, highlight, behavior, connectionState, SceytChatClient, messageQueryBuilder, messageQuery, cachedMessages, result, allMessages, havLastMessage, secondResult, sentMessages, messagesMap, filteredSentMessages, _allMessages, messageIndex, maxLengthPart, _secondResult, thirdResult, _secondResult2, _thirdResult, _secondResult3, _updatedMessages, _Object$values, previousAllMessages, _secondResult4, updatedMessages, lastMessageId, _allMessages2, setMappedAllMessages, allMessagesAfterLastMessage, pendingMessages, _messagesMap, filteredPendingMessages, pendingMessagesMap, channelId, _iterator, _step, _msg$attachments, msg, attachments, pendingPollActionsMap, _t7, _t8, _t9, _t0, _t1, _t10, _t11, _t12, _t13, _t14, _t15, _t16, _t17, _t18, _t19, _t20;
|
|
19826
|
+
var _action$payload, channel, loadWithLastMessage, messageId, limit, withDeliveredMessages, highlight, behavior, connectionState, SceytChatClient, messageQueryBuilder, messageQuery, cachedMessages, result, allMessages, havLastMessage, secondResult, sentMessages, messagesMap, filteredSentMessages, _allMessages, messageIndex, maxLengthPart, _secondResult, thirdResult, _secondResult2, _thirdResult, _secondResult3, _updatedMessages, _Object$values, previousAllMessages, _secondResult4, updatedMessages, lastMessageId, _allMessages2, setMappedAllMessages, allMessagesAfterLastMessage, pendingMessages, _messagesMap, filteredPendingMessages, waitToSendPendingMessages, pendingMessagesMap, channelId, _iterator, _step, _msg$attachments, msg, attachments, pendingPollActionsMap, _t7, _t8, _t9, _t0, _t1, _t10, _t11, _t12, _t13, _t14, _t15, _t16, _t17, _t18, _t19, _t20;
|
|
19763
19827
|
return _regenerator().w(function (_context9) {
|
|
19764
19828
|
while (1) switch (_context9.p = _context9.n) {
|
|
19765
19829
|
case 0:
|
|
@@ -19770,7 +19834,7 @@ function getMessagesQuery(action) {
|
|
|
19770
19834
|
_action$payload = action.payload, channel = _action$payload.channel, loadWithLastMessage = _action$payload.loadWithLastMessage, messageId = _action$payload.messageId, limit = _action$payload.limit, withDeliveredMessages = _action$payload.withDeliveredMessages, highlight = _action$payload.highlight, behavior = _action$payload.behavior;
|
|
19771
19835
|
connectionState = store.getState().UserReducer.connectionStatus;
|
|
19772
19836
|
if (!(channel.id && !channel.isMockChannel)) {
|
|
19773
|
-
_context9.n =
|
|
19837
|
+
_context9.n = 84;
|
|
19774
19838
|
break;
|
|
19775
19839
|
}
|
|
19776
19840
|
SceytChatClient = getClient();
|
|
@@ -20253,22 +20317,26 @@ function getMessagesQuery(action) {
|
|
|
20253
20317
|
_context9.n = 73;
|
|
20254
20318
|
return put(addMessagesAC(filteredPendingMessages, MESSAGE_LOAD_DIRECTION.NEXT));
|
|
20255
20319
|
case 73:
|
|
20256
|
-
|
|
20257
|
-
|
|
20320
|
+
waitToSendPendingMessages = store.getState().UserReducer.waitToSendPendingMessages;
|
|
20321
|
+
if (!(connectionState === CONNECTION_STATUS.CONNECTED && waitToSendPendingMessages)) {
|
|
20322
|
+
_context9.n = 82;
|
|
20258
20323
|
break;
|
|
20259
20324
|
}
|
|
20325
|
+
_context9.n = 74;
|
|
20326
|
+
return put(setWaitToSendPendingMessagesAC(false));
|
|
20327
|
+
case 74:
|
|
20260
20328
|
pendingMessagesMap = getPendingMessagesMap();
|
|
20261
20329
|
_t18 = _regeneratorKeys(pendingMessagesMap);
|
|
20262
|
-
case
|
|
20330
|
+
case 75:
|
|
20263
20331
|
if ((_t19 = _t18()).done) {
|
|
20264
|
-
_context9.n =
|
|
20332
|
+
_context9.n = 81;
|
|
20265
20333
|
break;
|
|
20266
20334
|
}
|
|
20267
20335
|
channelId = _t19.value;
|
|
20268
20336
|
_iterator = _createForOfIteratorHelperLoose(pendingMessagesMap[channelId]);
|
|
20269
|
-
case
|
|
20337
|
+
case 76:
|
|
20270
20338
|
if ((_step = _iterator()).done) {
|
|
20271
|
-
_context9.n =
|
|
20339
|
+
_context9.n = 80;
|
|
20272
20340
|
break;
|
|
20273
20341
|
}
|
|
20274
20342
|
msg = _step.value;
|
|
@@ -20276,10 +20344,10 @@ function getMessagesQuery(action) {
|
|
|
20276
20344
|
return att.type !== attachmentTypes.link;
|
|
20277
20345
|
});
|
|
20278
20346
|
if (!(attachments && attachments.length > 0)) {
|
|
20279
|
-
_context9.n =
|
|
20347
|
+
_context9.n = 78;
|
|
20280
20348
|
break;
|
|
20281
20349
|
}
|
|
20282
|
-
_context9.n =
|
|
20350
|
+
_context9.n = 77;
|
|
20283
20351
|
return call(sendMessage, {
|
|
20284
20352
|
type: RESEND_MESSAGE,
|
|
20285
20353
|
payload: {
|
|
@@ -20288,11 +20356,11 @@ function getMessagesQuery(action) {
|
|
|
20288
20356
|
channelId: channelId
|
|
20289
20357
|
}
|
|
20290
20358
|
});
|
|
20291
|
-
case 76:
|
|
20292
|
-
_context9.n = 78;
|
|
20293
|
-
break;
|
|
20294
20359
|
case 77:
|
|
20295
|
-
_context9.n =
|
|
20360
|
+
_context9.n = 79;
|
|
20361
|
+
break;
|
|
20362
|
+
case 78:
|
|
20363
|
+
_context9.n = 79;
|
|
20296
20364
|
return call(sendTextMessage, {
|
|
20297
20365
|
type: RESEND_MESSAGE,
|
|
20298
20366
|
payload: {
|
|
@@ -20301,47 +20369,50 @@ function getMessagesQuery(action) {
|
|
|
20301
20369
|
channelId: channelId
|
|
20302
20370
|
}
|
|
20303
20371
|
});
|
|
20304
|
-
case 78:
|
|
20305
|
-
_context9.n = 75;
|
|
20306
|
-
break;
|
|
20307
20372
|
case 79:
|
|
20308
|
-
_context9.n =
|
|
20373
|
+
_context9.n = 76;
|
|
20309
20374
|
break;
|
|
20310
20375
|
case 80:
|
|
20376
|
+
_context9.n = 75;
|
|
20377
|
+
break;
|
|
20378
|
+
case 81:
|
|
20311
20379
|
pendingPollActionsMap = store.getState().MessageReducer.pendingPollActions;
|
|
20312
20380
|
if (!(pendingPollActionsMap && Object.keys(pendingPollActionsMap).length > 0)) {
|
|
20313
|
-
_context9.n =
|
|
20381
|
+
_context9.n = 82;
|
|
20314
20382
|
break;
|
|
20315
20383
|
}
|
|
20316
|
-
_context9.n =
|
|
20384
|
+
_context9.n = 82;
|
|
20317
20385
|
return put(resendPendingPollActionsAC(connectionState));
|
|
20318
|
-
case
|
|
20386
|
+
case 82:
|
|
20319
20387
|
_context9.n = 83;
|
|
20388
|
+
return put(setWaitToSendPendingMessagesAC(false));
|
|
20389
|
+
case 83:
|
|
20390
|
+
_context9.n = 85;
|
|
20320
20391
|
break;
|
|
20321
|
-
case
|
|
20392
|
+
case 84:
|
|
20322
20393
|
if (!channel.isMockChannel) {
|
|
20323
|
-
_context9.n =
|
|
20394
|
+
_context9.n = 85;
|
|
20324
20395
|
break;
|
|
20325
20396
|
}
|
|
20326
|
-
_context9.n = 83;
|
|
20327
|
-
return put(setMessagesAC([]));
|
|
20328
|
-
case 83:
|
|
20329
20397
|
_context9.n = 85;
|
|
20398
|
+
return put(setMessagesAC([]));
|
|
20399
|
+
case 85:
|
|
20400
|
+
_context9.n = 87;
|
|
20330
20401
|
break;
|
|
20331
|
-
case
|
|
20332
|
-
_context9.p =
|
|
20402
|
+
case 86:
|
|
20403
|
+
_context9.p = 86;
|
|
20333
20404
|
_t20 = _context9.v;
|
|
20334
20405
|
log.error('error in message query', _t20);
|
|
20335
|
-
case 85:
|
|
20336
|
-
_context9.p = 85;
|
|
20337
|
-
_context9.n = 86;
|
|
20338
|
-
return put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
20339
|
-
case 86:
|
|
20340
|
-
return _context9.f(85);
|
|
20341
20406
|
case 87:
|
|
20407
|
+
_context9.p = 87;
|
|
20408
|
+
_context9.n = 88;
|
|
20409
|
+
return put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
20410
|
+
case 88:
|
|
20411
|
+
return _context9.f(87);
|
|
20412
|
+
case 89:
|
|
20342
20413
|
return _context9.a(2);
|
|
20343
20414
|
}
|
|
20344
|
-
}, _marked7$1, null, [[0,
|
|
20415
|
+
}, _marked7$1, null, [[0, 86, 87, 89]]);
|
|
20345
20416
|
}
|
|
20346
20417
|
function getMessageQuery(action) {
|
|
20347
20418
|
var payload, channelId, messageId, channel, connectionState, messages, fetchedMessage, _t21;
|
|
@@ -23368,7 +23439,8 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
23368
23439
|
disableFrowardMentionsCount = _ref$disableFrowardMe === void 0 ? false : _ref$disableFrowardMe,
|
|
23369
23440
|
chatMinWidth = _ref.chatMinWidth,
|
|
23370
23441
|
_ref$embeddedJoinGrou = _ref.embeddedJoinGroupPopup,
|
|
23371
|
-
embeddedJoinGroupPopup = _ref$embeddedJoinGrou === void 0 ? false : _ref$embeddedJoinGrou
|
|
23442
|
+
embeddedJoinGroupPopup = _ref$embeddedJoinGrou === void 0 ? false : _ref$embeddedJoinGrou,
|
|
23443
|
+
onUpdateChannel = _ref.onUpdateChannel;
|
|
23372
23444
|
var useInviteLink = getUseInviteLink();
|
|
23373
23445
|
var _useColor = useColors(),
|
|
23374
23446
|
backgroundColor = _useColor[THEME_COLORS.BACKGROUND],
|
|
@@ -23437,7 +23509,6 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
23437
23509
|
setSceytChatClient(client);
|
|
23438
23510
|
dispatch(setUserAC(client.user));
|
|
23439
23511
|
dispatch(watchForEventsAC());
|
|
23440
|
-
dispatch(setConnectionStatusAC(client.connectionState));
|
|
23441
23512
|
} else {
|
|
23442
23513
|
clearMessagesMap();
|
|
23443
23514
|
removeAllMessages();
|
|
@@ -23452,6 +23523,9 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
23452
23523
|
setTabIsActive(true);
|
|
23453
23524
|
};
|
|
23454
23525
|
}, [client]);
|
|
23526
|
+
useEffect(function () {
|
|
23527
|
+
dispatch(setConnectionStatusAC(client.connectionState));
|
|
23528
|
+
}, [client === null || client === void 0 ? void 0 : client.connectionState]);
|
|
23455
23529
|
useEffect(function () {
|
|
23456
23530
|
if (connectionStatus === CONNECTION_STATUS.CONNECTED) {
|
|
23457
23531
|
if (showOnlyContactUsers) {
|
|
@@ -23611,6 +23685,11 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
23611
23685
|
onJoin: handleJoinChannel,
|
|
23612
23686
|
channel: joinableChannel
|
|
23613
23687
|
})) : null;
|
|
23688
|
+
useEffect(function () {
|
|
23689
|
+
if (onUpdateChannel) {
|
|
23690
|
+
setOnUpdateChannel(onUpdateChannel);
|
|
23691
|
+
}
|
|
23692
|
+
}, [onUpdateChannel]);
|
|
23614
23693
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, SceytChatClient ? (/*#__PURE__*/React__default.createElement(ChatContainer, {
|
|
23615
23694
|
onDrop: handleDropFile,
|
|
23616
23695
|
onDragOver: handleDragOver,
|
|
@@ -23673,7 +23752,8 @@ var SceytChatContainer = function SceytChatContainer(_ref) {
|
|
|
23673
23752
|
ResetLinkConfirmModal: {}
|
|
23674
23753
|
} : _ref$inviteLinkOption,
|
|
23675
23754
|
_ref$embeddedJoinGrou = _ref.embeddedJoinGroupPopup,
|
|
23676
|
-
embeddedJoinGroupPopup = _ref$embeddedJoinGrou === void 0 ? false : _ref$embeddedJoinGrou
|
|
23755
|
+
embeddedJoinGroupPopup = _ref$embeddedJoinGrou === void 0 ? false : _ref$embeddedJoinGrou,
|
|
23756
|
+
onUpdateChannel = _ref.onUpdateChannel;
|
|
23677
23757
|
useEffect(function () {
|
|
23678
23758
|
log.setLevel(logLevel);
|
|
23679
23759
|
if (baseUrlForInviteMembers) {
|
|
@@ -23710,7 +23790,8 @@ var SceytChatContainer = function SceytChatContainer(_ref) {
|
|
|
23710
23790
|
memberCount: memberCount,
|
|
23711
23791
|
disableFrowardMentionsCount: disableFrowardMentionsCount,
|
|
23712
23792
|
chatMinWidth: chatMinWidth,
|
|
23713
|
-
embeddedJoinGroupPopup: embeddedJoinGroupPopup
|
|
23793
|
+
embeddedJoinGroupPopup: embeddedJoinGroupPopup,
|
|
23794
|
+
onUpdateChannel: onUpdateChannel
|
|
23714
23795
|
}));
|
|
23715
23796
|
};
|
|
23716
23797
|
|
|
@@ -32608,7 +32689,7 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
32608
32689
|
wavesurfer.current.seekTo(0);
|
|
32609
32690
|
var audioDuration = wavesurfer.current.getDuration();
|
|
32610
32691
|
setDuration(audioDuration);
|
|
32611
|
-
setCurrentTime(formatAudioVideoTime(
|
|
32692
|
+
setCurrentTime(formatAudioVideoTime(audioDuration));
|
|
32612
32693
|
setCurrentTimeSeconds(0);
|
|
32613
32694
|
if (playingAudioId === file.id) {
|
|
32614
32695
|
dispatch(setPlayingAudioIdAC(null));
|
|
@@ -39426,7 +39507,7 @@ function MentionsPlugin(_ref3) {
|
|
|
39426
39507
|
});
|
|
39427
39508
|
}
|
|
39428
39509
|
var MentionsContainerWrapper = styled.div(_templateObject$L || (_templateObject$L = _taggedTemplateLiteralLoose(["\n position: relative;\n animation: fadeIn 0.2s ease-in-out;\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n"])));
|
|
39429
|
-
var MentionsList = styled.ul(_templateObject2$G || (_templateObject2$G = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom:
|
|
39510
|
+
var MentionsList = styled.ul(_templateObject2$G || (_templateObject2$G = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: 5px;\n width: 300px;\n transition: all 0.2s;\n overflow: auto;\n max-height: 240px;\n z-index: 200;\n padding: 2px 0 0;\n background: ", ";\n border: ", ";\n box-sizing: border-box;\n box-shadow: ", ";\n border-radius: 6px;\n visibility: ", ";\n"])), function (props) {
|
|
39430
39511
|
return props.backgroundColor;
|
|
39431
39512
|
}, function (props) {
|
|
39432
39513
|
return props.withBorder && "1px solid " + props.borderColor;
|