sceyt-chat-react-uikit 1.7.7-beta.6 → 1.7.7-beta.8
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 +348 -239
- package/index.modern.js +348 -239
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -9034,6 +9034,7 @@ var showChannelDetails = false;
|
|
|
9034
9034
|
var channelTypesFilter = [];
|
|
9035
9035
|
var memberCount = 10;
|
|
9036
9036
|
var disableFrowardMentionsCount = false;
|
|
9037
|
+
var onUpdateChannel = function onUpdateChannel() {};
|
|
9037
9038
|
var useInviteLink = false;
|
|
9038
9039
|
var inviteLinkOptions = null;
|
|
9039
9040
|
function setBaseUrlForInviteMembers(url) {
|
|
@@ -9148,6 +9149,12 @@ function setDisableFrowardMentionsCount(disable) {
|
|
|
9148
9149
|
function getDisableFrowardMentionsCount() {
|
|
9149
9150
|
return disableFrowardMentionsCount;
|
|
9150
9151
|
}
|
|
9152
|
+
function setOnUpdateChannel(callback) {
|
|
9153
|
+
onUpdateChannel = callback;
|
|
9154
|
+
}
|
|
9155
|
+
function getOnUpdateChannel() {
|
|
9156
|
+
return onUpdateChannel;
|
|
9157
|
+
}
|
|
9151
9158
|
var handleNewMessages;
|
|
9152
9159
|
function setHandleNewMessages(callback) {
|
|
9153
9160
|
handleNewMessages = callback;
|
|
@@ -14521,7 +14528,7 @@ function watchForEvents() {
|
|
|
14521
14528
|
};
|
|
14522
14529
|
});
|
|
14523
14530
|
_loop = /*#__PURE__*/_regenerator().m(function _callee() {
|
|
14524
|
-
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,
|
|
14531
|
+
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;
|
|
14525
14532
|
return _regenerator().w(function (_context) {
|
|
14526
14533
|
while (1) switch (_context.p = _context.n) {
|
|
14527
14534
|
case 0:
|
|
@@ -14788,10 +14795,33 @@ function watchForEvents() {
|
|
|
14788
14795
|
});
|
|
14789
14796
|
return _context.a(3, 183);
|
|
14790
14797
|
case 46:
|
|
14798
|
+
onUpdateChannel = getOnUpdateChannel();
|
|
14791
14799
|
log.info('channel UPDATE_CHANNEL ... ');
|
|
14792
14800
|
updatedChannel = args.updatedChannel;
|
|
14793
14801
|
_channelExists5 = checkChannelExists(updatedChannel.id);
|
|
14794
14802
|
subject = updatedChannel.subject, avatarUrl = updatedChannel.avatarUrl, muted = updatedChannel.muted, mutedTill = updatedChannel.mutedTill, metadata = updatedChannel.metadata;
|
|
14803
|
+
_channel5 = getChannelFromMap(updatedChannel.id);
|
|
14804
|
+
fields = [];
|
|
14805
|
+
if (_channel5) {
|
|
14806
|
+
if (_channel5.subject !== subject) {
|
|
14807
|
+
fields.push('subject');
|
|
14808
|
+
}
|
|
14809
|
+
if (_channel5.avatarUrl !== avatarUrl) {
|
|
14810
|
+
fields.push('avatarUrl');
|
|
14811
|
+
}
|
|
14812
|
+
if (_channel5.muted !== muted) {
|
|
14813
|
+
fields.push('muted');
|
|
14814
|
+
}
|
|
14815
|
+
if (_channel5.mutedTill !== mutedTill) {
|
|
14816
|
+
fields.push('mutedTill');
|
|
14817
|
+
}
|
|
14818
|
+
if (_channel5.metadata !== isJSON(metadata) ? JSON.parse(metadata) : metadata) {
|
|
14819
|
+
fields.push('metadata');
|
|
14820
|
+
}
|
|
14821
|
+
}
|
|
14822
|
+
if (onUpdateChannel) {
|
|
14823
|
+
onUpdateChannel(updatedChannel, fields);
|
|
14824
|
+
}
|
|
14795
14825
|
if (!_channelExists5) {
|
|
14796
14826
|
_context.n = 49;
|
|
14797
14827
|
break;
|
|
@@ -14835,18 +14865,18 @@ function watchForEvents() {
|
|
|
14835
14865
|
});
|
|
14836
14866
|
return _context.a(3, 183);
|
|
14837
14867
|
case 51:
|
|
14838
|
-
|
|
14839
|
-
log.info('channel MESSAGE ... id : ', message.id, ', channel.id: ',
|
|
14840
|
-
messageToHandle = handleNewMessages ? handleNewMessages(message,
|
|
14868
|
+
_channel6 = args.channel, message = args.message;
|
|
14869
|
+
log.info('channel MESSAGE ... id : ', message.id, ', channel.id: ', _channel6.id);
|
|
14870
|
+
messageToHandle = handleNewMessages ? handleNewMessages(message, _channel6) : message;
|
|
14841
14871
|
_channelFilterTypes = getChannelTypesFilter();
|
|
14842
|
-
if (!(messageToHandle &&
|
|
14872
|
+
if (!(messageToHandle && _channel6 && (_channelFilterTypes !== null && _channelFilterTypes !== void 0 && _channelFilterTypes.length ? _channelFilterTypes.includes(_channel6.type) : true))) {
|
|
14843
14873
|
_context.n = 65;
|
|
14844
14874
|
break;
|
|
14845
14875
|
}
|
|
14846
|
-
|
|
14876
|
+
_channel6.metadata = isJSON(_channel6.metadata) ? JSON.parse(_channel6.metadata) : _channel6.metadata;
|
|
14847
14877
|
_activeChannelId5 = getActiveChannelId();
|
|
14848
|
-
_channelExists6 = checkChannelExists(
|
|
14849
|
-
channelForAdd = JSON.parse(JSON.stringify(
|
|
14878
|
+
_channelExists6 = checkChannelExists(_channel6.id);
|
|
14879
|
+
channelForAdd = JSON.parse(JSON.stringify(_channel6));
|
|
14850
14880
|
_context.n = 52;
|
|
14851
14881
|
return effects.put(addChannelAC(channelForAdd));
|
|
14852
14882
|
case 52:
|
|
@@ -14854,7 +14884,7 @@ function watchForEvents() {
|
|
|
14854
14884
|
_context.n = 53;
|
|
14855
14885
|
break;
|
|
14856
14886
|
}
|
|
14857
|
-
setChannelInMap(
|
|
14887
|
+
setChannelInMap(_channel6);
|
|
14858
14888
|
_context.n = 54;
|
|
14859
14889
|
break;
|
|
14860
14890
|
case 53:
|
|
@@ -14865,7 +14895,7 @@ function watchForEvents() {
|
|
|
14865
14895
|
_context.n = 54;
|
|
14866
14896
|
return effects.put(updateChannelLastMessageAC(message, channelForAdd));
|
|
14867
14897
|
case 54:
|
|
14868
|
-
if (!(
|
|
14898
|
+
if (!(_channel6.id === _activeChannelId5)) {
|
|
14869
14899
|
_context.n = 56;
|
|
14870
14900
|
break;
|
|
14871
14901
|
}
|
|
@@ -14885,9 +14915,9 @@ function watchForEvents() {
|
|
|
14885
14915
|
_context.n = 56;
|
|
14886
14916
|
return effects.put(scrollToNewMessageAC(true, false, true));
|
|
14887
14917
|
case 56:
|
|
14888
|
-
addMessageToMap(
|
|
14918
|
+
addMessageToMap(_channel6.id, message);
|
|
14889
14919
|
_context.n = 57;
|
|
14890
|
-
return effects.put(updateChannelDataAC(
|
|
14920
|
+
return effects.put(updateChannelDataAC(_channel6.id, {
|
|
14891
14921
|
messageCount: channelForAdd.messageCount,
|
|
14892
14922
|
unread: channelForAdd.unread,
|
|
14893
14923
|
newMessageCount: channelForAdd.newMessageCount,
|
|
@@ -14903,9 +14933,9 @@ function watchForEvents() {
|
|
|
14903
14933
|
lastReactedMessage: null
|
|
14904
14934
|
}));
|
|
14905
14935
|
case 57:
|
|
14906
|
-
_groupName4 = getChannelGroupName(
|
|
14936
|
+
_groupName4 = getChannelGroupName(_channel6);
|
|
14907
14937
|
_context.n = 58;
|
|
14908
|
-
return effects.put(updateSearchedChannelDataAC(
|
|
14938
|
+
return effects.put(updateSearchedChannelDataAC(_channel6.id, {
|
|
14909
14939
|
messageCount: channelForAdd.messageCount,
|
|
14910
14940
|
unread: channelForAdd.unread,
|
|
14911
14941
|
newMessageCount: channelForAdd.newMessageCount,
|
|
@@ -14922,7 +14952,7 @@ function watchForEvents() {
|
|
|
14922
14952
|
}, _groupName4));
|
|
14923
14953
|
case 58:
|
|
14924
14954
|
showNotifications = getShowNotifications();
|
|
14925
|
-
if (!(showNotifications && !message.silent && message.user.id !== SceytChatClient.user.id && !
|
|
14955
|
+
if (!(showNotifications && !message.silent && message.user.id !== SceytChatClient.user.id && !_channel6.muted)) {
|
|
14926
14956
|
_context.n = 61;
|
|
14927
14957
|
break;
|
|
14928
14958
|
}
|
|
@@ -14934,7 +14964,7 @@ function watchForEvents() {
|
|
|
14934
14964
|
return effects.select(browserTabIsActiveSelector);
|
|
14935
14965
|
case 59:
|
|
14936
14966
|
tabIsActive = _context.v;
|
|
14937
|
-
if (!(document.visibilityState !== 'visible' || !tabIsActive ||
|
|
14967
|
+
if (!(document.visibilityState !== 'visible' || !tabIsActive || _channel6.id !== _activeChannelId5)) {
|
|
14938
14968
|
_context.n = 61;
|
|
14939
14969
|
break;
|
|
14940
14970
|
}
|
|
@@ -14957,7 +14987,7 @@ function watchForEvents() {
|
|
|
14957
14987
|
accentColor: accentColor,
|
|
14958
14988
|
textSecondary: textSecondary
|
|
14959
14989
|
});
|
|
14960
|
-
setNotification(messageBody, message.user,
|
|
14990
|
+
setNotification(messageBody, message.user, _channel6, undefined, message.attachments && message.attachments.length ? message.attachments.find(function (att) {
|
|
14961
14991
|
return att.type !== attachmentTypes.link;
|
|
14962
14992
|
}) : undefined);
|
|
14963
14993
|
case 61:
|
|
@@ -14972,9 +15002,9 @@ function watchForEvents() {
|
|
|
14972
15002
|
break;
|
|
14973
15003
|
case 63:
|
|
14974
15004
|
_context.n = 64;
|
|
14975
|
-
return effects.put(markMessagesAsDeliveredAC(
|
|
15005
|
+
return effects.put(markMessagesAsDeliveredAC(_channel6.id, [message.id]));
|
|
14976
15006
|
case 64:
|
|
14977
|
-
updateChannelOnAllChannels(
|
|
15007
|
+
updateChannelOnAllChannels(_channel6.id, {
|
|
14978
15008
|
messageCount: channelForAdd.messageCount,
|
|
14979
15009
|
unread: channelForAdd.unread,
|
|
14980
15010
|
newMessageCount: channelForAdd.newMessageCount,
|
|
@@ -14986,10 +15016,10 @@ function watchForEvents() {
|
|
|
14986
15016
|
lastMessage: channelForAdd.lastMessage,
|
|
14987
15017
|
messages: channelForAdd.messages,
|
|
14988
15018
|
newReactions: channelForAdd.newReactions,
|
|
14989
|
-
lastReactedMessage:
|
|
14990
|
-
userMessageReactions:
|
|
15019
|
+
lastReactedMessage: _channel6.lastReactedMessage,
|
|
15020
|
+
userMessageReactions: _channel6.userMessageReactions
|
|
14991
15021
|
});
|
|
14992
|
-
updateChannelLastMessageOnAllChannels(
|
|
15022
|
+
updateChannelLastMessageOnAllChannels(_channel6.id, _channel6.lastMessage);
|
|
14993
15023
|
case 65:
|
|
14994
15024
|
return _context.a(3, 183);
|
|
14995
15025
|
case 66:
|
|
@@ -14997,9 +15027,9 @@ function watchForEvents() {
|
|
|
14997
15027
|
_context.n = 67;
|
|
14998
15028
|
return effects.call(getChannelFromMap, channelId);
|
|
14999
15029
|
case 67:
|
|
15000
|
-
|
|
15001
|
-
log.info('channel MESSAGE_MARKERS_RECEIVED ... channel: ',
|
|
15002
|
-
if (!
|
|
15030
|
+
_channel7 = _context.v;
|
|
15031
|
+
log.info('channel MESSAGE_MARKERS_RECEIVED ... channel: ', _channel7, 'markers list: ', markerList);
|
|
15032
|
+
if (!_channel7) {
|
|
15003
15033
|
_context.n = 78;
|
|
15004
15034
|
break;
|
|
15005
15035
|
}
|
|
@@ -15035,8 +15065,8 @@ function watchForEvents() {
|
|
|
15035
15065
|
}
|
|
15036
15066
|
case 72:
|
|
15037
15067
|
markersMap[messageId] = true;
|
|
15038
|
-
if (
|
|
15039
|
-
if (
|
|
15068
|
+
if (_channel7) {
|
|
15069
|
+
if (_channel7.lastMessage && messageId === _channel7.lastMessage.id) {
|
|
15040
15070
|
updateLastMessage = true;
|
|
15041
15071
|
}
|
|
15042
15072
|
}
|
|
@@ -15052,10 +15082,10 @@ function watchForEvents() {
|
|
|
15052
15082
|
_context.n = 75;
|
|
15053
15083
|
break;
|
|
15054
15084
|
}
|
|
15055
|
-
lastMessage = _extends({},
|
|
15056
|
-
updateChannelLastMessageOnAllChannels(
|
|
15085
|
+
lastMessage = _extends({}, _channel7.lastMessage, updateMessageDeliveryStatusAndMarkers(_channel7.lastMessage, markerList.name));
|
|
15086
|
+
updateChannelLastMessageOnAllChannels(_channel7.id, lastMessage);
|
|
15057
15087
|
_context.n = 75;
|
|
15058
|
-
return effects.put(updateChannelLastMessageStatusAC(lastMessage,
|
|
15088
|
+
return effects.put(updateChannelLastMessageStatusAC(lastMessage, _channel7));
|
|
15059
15089
|
case 75:
|
|
15060
15090
|
if (!(_activeChannelId6 === channelId)) {
|
|
15061
15091
|
_context.n = 77;
|
|
@@ -15066,7 +15096,7 @@ function watchForEvents() {
|
|
|
15066
15096
|
case 76:
|
|
15067
15097
|
updateMarkersOnAllMessages(markersMap, markerList.name);
|
|
15068
15098
|
case 77:
|
|
15069
|
-
updateMessageStatusOnMap(
|
|
15099
|
+
updateMessageStatusOnMap(_channel7.id, {
|
|
15070
15100
|
name: markerList.name,
|
|
15071
15101
|
markersMap: markersMap
|
|
15072
15102
|
});
|
|
@@ -15078,21 +15108,21 @@ function watchForEvents() {
|
|
|
15078
15108
|
case 79:
|
|
15079
15109
|
_channelId = args.channelId;
|
|
15080
15110
|
log.info('channel DELETE ... ');
|
|
15081
|
-
|
|
15111
|
+
_channel8 = getChannelFromMap(_channelId);
|
|
15082
15112
|
_context.n = 80;
|
|
15083
|
-
return effects.put(setChannelToRemoveAC(
|
|
15113
|
+
return effects.put(setChannelToRemoveAC(_channel8));
|
|
15084
15114
|
case 80:
|
|
15085
15115
|
deleteChannelFromAllChannels(_channelId);
|
|
15086
15116
|
return _context.a(3, 183);
|
|
15087
15117
|
case 81:
|
|
15088
|
-
|
|
15118
|
+
_channel9 = args.channel, deletedMessage = args.deletedMessage;
|
|
15089
15119
|
_context.n = 82;
|
|
15090
15120
|
return effects.call(getActiveChannelId);
|
|
15091
15121
|
case 82:
|
|
15092
15122
|
_activeChannelId7 = _context.v;
|
|
15093
15123
|
log.info('channel DELETE_MESSAGE ... ');
|
|
15094
|
-
_channelExists7 = checkChannelExists(
|
|
15095
|
-
if (!(
|
|
15124
|
+
_channelExists7 = checkChannelExists(_channel9.id);
|
|
15125
|
+
if (!(_channel9.id === _activeChannelId7)) {
|
|
15096
15126
|
_context.n = 83;
|
|
15097
15127
|
break;
|
|
15098
15128
|
}
|
|
@@ -15100,7 +15130,7 @@ function watchForEvents() {
|
|
|
15100
15130
|
_context.n = 83;
|
|
15101
15131
|
return effects.put(updateMessageAC(deletedMessage.id, deletedMessage));
|
|
15102
15132
|
case 83:
|
|
15103
|
-
updateMessageOnMap(
|
|
15133
|
+
updateMessageOnMap(_channel9.id, {
|
|
15104
15134
|
messageId: deletedMessage.id,
|
|
15105
15135
|
params: deletedMessage
|
|
15106
15136
|
});
|
|
@@ -15109,33 +15139,33 @@ function watchForEvents() {
|
|
|
15109
15139
|
break;
|
|
15110
15140
|
}
|
|
15111
15141
|
_context.n = 84;
|
|
15112
|
-
return effects.put(updateChannelDataAC(
|
|
15113
|
-
newMessageCount:
|
|
15114
|
-
muted:
|
|
15115
|
-
mutedTill:
|
|
15142
|
+
return effects.put(updateChannelDataAC(_channel9.id, {
|
|
15143
|
+
newMessageCount: _channel9.newMessageCount,
|
|
15144
|
+
muted: _channel9.muted,
|
|
15145
|
+
mutedTill: _channel9.mutedTill
|
|
15116
15146
|
}));
|
|
15117
15147
|
case 84:
|
|
15118
|
-
if (!(
|
|
15148
|
+
if (!(_channel9.lastMessage.id === deletedMessage.id)) {
|
|
15119
15149
|
_context.n = 85;
|
|
15120
15150
|
break;
|
|
15121
15151
|
}
|
|
15122
15152
|
_context.n = 85;
|
|
15123
|
-
return effects.put(updateChannelLastMessageAC(deletedMessage,
|
|
15153
|
+
return effects.put(updateChannelLastMessageAC(deletedMessage, _channel9));
|
|
15124
15154
|
case 85:
|
|
15125
|
-
updateChannelOnAllChannels(
|
|
15126
|
-
newMessageCount:
|
|
15127
|
-
muted:
|
|
15128
|
-
mutedTill:
|
|
15155
|
+
updateChannelOnAllChannels(_channel9.id, {
|
|
15156
|
+
newMessageCount: _channel9.newMessageCount,
|
|
15157
|
+
muted: _channel9.muted,
|
|
15158
|
+
mutedTill: _channel9.mutedTill
|
|
15129
15159
|
}, deletedMessage);
|
|
15130
15160
|
return _context.a(3, 183);
|
|
15131
15161
|
case 86:
|
|
15132
|
-
|
|
15162
|
+
_channel0 = args.channel, _message = args.message;
|
|
15133
15163
|
_context.n = 87;
|
|
15134
15164
|
return effects.call(getActiveChannelId);
|
|
15135
15165
|
case 87:
|
|
15136
15166
|
_activeChannelId8 = _context.v;
|
|
15137
|
-
_channelExists8 = checkChannelExists(
|
|
15138
|
-
if (!(
|
|
15167
|
+
_channelExists8 = checkChannelExists(_channel0.id);
|
|
15168
|
+
if (!(_channel0.id === _activeChannelId8)) {
|
|
15139
15169
|
_context.n = 89;
|
|
15140
15170
|
break;
|
|
15141
15171
|
}
|
|
@@ -15162,29 +15192,29 @@ function watchForEvents() {
|
|
|
15162
15192
|
_context.n = 90;
|
|
15163
15193
|
break;
|
|
15164
15194
|
}
|
|
15165
|
-
if (!(
|
|
15195
|
+
if (!(_channel0.lastMessage.id === _message.id)) {
|
|
15166
15196
|
_context.n = 90;
|
|
15167
15197
|
break;
|
|
15168
15198
|
}
|
|
15169
15199
|
_context.n = 90;
|
|
15170
|
-
return effects.put(updateChannelLastMessageAC(_message,
|
|
15200
|
+
return effects.put(updateChannelLastMessageAC(_message, _channel0));
|
|
15171
15201
|
case 90:
|
|
15172
|
-
if (checkChannelExistsOnMessagesMap(
|
|
15173
|
-
updateMessageOnMap(
|
|
15202
|
+
if (checkChannelExistsOnMessagesMap(_channel0.id)) {
|
|
15203
|
+
updateMessageOnMap(_channel0.id, {
|
|
15174
15204
|
messageId: _message.id,
|
|
15175
15205
|
params: _message
|
|
15176
15206
|
});
|
|
15177
15207
|
}
|
|
15178
|
-
updateChannelOnAllChannels(
|
|
15208
|
+
updateChannelOnAllChannels(_channel0.id, {}, _message);
|
|
15179
15209
|
return _context.a(3, 183);
|
|
15180
15210
|
case 91:
|
|
15181
|
-
|
|
15211
|
+
_channel1 = args.channel, user = args.user, _message2 = args.message, reaction = args.reaction;
|
|
15182
15212
|
isSelf = user.id === SceytChatClient.user.id;
|
|
15183
15213
|
_context.n = 92;
|
|
15184
15214
|
return effects.call(getActiveChannelId);
|
|
15185
15215
|
case 92:
|
|
15186
15216
|
_activeChannelId9 = _context.v;
|
|
15187
|
-
if (!(
|
|
15217
|
+
if (!(_channel1.id === _activeChannelId9)) {
|
|
15188
15218
|
_context.n = 94;
|
|
15189
15219
|
break;
|
|
15190
15220
|
}
|
|
@@ -15201,7 +15231,7 @@ function watchForEvents() {
|
|
|
15201
15231
|
_context.n = 96;
|
|
15202
15232
|
break;
|
|
15203
15233
|
}
|
|
15204
|
-
if (!(document.visibilityState !== 'visible' ||
|
|
15234
|
+
if (!(document.visibilityState !== 'visible' || _channel1.id !== _activeChannelId9)) {
|
|
15205
15235
|
_context.n = 96;
|
|
15206
15236
|
break;
|
|
15207
15237
|
}
|
|
@@ -15224,38 +15254,38 @@ function watchForEvents() {
|
|
|
15224
15254
|
accentColor: _accentColor,
|
|
15225
15255
|
textSecondary: _textSecondary
|
|
15226
15256
|
});
|
|
15227
|
-
setNotification(_messageBody, reaction.user,
|
|
15257
|
+
setNotification(_messageBody, reaction.user, _channel1, reaction.key, _message2.attachments && _message2.attachments.length ? _message2.attachments.find(function (att) {
|
|
15228
15258
|
return att.type !== attachmentTypes.link;
|
|
15229
15259
|
}) : undefined);
|
|
15230
15260
|
case 96:
|
|
15231
|
-
if (!(
|
|
15261
|
+
if (!(_channel1.newReactions && _channel1.newReactions.length)) {
|
|
15232
15262
|
_context.n = 97;
|
|
15233
15263
|
break;
|
|
15234
15264
|
}
|
|
15235
15265
|
channelUpdateParams = {
|
|
15236
|
-
userMessageReactions:
|
|
15266
|
+
userMessageReactions: _channel1.newReactions,
|
|
15237
15267
|
lastReactedMessage: _message2,
|
|
15238
|
-
newReactions:
|
|
15239
|
-
muted:
|
|
15240
|
-
mutedTill:
|
|
15268
|
+
newReactions: _channel1.newReactions,
|
|
15269
|
+
muted: _channel1.muted,
|
|
15270
|
+
mutedTill: _channel1.mutedTill
|
|
15241
15271
|
};
|
|
15242
15272
|
_context.n = 97;
|
|
15243
|
-
return effects.put(updateChannelDataAC(
|
|
15273
|
+
return effects.put(updateChannelDataAC(_channel1.id, channelUpdateParams));
|
|
15244
15274
|
case 97:
|
|
15245
|
-
updateChannelOnAllChannels(
|
|
15246
|
-
userMessageReactions:
|
|
15275
|
+
updateChannelOnAllChannels(_channel1.id, {
|
|
15276
|
+
userMessageReactions: _channel1.newReactions,
|
|
15247
15277
|
lastReactedMessage: _message2,
|
|
15248
|
-
newReactions:
|
|
15249
|
-
muted:
|
|
15250
|
-
mutedTill:
|
|
15278
|
+
newReactions: _channel1.newReactions,
|
|
15279
|
+
muted: _channel1.muted,
|
|
15280
|
+
mutedTill: _channel1.mutedTill
|
|
15251
15281
|
});
|
|
15252
15282
|
case 98:
|
|
15253
|
-
if (checkChannelExistsOnMessagesMap(
|
|
15254
|
-
addReactionToMessageOnMap(
|
|
15283
|
+
if (checkChannelExistsOnMessagesMap(_channel1.id)) {
|
|
15284
|
+
addReactionToMessageOnMap(_channel1.id, _message2, reaction, true);
|
|
15255
15285
|
}
|
|
15256
15286
|
return _context.a(3, 183);
|
|
15257
15287
|
case 99:
|
|
15258
|
-
|
|
15288
|
+
_channel10 = args.channel, pollDetails = args.pollDetails, _messageId = args.messageId;
|
|
15259
15289
|
pollDetailsData = pollDetails;
|
|
15260
15290
|
_context.n = 100;
|
|
15261
15291
|
return effects.call(getActiveChannelId);
|
|
@@ -15317,7 +15347,7 @@ function watchForEvents() {
|
|
|
15317
15347
|
break;
|
|
15318
15348
|
}
|
|
15319
15349
|
_obj = _objs2[_i2];
|
|
15320
|
-
updateMessageOnMap(
|
|
15350
|
+
updateMessageOnMap(_channel10.id, {
|
|
15321
15351
|
messageId: _messageId,
|
|
15322
15352
|
params: {}
|
|
15323
15353
|
}, {
|
|
@@ -15325,7 +15355,7 @@ function watchForEvents() {
|
|
|
15325
15355
|
vote: _obj.vote,
|
|
15326
15356
|
incrementVotesPerOptionCount: _obj.incrementVotesPerOptionCount
|
|
15327
15357
|
});
|
|
15328
|
-
if (!(
|
|
15358
|
+
if (!(_channel10.id === _activeChannelId0)) {
|
|
15329
15359
|
_context.n = 107;
|
|
15330
15360
|
break;
|
|
15331
15361
|
}
|
|
@@ -15339,7 +15369,7 @@ function watchForEvents() {
|
|
|
15339
15369
|
case 108:
|
|
15340
15370
|
return _context.a(3, 183);
|
|
15341
15371
|
case 109:
|
|
15342
|
-
|
|
15372
|
+
_channel11 = args.channel, _pollDetails = args.pollDetails, _messageId2 = args.messageId;
|
|
15343
15373
|
_pollDetailsData = _pollDetails;
|
|
15344
15374
|
_context.n = 110;
|
|
15345
15375
|
return effects.call(getActiveChannelId);
|
|
@@ -15380,11 +15410,11 @@ function watchForEvents() {
|
|
|
15380
15410
|
break;
|
|
15381
15411
|
}
|
|
15382
15412
|
_obj3 = _objs5[_i4];
|
|
15383
|
-
updateMessageOnMap(
|
|
15413
|
+
updateMessageOnMap(_channel11.id, {
|
|
15384
15414
|
messageId: _messageId2,
|
|
15385
15415
|
params: {}
|
|
15386
15416
|
}, _obj3);
|
|
15387
|
-
if (!(
|
|
15417
|
+
if (!(_channel11.id === _activeChannelId1)) {
|
|
15388
15418
|
_context.n = 115;
|
|
15389
15419
|
break;
|
|
15390
15420
|
}
|
|
@@ -15398,7 +15428,7 @@ function watchForEvents() {
|
|
|
15398
15428
|
case 116:
|
|
15399
15429
|
return _context.a(3, 183);
|
|
15400
15430
|
case 117:
|
|
15401
|
-
|
|
15431
|
+
_channel12 = args.channel, _pollDetails2 = args.pollDetails, _messageId3 = args.messageId;
|
|
15402
15432
|
_context.n = 118;
|
|
15403
15433
|
return effects.call(getActiveChannelId);
|
|
15404
15434
|
case 118:
|
|
@@ -15421,7 +15451,7 @@ function watchForEvents() {
|
|
|
15421
15451
|
break;
|
|
15422
15452
|
}
|
|
15423
15453
|
_obj4 = _objs7[_i5];
|
|
15424
|
-
updateMessageOnMap(
|
|
15454
|
+
updateMessageOnMap(_channel12.id, {
|
|
15425
15455
|
messageId: _messageId3,
|
|
15426
15456
|
params: {}
|
|
15427
15457
|
}, _obj4);
|
|
@@ -15442,7 +15472,7 @@ function watchForEvents() {
|
|
|
15442
15472
|
_context.n = 120;
|
|
15443
15473
|
break;
|
|
15444
15474
|
case 122:
|
|
15445
|
-
if (!(
|
|
15475
|
+
if (!(_channel12.id === _activeChannelId10)) {
|
|
15446
15476
|
_context.n = 123;
|
|
15447
15477
|
break;
|
|
15448
15478
|
}
|
|
@@ -15456,7 +15486,7 @@ function watchForEvents() {
|
|
|
15456
15486
|
case 124:
|
|
15457
15487
|
return _context.a(3, 183);
|
|
15458
15488
|
case 125:
|
|
15459
|
-
|
|
15489
|
+
_channel13 = args.channel, _messageId4 = args.messageId;
|
|
15460
15490
|
_context.n = 126;
|
|
15461
15491
|
return effects.call(getActiveChannelId);
|
|
15462
15492
|
case 126:
|
|
@@ -15465,11 +15495,11 @@ function watchForEvents() {
|
|
|
15465
15495
|
type: 'close',
|
|
15466
15496
|
incrementVotesPerOptionCount: 0
|
|
15467
15497
|
};
|
|
15468
|
-
updateMessageOnMap(
|
|
15498
|
+
updateMessageOnMap(_channel13.id, {
|
|
15469
15499
|
messageId: _messageId4,
|
|
15470
15500
|
params: {}
|
|
15471
15501
|
}, _obj5);
|
|
15472
|
-
if (!(
|
|
15502
|
+
if (!(_channel13.id === _activeChannelId11)) {
|
|
15473
15503
|
_context.n = 128;
|
|
15474
15504
|
break;
|
|
15475
15505
|
}
|
|
@@ -15481,15 +15511,15 @@ function watchForEvents() {
|
|
|
15481
15511
|
case 128:
|
|
15482
15512
|
return _context.a(3, 183);
|
|
15483
15513
|
case 129:
|
|
15484
|
-
|
|
15485
|
-
log.info('channel REACTION_DELETED ... ',
|
|
15486
|
-
channelFromMap = getChannelFromMap(
|
|
15514
|
+
_channel14 = args.channel, _user = args.user, _message3 = args.message, _reaction = args.reaction;
|
|
15515
|
+
log.info('channel REACTION_DELETED ... ', _channel14);
|
|
15516
|
+
channelFromMap = getChannelFromMap(_channel14.id);
|
|
15487
15517
|
_isSelf = _user.id === SceytChatClient.user.id;
|
|
15488
15518
|
_context.n = 130;
|
|
15489
15519
|
return effects.call(getActiveChannelId);
|
|
15490
15520
|
case 130:
|
|
15491
15521
|
_activeChannelId12 = _context.v;
|
|
15492
|
-
if (!(
|
|
15522
|
+
if (!(_channel14.id === _activeChannelId12)) {
|
|
15493
15523
|
_context.n = 132;
|
|
15494
15524
|
break;
|
|
15495
15525
|
}
|
|
@@ -15498,54 +15528,54 @@ function watchForEvents() {
|
|
|
15498
15528
|
case 131:
|
|
15499
15529
|
removeReactionOnAllMessages(_message3, _reaction, true);
|
|
15500
15530
|
case 132:
|
|
15501
|
-
_channelUpdateParams = JSON.parse(JSON.stringify(
|
|
15531
|
+
_channelUpdateParams = JSON.parse(JSON.stringify(_channel14));
|
|
15502
15532
|
if (channelFromMap && channelFromMap.lastReactedMessage && channelFromMap.lastReactedMessage.id === _message3.id) {
|
|
15503
15533
|
_channelUpdateParams.lastReactedMessage = null;
|
|
15504
15534
|
}
|
|
15505
15535
|
_context.n = 133;
|
|
15506
|
-
return effects.put(updateChannelDataAC(
|
|
15536
|
+
return effects.put(updateChannelDataAC(_channel14.id, _channelUpdateParams));
|
|
15507
15537
|
case 133:
|
|
15508
|
-
updateChannelOnAllChannels(
|
|
15509
|
-
if (checkChannelExistsOnMessagesMap(
|
|
15510
|
-
removeReactionToMessageOnMap(
|
|
15538
|
+
updateChannelOnAllChannels(_channel14.id, _channelUpdateParams);
|
|
15539
|
+
if (checkChannelExistsOnMessagesMap(_channel14.id)) {
|
|
15540
|
+
removeReactionToMessageOnMap(_channel14.id, _message3, _reaction, true);
|
|
15511
15541
|
}
|
|
15512
15542
|
return _context.a(3, 183);
|
|
15513
15543
|
case 134:
|
|
15514
|
-
|
|
15515
|
-
if (!
|
|
15544
|
+
_channel15 = args.channel;
|
|
15545
|
+
if (!_channel15) {
|
|
15516
15546
|
_context.n = 136;
|
|
15517
15547
|
break;
|
|
15518
15548
|
}
|
|
15519
|
-
_updatedChannel = JSON.parse(JSON.stringify(
|
|
15549
|
+
_updatedChannel = JSON.parse(JSON.stringify(_channel15));
|
|
15520
15550
|
_context.n = 135;
|
|
15521
|
-
return effects.put(updateChannelDataAC(
|
|
15522
|
-
lastMessage:
|
|
15523
|
-
newMessageCount:
|
|
15524
|
-
newMentionCount:
|
|
15525
|
-
unread:
|
|
15526
|
-
newReactedMessageCount:
|
|
15527
|
-
newReactions:
|
|
15528
|
-
lastReactedMessage:
|
|
15529
|
-
lastReceivedMsgId:
|
|
15530
|
-
lastDisplayedMessageId:
|
|
15531
|
-
messageRetentionPeriod:
|
|
15551
|
+
return effects.put(updateChannelDataAC(_channel15.id, {
|
|
15552
|
+
lastMessage: _channel15.lastMessage,
|
|
15553
|
+
newMessageCount: _channel15.newMessageCount,
|
|
15554
|
+
newMentionCount: _channel15.newMentionCount,
|
|
15555
|
+
unread: _channel15.unread,
|
|
15556
|
+
newReactedMessageCount: _channel15.newReactedMessageCount,
|
|
15557
|
+
newReactions: _channel15.newReactions,
|
|
15558
|
+
lastReactedMessage: _channel15.lastReactedMessage,
|
|
15559
|
+
lastReceivedMsgId: _channel15.lastReceivedMsgId,
|
|
15560
|
+
lastDisplayedMessageId: _channel15.lastDisplayedMessageId,
|
|
15561
|
+
messageRetentionPeriod: _channel15.messageRetentionPeriod
|
|
15532
15562
|
}));
|
|
15533
15563
|
case 135:
|
|
15534
|
-
updateChannelOnAllChannels(
|
|
15564
|
+
updateChannelOnAllChannels(_channel15.id, _updatedChannel);
|
|
15535
15565
|
case 136:
|
|
15536
15566
|
return _context.a(3, 183);
|
|
15537
15567
|
case 137:
|
|
15538
|
-
|
|
15539
|
-
log.info('CLEAR_HISTORY: ',
|
|
15568
|
+
_channel16 = args.channel;
|
|
15569
|
+
log.info('CLEAR_HISTORY: ', _channel16);
|
|
15540
15570
|
_context.n = 138;
|
|
15541
15571
|
return effects.call(getActiveChannelId);
|
|
15542
15572
|
case 138:
|
|
15543
15573
|
_activeChannelId13 = _context.v;
|
|
15544
15574
|
_context.n = 139;
|
|
15545
|
-
return effects.call(checkChannelExists,
|
|
15575
|
+
return effects.call(checkChannelExists, _channel16.id);
|
|
15546
15576
|
case 139:
|
|
15547
15577
|
channelExist = _context.v;
|
|
15548
|
-
if (!(
|
|
15578
|
+
if (!(_channel16.id === _activeChannelId13)) {
|
|
15549
15579
|
_context.n = 141;
|
|
15550
15580
|
break;
|
|
15551
15581
|
}
|
|
@@ -15554,141 +15584,141 @@ function watchForEvents() {
|
|
|
15554
15584
|
case 140:
|
|
15555
15585
|
removeAllMessages();
|
|
15556
15586
|
case 141:
|
|
15557
|
-
removeMessagesFromMap(
|
|
15587
|
+
removeMessagesFromMap(_channel16.id);
|
|
15558
15588
|
if (!channelExist) {
|
|
15559
15589
|
_context.n = 142;
|
|
15560
15590
|
break;
|
|
15561
15591
|
}
|
|
15562
15592
|
_context.n = 142;
|
|
15563
|
-
return effects.put(updateChannelDataAC(
|
|
15593
|
+
return effects.put(updateChannelDataAC(_channel16.id, {
|
|
15564
15594
|
lastMessage: null,
|
|
15565
15595
|
newMessageCount: 0,
|
|
15566
15596
|
newMentionCount: 0,
|
|
15567
|
-
muted:
|
|
15568
|
-
mutedTill:
|
|
15597
|
+
muted: _channel16.muted,
|
|
15598
|
+
mutedTill: _channel16.mutedTill
|
|
15569
15599
|
}));
|
|
15570
15600
|
case 142:
|
|
15571
|
-
updateChannelOnAllChannels(
|
|
15601
|
+
updateChannelOnAllChannels(_channel16.id, {
|
|
15572
15602
|
lastMessage: null,
|
|
15573
15603
|
newMessageCount: 0,
|
|
15574
15604
|
newMentionCount: 0,
|
|
15575
|
-
muted:
|
|
15576
|
-
mutedTill:
|
|
15605
|
+
muted: _channel16.muted,
|
|
15606
|
+
mutedTill: _channel16.mutedTill
|
|
15577
15607
|
});
|
|
15578
15608
|
return _context.a(3, 183);
|
|
15579
15609
|
case 143:
|
|
15580
|
-
|
|
15610
|
+
_channel17 = args.channel;
|
|
15581
15611
|
log.info('channel MUTE ... ');
|
|
15582
15612
|
_context.n = 144;
|
|
15583
|
-
return effects.put(updateChannelDataAC(
|
|
15584
|
-
muted:
|
|
15585
|
-
mutedTill:
|
|
15613
|
+
return effects.put(updateChannelDataAC(_channel17.id, {
|
|
15614
|
+
muted: _channel17.muted,
|
|
15615
|
+
mutedTill: _channel17.mutedTill
|
|
15586
15616
|
}));
|
|
15587
15617
|
case 144:
|
|
15588
|
-
updateChannelOnAllChannels(
|
|
15589
|
-
muted:
|
|
15590
|
-
mutedTill:
|
|
15618
|
+
updateChannelOnAllChannels(_channel17.id, {
|
|
15619
|
+
muted: _channel17.muted,
|
|
15620
|
+
mutedTill: _channel17.mutedTill
|
|
15591
15621
|
});
|
|
15592
15622
|
return _context.a(3, 183);
|
|
15593
15623
|
case 145:
|
|
15594
|
-
|
|
15624
|
+
_channel18 = args.channel;
|
|
15595
15625
|
log.info('channel UNMUTE ... ');
|
|
15596
15626
|
_context.n = 146;
|
|
15597
|
-
return effects.put(updateChannelDataAC(
|
|
15598
|
-
muted:
|
|
15599
|
-
mutedTill:
|
|
15627
|
+
return effects.put(updateChannelDataAC(_channel18.id, {
|
|
15628
|
+
muted: _channel18.muted,
|
|
15629
|
+
mutedTill: _channel18.mutedTill
|
|
15600
15630
|
}));
|
|
15601
15631
|
case 146:
|
|
15602
|
-
updateChannelOnAllChannels(
|
|
15603
|
-
muted:
|
|
15604
|
-
mutedTill:
|
|
15632
|
+
updateChannelOnAllChannels(_channel18.id, {
|
|
15633
|
+
muted: _channel18.muted,
|
|
15634
|
+
mutedTill: _channel18.mutedTill
|
|
15605
15635
|
});
|
|
15606
15636
|
return _context.a(3, 183);
|
|
15607
15637
|
case 147:
|
|
15608
|
-
|
|
15638
|
+
_channel19 = args.channel;
|
|
15609
15639
|
log.info('channel PINED ... ');
|
|
15610
15640
|
_context.n = 148;
|
|
15611
|
-
return effects.put(updateChannelDataAC(
|
|
15612
|
-
pinnedAt:
|
|
15641
|
+
return effects.put(updateChannelDataAC(_channel19.id, {
|
|
15642
|
+
pinnedAt: _channel19.pinnedAt
|
|
15613
15643
|
}, true));
|
|
15614
15644
|
case 148:
|
|
15615
|
-
updateChannelOnAllChannels(
|
|
15616
|
-
pinnedAt:
|
|
15645
|
+
updateChannelOnAllChannels(_channel19.id, {
|
|
15646
|
+
pinnedAt: _channel19.pinnedAt
|
|
15617
15647
|
});
|
|
15618
15648
|
return _context.a(3, 183);
|
|
15619
15649
|
case 149:
|
|
15620
|
-
|
|
15650
|
+
_channel20 = args.channel;
|
|
15621
15651
|
log.info('channel UNPINED ... ');
|
|
15622
15652
|
_context.n = 150;
|
|
15623
|
-
return effects.put(updateChannelDataAC(
|
|
15624
|
-
pinnedAt:
|
|
15653
|
+
return effects.put(updateChannelDataAC(_channel20.id, {
|
|
15654
|
+
pinnedAt: _channel20.pinnedAt
|
|
15625
15655
|
}, false, true));
|
|
15626
15656
|
case 150:
|
|
15627
|
-
updateChannelOnAllChannels(
|
|
15628
|
-
pinnedAt:
|
|
15657
|
+
updateChannelOnAllChannels(_channel20.id, {
|
|
15658
|
+
pinnedAt: _channel20.pinnedAt
|
|
15629
15659
|
});
|
|
15630
15660
|
return _context.a(3, 183);
|
|
15631
15661
|
case 151:
|
|
15632
|
-
|
|
15662
|
+
_channel21 = args.channel;
|
|
15633
15663
|
log.info('channel HIDE ... ');
|
|
15634
15664
|
_context.n = 152;
|
|
15635
|
-
return effects.put(setChannelToHideAC(
|
|
15665
|
+
return effects.put(setChannelToHideAC(_channel21));
|
|
15636
15666
|
case 152:
|
|
15637
15667
|
return _context.a(3, 183);
|
|
15638
15668
|
case 153:
|
|
15639
|
-
|
|
15669
|
+
_channel22 = args.channel;
|
|
15640
15670
|
log.info('channel UNHIDE ... ');
|
|
15641
15671
|
_context.n = 154;
|
|
15642
|
-
return effects.put(setChannelToUnHideAC(
|
|
15672
|
+
return effects.put(setChannelToUnHideAC(_channel22));
|
|
15643
15673
|
case 154:
|
|
15644
15674
|
return _context.a(3, 183);
|
|
15645
15675
|
case 155:
|
|
15646
|
-
|
|
15676
|
+
_channel23 = args.channel;
|
|
15647
15677
|
_context.n = 156;
|
|
15648
|
-
return effects.put(updateChannelDataAC(
|
|
15649
|
-
unread:
|
|
15650
|
-
muted:
|
|
15651
|
-
mutedTill:
|
|
15678
|
+
return effects.put(updateChannelDataAC(_channel23.id, {
|
|
15679
|
+
unread: _channel23.unread,
|
|
15680
|
+
muted: _channel23.muted,
|
|
15681
|
+
mutedTill: _channel23.mutedTill
|
|
15652
15682
|
}));
|
|
15653
15683
|
case 156:
|
|
15654
|
-
_groupName5 = getChannelGroupName(
|
|
15684
|
+
_groupName5 = getChannelGroupName(_channel23);
|
|
15655
15685
|
_context.n = 157;
|
|
15656
|
-
return effects.put(updateSearchedChannelDataAC(
|
|
15657
|
-
unread:
|
|
15686
|
+
return effects.put(updateSearchedChannelDataAC(_channel23.id, {
|
|
15687
|
+
unread: _channel23.unread
|
|
15658
15688
|
}, _groupName5));
|
|
15659
15689
|
case 157:
|
|
15660
|
-
updateChannelOnAllChannels(
|
|
15661
|
-
unread:
|
|
15690
|
+
updateChannelOnAllChannels(_channel23.id, {
|
|
15691
|
+
unread: _channel23.unread
|
|
15662
15692
|
});
|
|
15663
15693
|
return _context.a(3, 183);
|
|
15664
15694
|
case 158:
|
|
15665
|
-
|
|
15695
|
+
_channel24 = args.channel;
|
|
15666
15696
|
_context.n = 159;
|
|
15667
|
-
return effects.put(updateChannelDataAC(
|
|
15668
|
-
unread:
|
|
15669
|
-
muted:
|
|
15670
|
-
mutedTill:
|
|
15697
|
+
return effects.put(updateChannelDataAC(_channel24.id, {
|
|
15698
|
+
unread: _channel24.unread,
|
|
15699
|
+
muted: _channel24.muted,
|
|
15700
|
+
mutedTill: _channel24.mutedTill
|
|
15671
15701
|
}));
|
|
15672
15702
|
case 159:
|
|
15673
|
-
_groupName6 = getChannelGroupName(
|
|
15703
|
+
_groupName6 = getChannelGroupName(_channel24);
|
|
15674
15704
|
_context.n = 160;
|
|
15675
|
-
return effects.put(updateSearchedChannelDataAC(
|
|
15676
|
-
unread:
|
|
15705
|
+
return effects.put(updateSearchedChannelDataAC(_channel24.id, {
|
|
15706
|
+
unread: _channel24.unread
|
|
15677
15707
|
}, _groupName6));
|
|
15678
15708
|
case 160:
|
|
15679
|
-
updateChannelOnAllChannels(
|
|
15680
|
-
unread:
|
|
15709
|
+
updateChannelOnAllChannels(_channel24.id, {
|
|
15710
|
+
unread: _channel24.unread
|
|
15681
15711
|
});
|
|
15682
15712
|
return _context.a(3, 183);
|
|
15683
15713
|
case 161:
|
|
15684
|
-
|
|
15685
|
-
log.info('channel CHANGE_ROLE channel ... ',
|
|
15714
|
+
_channel25 = args.channel, members = args.members;
|
|
15715
|
+
log.info('channel CHANGE_ROLE channel ... ', _channel25);
|
|
15686
15716
|
log.info('channel CHANGE_ROLE member ... ', members);
|
|
15687
15717
|
_context.n = 162;
|
|
15688
15718
|
return effects.call(getActiveChannelId);
|
|
15689
15719
|
case 162:
|
|
15690
15720
|
_activeChannelId14 = _context.v;
|
|
15691
|
-
if (!(
|
|
15721
|
+
if (!(_channel25.id === _activeChannelId14)) {
|
|
15692
15722
|
_context.n = 163;
|
|
15693
15723
|
break;
|
|
15694
15724
|
}
|
|
@@ -15706,16 +15736,16 @@ function watchForEvents() {
|
|
|
15706
15736
|
break;
|
|
15707
15737
|
}
|
|
15708
15738
|
_context.n = 165;
|
|
15709
|
-
return effects.put(updateChannelDataAC(
|
|
15739
|
+
return effects.put(updateChannelDataAC(_channel25.id, {
|
|
15710
15740
|
userRole: members[i].role,
|
|
15711
|
-
muted:
|
|
15712
|
-
mutedTill:
|
|
15741
|
+
muted: _channel25.muted,
|
|
15742
|
+
mutedTill: _channel25.mutedTill
|
|
15713
15743
|
}));
|
|
15714
15744
|
case 165:
|
|
15715
|
-
updateChannelOnAllChannels(
|
|
15745
|
+
updateChannelOnAllChannels(_channel25.id, {
|
|
15716
15746
|
userRole: members[i].role,
|
|
15717
|
-
muted:
|
|
15718
|
-
mutedTill:
|
|
15747
|
+
muted: _channel25.muted,
|
|
15748
|
+
mutedTill: _channel25.mutedTill
|
|
15719
15749
|
});
|
|
15720
15750
|
case 166:
|
|
15721
15751
|
i++;
|
|
@@ -15724,12 +15754,12 @@ function watchForEvents() {
|
|
|
15724
15754
|
case 167:
|
|
15725
15755
|
return _context.a(3, 183);
|
|
15726
15756
|
case 168:
|
|
15727
|
-
|
|
15728
|
-
log.info('channel frozen channel ... ',
|
|
15757
|
+
_channel26 = args.channel;
|
|
15758
|
+
log.info('channel frozen channel ... ', _channel26);
|
|
15729
15759
|
return _context.a(3, 183);
|
|
15730
15760
|
case 169:
|
|
15731
|
-
|
|
15732
|
-
log.info('channel unfrozen channel ... ',
|
|
15761
|
+
_channel27 = args.channel;
|
|
15762
|
+
log.info('channel unfrozen channel ... ', _channel27);
|
|
15733
15763
|
return _context.a(3, 183);
|
|
15734
15764
|
case 170:
|
|
15735
15765
|
_channelId2 = args.channelId, from = args.from, name = args.name;
|
|
@@ -16065,7 +16095,7 @@ function createChannel(action) {
|
|
|
16065
16095
|
}, _marked$2, null, [[0, 17]]);
|
|
16066
16096
|
}
|
|
16067
16097
|
function getChannels(action) {
|
|
16068
|
-
var _params$filter, _types, _activeChannel, _mappedChannels, _mappedChannels3, _mappedChannels4, payload, params, SceytChatClient, connectionStatus, channelQueryBuilder, channelTypesFilter, types, limit, channelQuery, channelsData, channelList, channelId, activeChannel, _yield$call, mappedChannels, channelsForUpdateLastReactionMessage, _Object$keys, _mappedChannels2, channelMessageMap, _activeChannel2, _activeChannel3, hiddenList, allChannelsQueryBuilder, allChannelsQuery, hasNext, totalAllChannelsAdded, i, allChannelsData, allChannelList, _t2, _t3, _t4;
|
|
16098
|
+
var _params$filter, _types, _activeChannel, _mappedChannels, _mappedChannels3, _mappedChannels4, payload, params, SceytChatClient, connectionStatus, channelQueryBuilder, channelTypesFilter, types, limit, channelQuery, channelsData, channelList, channelId, activeChannel, _yield$call, mappedChannels, channelsForUpdateLastReactionMessage, _Object$keys, _mappedChannels2, channelMessageMap, _activeChannel2, _activeChannel3, hiddenList, allChannelsQueryBuilder, allChannelsQuery, hasNext, totalAllChannelsAdded, i, _connectionStatus, allChannelsData, allChannelList, _t2, _t3, _t4;
|
|
16069
16099
|
return _regenerator().w(function (_context2) {
|
|
16070
16100
|
while (1) switch (_context2.p = _context2.n) {
|
|
16071
16101
|
case 0:
|
|
@@ -16223,7 +16253,7 @@ function getChannels(action) {
|
|
|
16223
16253
|
hiddenList = store.getState().ChannelReducer.hideChannelList;
|
|
16224
16254
|
log.info('[getChannels] hiddenList state:', hiddenList);
|
|
16225
16255
|
if (hiddenList) {
|
|
16226
|
-
_context2.n =
|
|
16256
|
+
_context2.n = 28;
|
|
16227
16257
|
break;
|
|
16228
16258
|
}
|
|
16229
16259
|
log.info('[getChannels] starting all channels query (hiddenList is false)');
|
|
@@ -16248,18 +16278,26 @@ function getChannels(action) {
|
|
|
16248
16278
|
i = 0;
|
|
16249
16279
|
case 19:
|
|
16250
16280
|
if (!(i <= 4)) {
|
|
16251
|
-
_context2.n =
|
|
16281
|
+
_context2.n = 27;
|
|
16252
16282
|
break;
|
|
16253
16283
|
}
|
|
16254
16284
|
if (!hasNext) {
|
|
16255
|
-
_context2.n =
|
|
16285
|
+
_context2.n = 25;
|
|
16256
16286
|
break;
|
|
16257
16287
|
}
|
|
16258
16288
|
_context2.p = 20;
|
|
16289
|
+
_connectionStatus = store.getState().UserReducer.connectionStatus;
|
|
16290
|
+
if (!(_connectionStatus !== CONNECTION_STATUS.CONNECTED)) {
|
|
16291
|
+
_context2.n = 21;
|
|
16292
|
+
break;
|
|
16293
|
+
}
|
|
16294
|
+
log.warn('[getChannels] connection not ready, aborting. Status:', _connectionStatus);
|
|
16295
|
+
return _context2.a(3, 27);
|
|
16296
|
+
case 21:
|
|
16259
16297
|
log.info('[getChannels] loading all channels page:', i + 1);
|
|
16260
|
-
_context2.n =
|
|
16298
|
+
_context2.n = 22;
|
|
16261
16299
|
return effects.call(allChannelsQuery.loadNextPage);
|
|
16262
|
-
case
|
|
16300
|
+
case 22:
|
|
16263
16301
|
allChannelsData = _context2.v;
|
|
16264
16302
|
hasNext = allChannelsData.hasNext;
|
|
16265
16303
|
allChannelList = allChannelsData.channels;
|
|
@@ -16270,33 +16308,34 @@ function getChannels(action) {
|
|
|
16270
16308
|
addChannelsToAllChannels(allChannelList);
|
|
16271
16309
|
totalAllChannelsAdded += (allChannelList === null || allChannelList === void 0 ? void 0 : allChannelList.length) || 0;
|
|
16272
16310
|
log.info('[getChannels] total all channels added so far:', totalAllChannelsAdded);
|
|
16273
|
-
_context2.n =
|
|
16311
|
+
_context2.n = 24;
|
|
16274
16312
|
break;
|
|
16275
|
-
case
|
|
16276
|
-
_context2.p =
|
|
16313
|
+
case 23:
|
|
16314
|
+
_context2.p = 23;
|
|
16277
16315
|
_t3 = _context2.v;
|
|
16278
16316
|
log.error(_t3, 'Error on get all channels page:', i + 1);
|
|
16279
|
-
|
|
16280
|
-
_context2.n = 25;
|
|
16281
|
-
break;
|
|
16317
|
+
return _context2.a(3, 27);
|
|
16282
16318
|
case 24:
|
|
16283
|
-
|
|
16319
|
+
_context2.n = 26;
|
|
16320
|
+
break;
|
|
16284
16321
|
case 25:
|
|
16322
|
+
log.info('[getChannels] no more pages available, stopping at iteration:', i);
|
|
16323
|
+
case 26:
|
|
16285
16324
|
i++;
|
|
16286
16325
|
_context2.n = 19;
|
|
16287
16326
|
break;
|
|
16288
|
-
case
|
|
16327
|
+
case 27:
|
|
16289
16328
|
log.info('[getChannels] all channels query completed, total channels added:', totalAllChannelsAdded);
|
|
16290
|
-
_context2.n =
|
|
16329
|
+
_context2.n = 29;
|
|
16291
16330
|
break;
|
|
16292
|
-
case 27:
|
|
16293
|
-
log.info('[getChannels] skipping all channels query (hiddenList is true)');
|
|
16294
16331
|
case 28:
|
|
16332
|
+
log.info('[getChannels] skipping all channels query (hiddenList is true)');
|
|
16333
|
+
case 29:
|
|
16295
16334
|
log.info('[getChannels] completed successfully. Final mapped channels count:', ((_mappedChannels4 = mappedChannels) === null || _mappedChannels4 === void 0 ? void 0 : _mappedChannels4.length) || 0);
|
|
16296
|
-
_context2.n =
|
|
16335
|
+
_context2.n = 31;
|
|
16297
16336
|
break;
|
|
16298
|
-
case
|
|
16299
|
-
_context2.p =
|
|
16337
|
+
case 30:
|
|
16338
|
+
_context2.p = 30;
|
|
16300
16339
|
_t4 = _context2.v;
|
|
16301
16340
|
log.error('[getChannels] error occurred:', JSON.stringify(_t4), 'Error on get channels');
|
|
16302
16341
|
log.error('[getChannels] error details:', {
|
|
@@ -16304,10 +16343,10 @@ function getChannels(action) {
|
|
|
16304
16343
|
code: _t4.code,
|
|
16305
16344
|
stack: _t4.stack
|
|
16306
16345
|
});
|
|
16307
|
-
case
|
|
16346
|
+
case 31:
|
|
16308
16347
|
return _context2.a(2);
|
|
16309
16348
|
}
|
|
16310
|
-
}, _marked2$1, null, [[20,
|
|
16349
|
+
}, _marked2$1, null, [[20, 23], [1, 30]]);
|
|
16311
16350
|
}
|
|
16312
16351
|
function searchChannels(action) {
|
|
16313
16352
|
var payload, params, contactsMap, SceytChatClient, getFromContacts, searchBy, _params$filter2, _types2, channelQueryBuilder, channelTypesFilter, types, allChannels, publicChannels, chatsGroups, contactsList, contactsWithChannelsMap, lowerCaseSearchBy, handleChannels, channelsMap, _iterator, _step, channel, channelQuery, channelsData, _iterator2, _step2, _channel, channelsToAdd, _t5;
|
|
@@ -16630,39 +16669,66 @@ function searchChannelsForForward(action) {
|
|
|
16630
16669
|
}, _marked5, null, [[0, 7]]);
|
|
16631
16670
|
}
|
|
16632
16671
|
function channelsLoadMore(action) {
|
|
16633
|
-
var payload, limit, channelQuery, channelsData, _yield$call3, mappedChannels, channelsForUpdateLastReactionMessage, channelMessageMap, _t8;
|
|
16672
|
+
var _mappedChannels5, _mappedChannels7, _mappedChannels8, payload, limit, channelQuery, channelsData, channelList, _yield$call3, mappedChannels, channelsForUpdateLastReactionMessage, _Object$keys2, _mappedChannels6, channelMessageMap, _t8;
|
|
16634
16673
|
return _regenerator().w(function (_context6) {
|
|
16635
16674
|
while (1) switch (_context6.p = _context6.n) {
|
|
16636
16675
|
case 0:
|
|
16637
|
-
|
|
16676
|
+
log.info('[channelsLoadMore] start load more channels');
|
|
16677
|
+
_context6.p = 1;
|
|
16638
16678
|
payload = action.payload;
|
|
16639
16679
|
limit = payload.limit;
|
|
16680
|
+
log.info('[channelsLoadMore] input payload:', JSON.stringify({
|
|
16681
|
+
limit: limit
|
|
16682
|
+
}));
|
|
16640
16683
|
channelQuery = query.channelQuery;
|
|
16684
|
+
log.info('[channelsLoadMore] channelQuery exists:', !!channelQuery);
|
|
16685
|
+
if (channelQuery) {
|
|
16686
|
+
_context6.n = 2;
|
|
16687
|
+
break;
|
|
16688
|
+
}
|
|
16689
|
+
log.error('[channelsLoadMore] channelQuery is null or undefined, cannot load more');
|
|
16690
|
+
return _context6.a(2);
|
|
16691
|
+
case 2:
|
|
16641
16692
|
if (limit) {
|
|
16693
|
+
log.info('[channelsLoadMore] setting query limit to:', limit);
|
|
16642
16694
|
channelQuery.limit = limit;
|
|
16695
|
+
} else {
|
|
16696
|
+
log.info('[channelsLoadMore] no limit provided, using existing query limit');
|
|
16643
16697
|
}
|
|
16644
|
-
_context6.n =
|
|
16698
|
+
_context6.n = 3;
|
|
16645
16699
|
return effects.put(setChannelsLoadingStateAC(LOADING_STATE.LOADING));
|
|
16646
|
-
case
|
|
16647
|
-
|
|
16700
|
+
case 3:
|
|
16701
|
+
log.info('[channelsLoadMore] loading next page...');
|
|
16702
|
+
_context6.n = 4;
|
|
16648
16703
|
return effects.call(channelQuery.loadNextPage);
|
|
16649
|
-
case
|
|
16704
|
+
case 4:
|
|
16650
16705
|
channelsData = _context6.v;
|
|
16651
|
-
|
|
16706
|
+
channelList = channelsData.channels;
|
|
16707
|
+
log.info('[channelsLoadMore] channelsData received:', JSON.stringify({
|
|
16708
|
+
channelsCount: (channelList === null || channelList === void 0 ? void 0 : channelList.length) || 0,
|
|
16709
|
+
hasNext: channelsData.hasNext
|
|
16710
|
+
}));
|
|
16711
|
+
_context6.n = 5;
|
|
16652
16712
|
return effects.put(channelHasNextAC(channelsData.hasNext));
|
|
16653
|
-
case
|
|
16654
|
-
|
|
16713
|
+
case 5:
|
|
16714
|
+
log.info('[channelsLoadMore] hasNext set to:', channelsData.hasNext);
|
|
16715
|
+
_context6.n = 6;
|
|
16655
16716
|
return effects.call(setChannelsInMap, channelsData.channels);
|
|
16656
|
-
case
|
|
16717
|
+
case 6:
|
|
16657
16718
|
_yield$call3 = _context6.v;
|
|
16658
16719
|
mappedChannels = _yield$call3.channels;
|
|
16659
16720
|
channelsForUpdateLastReactionMessage = _yield$call3.channelsForUpdateLastReactionMessage;
|
|
16660
|
-
|
|
16661
|
-
|
|
16721
|
+
log.info('[channelsLoadMore] setChannelsInMap result:', JSON.stringify({
|
|
16722
|
+
mappedChannelsCount: ((_mappedChannels5 = mappedChannels) === null || _mappedChannels5 === void 0 ? void 0 : _mappedChannels5.length) || 0,
|
|
16723
|
+
channelsForUpdateLastReactionMessageCount: (channelsForUpdateLastReactionMessage === null || channelsForUpdateLastReactionMessage === void 0 ? void 0 : channelsForUpdateLastReactionMessage.length) || 0
|
|
16724
|
+
}));
|
|
16725
|
+
if (!(channelsForUpdateLastReactionMessage !== null && channelsForUpdateLastReactionMessage !== void 0 && channelsForUpdateLastReactionMessage.length)) {
|
|
16726
|
+
_context6.n = 8;
|
|
16662
16727
|
break;
|
|
16663
16728
|
}
|
|
16729
|
+
log.info('[channelsLoadMore] processing channels for reaction message update:', channelsForUpdateLastReactionMessage === null || channelsForUpdateLastReactionMessage === void 0 ? void 0 : channelsForUpdateLastReactionMessage.length);
|
|
16664
16730
|
channelMessageMap = {};
|
|
16665
|
-
_context6.n =
|
|
16731
|
+
_context6.n = 7;
|
|
16666
16732
|
return effects.call(function () {
|
|
16667
16733
|
try {
|
|
16668
16734
|
return Promise.resolve(Promise.all(channelsForUpdateLastReactionMessage.map(function (channel) {
|
|
@@ -16670,9 +16736,10 @@ function channelsLoadMore(action) {
|
|
|
16670
16736
|
return Promise.resolve(new Promise(function (resolve) {
|
|
16671
16737
|
channel.getMessagesById([channel.newReactions[0].messageId]).then(function (messages) {
|
|
16672
16738
|
channelMessageMap[channel.id] = messages[0];
|
|
16739
|
+
log.info('[channelsLoadMore] successfully fetched reaction message for channel:', channel === null || channel === void 0 ? void 0 : channel.id);
|
|
16673
16740
|
resolve(true);
|
|
16674
16741
|
})["catch"](function (e) {
|
|
16675
|
-
log.error(e, 'Error on getMessagesById');
|
|
16742
|
+
log.error(e, 'Error on getMessagesById for channel:', channel === null || channel === void 0 ? void 0 : channel.id);
|
|
16676
16743
|
resolve(true);
|
|
16677
16744
|
});
|
|
16678
16745
|
}));
|
|
@@ -16684,30 +16751,43 @@ function channelsLoadMore(action) {
|
|
|
16684
16751
|
return Promise.reject(e);
|
|
16685
16752
|
}
|
|
16686
16753
|
});
|
|
16687
|
-
case
|
|
16754
|
+
case 7:
|
|
16755
|
+
log.info('[channelsLoadMore] reaction messages fetched:', channelMessageMap ? (_Object$keys2 = Object.keys(channelMessageMap)) === null || _Object$keys2 === void 0 ? void 0 : _Object$keys2.length : 0);
|
|
16688
16756
|
mappedChannels = mappedChannels.map(function (channel) {
|
|
16689
16757
|
if (channelMessageMap[channel.id]) {
|
|
16690
16758
|
channel.lastReactedMessage = channelMessageMap[channel.id];
|
|
16691
16759
|
}
|
|
16692
16760
|
return channel;
|
|
16693
16761
|
});
|
|
16694
|
-
|
|
16695
|
-
_context6.n =
|
|
16696
|
-
|
|
16697
|
-
case 7:
|
|
16698
|
-
_context6.n = 8;
|
|
16699
|
-
return effects.put(setChannelsLoadingStateAC(LOADING_STATE.LOADED));
|
|
16762
|
+
log.info('[channelsLoadMore] mappedChannels updated with reaction messages, final count:', ((_mappedChannels6 = mappedChannels) === null || _mappedChannels6 === void 0 ? void 0 : _mappedChannels6.length) || 0);
|
|
16763
|
+
_context6.n = 9;
|
|
16764
|
+
break;
|
|
16700
16765
|
case 8:
|
|
16766
|
+
log.info('[channelsLoadMore] no channels need reaction message update');
|
|
16767
|
+
case 9:
|
|
16768
|
+
log.info('[channelsLoadMore] adding channels to state, count:', ((_mappedChannels7 = mappedChannels) === null || _mappedChannels7 === void 0 ? void 0 : _mappedChannels7.length) || 0);
|
|
16701
16769
|
_context6.n = 10;
|
|
16770
|
+
return effects.put(addChannelsAC(mappedChannels));
|
|
16771
|
+
case 10:
|
|
16772
|
+
_context6.n = 11;
|
|
16773
|
+
return effects.put(setChannelsLoadingStateAC(LOADING_STATE.LOADED));
|
|
16774
|
+
case 11:
|
|
16775
|
+
log.info('[channelsLoadMore] completed successfully. Total channels added:', ((_mappedChannels8 = mappedChannels) === null || _mappedChannels8 === void 0 ? void 0 : _mappedChannels8.length) || 0);
|
|
16776
|
+
_context6.n = 13;
|
|
16702
16777
|
break;
|
|
16703
|
-
case
|
|
16704
|
-
_context6.p =
|
|
16778
|
+
case 12:
|
|
16779
|
+
_context6.p = 12;
|
|
16705
16780
|
_t8 = _context6.v;
|
|
16706
|
-
log.error(
|
|
16707
|
-
|
|
16781
|
+
log.error('[channelsLoadMore] error occurred:', _t8);
|
|
16782
|
+
log.error('[channelsLoadMore] error details:', JSON.stringify({
|
|
16783
|
+
message: _t8 === null || _t8 === void 0 ? void 0 : _t8.message,
|
|
16784
|
+
code: _t8 === null || _t8 === void 0 ? void 0 : _t8.code,
|
|
16785
|
+
stack: _t8 === null || _t8 === void 0 ? void 0 : _t8.stack
|
|
16786
|
+
}));
|
|
16787
|
+
case 13:
|
|
16708
16788
|
return _context6.a(2);
|
|
16709
16789
|
}
|
|
16710
|
-
}, _marked6, null, [[
|
|
16790
|
+
}, _marked6, null, [[1, 12]]);
|
|
16711
16791
|
}
|
|
16712
16792
|
function getChannelMentions(action) {
|
|
16713
16793
|
var payload, channelId, _SceytChatClient3, mentionsQueryBuilder, mentionsQuery, mentions, _t9;
|
|
@@ -17419,7 +17499,7 @@ function blockChannel(action) {
|
|
|
17419
17499
|
}, _marked20, null, [[0, 5]]);
|
|
17420
17500
|
}
|
|
17421
17501
|
function updateChannel(action) {
|
|
17422
|
-
var payload, channelId, config, _SceytChatClient6, channel, paramsToUpdate, fileToUpload, _yield$call5, subject, avatarUrl, metadata, _t22;
|
|
17502
|
+
var payload, channelId, config, _SceytChatClient6, channel, paramsToUpdate, fileToUpload, _yield$call5, subject, avatarUrl, metadata, onUpdateChannel, _channel3, _channel4, _channel5, fields, updatedChannel, _t22;
|
|
17423
17503
|
return _regenerator().w(function (_context21) {
|
|
17424
17504
|
while (1) switch (_context21.p = _context21.n) {
|
|
17425
17505
|
case 0:
|
|
@@ -17483,16 +17563,37 @@ function updateChannel(action) {
|
|
|
17483
17563
|
avatarUrl: avatarUrl,
|
|
17484
17564
|
metadata: isJSON(metadata) ? JSON.parse(metadata) : metadata
|
|
17485
17565
|
});
|
|
17486
|
-
|
|
17487
|
-
|
|
17566
|
+
onUpdateChannel = getOnUpdateChannel();
|
|
17567
|
+
if (!onUpdateChannel) {
|
|
17568
|
+
_context21.n = 7;
|
|
17569
|
+
break;
|
|
17570
|
+
}
|
|
17571
|
+
fields = [];
|
|
17572
|
+
if (((_channel3 = channel) === null || _channel3 === void 0 ? void 0 : _channel3.subject) !== subject) {
|
|
17573
|
+
fields.push('subject');
|
|
17574
|
+
}
|
|
17575
|
+
if (((_channel4 = channel) === null || _channel4 === void 0 ? void 0 : _channel4.avatarUrl) !== avatarUrl) {
|
|
17576
|
+
fields.push('avatarUrl');
|
|
17577
|
+
}
|
|
17578
|
+
if (JSON.stringify((_channel5 = channel) === null || _channel5 === void 0 ? void 0 : _channel5.metadata) !== metadata) {
|
|
17579
|
+
fields.push('metadata');
|
|
17580
|
+
}
|
|
17581
|
+
_context21.n = 6;
|
|
17582
|
+
return effects.call(getChannelFromMap, channelId);
|
|
17488
17583
|
case 6:
|
|
17489
|
-
|
|
17584
|
+
updatedChannel = _context21.v;
|
|
17585
|
+
onUpdateChannel(updatedChannel, fields);
|
|
17586
|
+
case 7:
|
|
17587
|
+
_context21.n = 9;
|
|
17588
|
+
break;
|
|
17589
|
+
case 8:
|
|
17590
|
+
_context21.p = 8;
|
|
17490
17591
|
_t22 = _context21.v;
|
|
17491
17592
|
log.error('ERROR in update channel', _t22.message);
|
|
17492
|
-
case
|
|
17593
|
+
case 9:
|
|
17493
17594
|
return _context21.a(2);
|
|
17494
17595
|
}
|
|
17495
|
-
}, _marked21, null, [[0,
|
|
17596
|
+
}, _marked21, null, [[0, 8]]);
|
|
17496
17597
|
}
|
|
17497
17598
|
function checkUsersStatus() {
|
|
17498
17599
|
var _SceytChatClient7, usersForUpdate, updatedUsers, usersToUpdateMap, update, updateData, _t23;
|
|
@@ -23319,7 +23420,8 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
23319
23420
|
disableFrowardMentionsCount = _ref$disableFrowardMe === void 0 ? false : _ref$disableFrowardMe,
|
|
23320
23421
|
chatMinWidth = _ref.chatMinWidth,
|
|
23321
23422
|
_ref$embeddedJoinGrou = _ref.embeddedJoinGroupPopup,
|
|
23322
|
-
embeddedJoinGroupPopup = _ref$embeddedJoinGrou === void 0 ? false : _ref$embeddedJoinGrou
|
|
23423
|
+
embeddedJoinGroupPopup = _ref$embeddedJoinGrou === void 0 ? false : _ref$embeddedJoinGrou,
|
|
23424
|
+
onUpdateChannel = _ref.onUpdateChannel;
|
|
23323
23425
|
var useInviteLink = getUseInviteLink();
|
|
23324
23426
|
var _useColor = useColors(),
|
|
23325
23427
|
backgroundColor = _useColor[THEME_COLORS.BACKGROUND],
|
|
@@ -23562,6 +23664,11 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
23562
23664
|
onJoin: handleJoinChannel,
|
|
23563
23665
|
channel: joinableChannel
|
|
23564
23666
|
})) : null;
|
|
23667
|
+
React.useEffect(function () {
|
|
23668
|
+
if (onUpdateChannel) {
|
|
23669
|
+
setOnUpdateChannel(onUpdateChannel);
|
|
23670
|
+
}
|
|
23671
|
+
}, [onUpdateChannel]);
|
|
23565
23672
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, SceytChatClient ? (/*#__PURE__*/React__default.createElement(ChatContainer, {
|
|
23566
23673
|
onDrop: handleDropFile,
|
|
23567
23674
|
onDragOver: handleDragOver,
|
|
@@ -23624,7 +23731,8 @@ var SceytChatContainer = function SceytChatContainer(_ref) {
|
|
|
23624
23731
|
ResetLinkConfirmModal: {}
|
|
23625
23732
|
} : _ref$inviteLinkOption,
|
|
23626
23733
|
_ref$embeddedJoinGrou = _ref.embeddedJoinGroupPopup,
|
|
23627
|
-
embeddedJoinGroupPopup = _ref$embeddedJoinGrou === void 0 ? false : _ref$embeddedJoinGrou
|
|
23734
|
+
embeddedJoinGroupPopup = _ref$embeddedJoinGrou === void 0 ? false : _ref$embeddedJoinGrou,
|
|
23735
|
+
onUpdateChannel = _ref.onUpdateChannel;
|
|
23628
23736
|
React.useEffect(function () {
|
|
23629
23737
|
log.setLevel(logLevel);
|
|
23630
23738
|
if (baseUrlForInviteMembers) {
|
|
@@ -23661,7 +23769,8 @@ var SceytChatContainer = function SceytChatContainer(_ref) {
|
|
|
23661
23769
|
memberCount: memberCount,
|
|
23662
23770
|
disableFrowardMentionsCount: disableFrowardMentionsCount,
|
|
23663
23771
|
chatMinWidth: chatMinWidth,
|
|
23664
|
-
embeddedJoinGroupPopup: embeddedJoinGroupPopup
|
|
23772
|
+
embeddedJoinGroupPopup: embeddedJoinGroupPopup,
|
|
23773
|
+
onUpdateChannel: onUpdateChannel
|
|
23665
23774
|
}));
|
|
23666
23775
|
};
|
|
23667
23776
|
|
|
@@ -32559,7 +32668,7 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
32559
32668
|
wavesurfer.current.seekTo(0);
|
|
32560
32669
|
var audioDuration = wavesurfer.current.getDuration();
|
|
32561
32670
|
setDuration(audioDuration);
|
|
32562
|
-
setCurrentTime(formatAudioVideoTime(
|
|
32671
|
+
setCurrentTime(formatAudioVideoTime(audioDuration));
|
|
32563
32672
|
setCurrentTimeSeconds(0);
|
|
32564
32673
|
if (playingAudioId === file.id) {
|
|
32565
32674
|
dispatch(setPlayingAudioIdAC(null));
|
|
@@ -35248,7 +35357,7 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
35248
35357
|
metadataGetSuccessCallback === null || metadataGetSuccessCallback === void 0 ? void 0 : metadataGetSuccessCallback(attachment === null || attachment === void 0 ? void 0 : attachment.url, false, false, metadata);
|
|
35249
35358
|
}
|
|
35250
35359
|
}
|
|
35251
|
-
}, [metadataLoaded, oGMetadata, attachment === null || attachment === void 0 ? void 0 : attachment.url, metadata, showOGMetadata, showImage
|
|
35360
|
+
}, [metadataLoaded, oGMetadata, attachment === null || attachment === void 0 ? void 0 : attachment.url, metadata, showOGMetadata, showImage]);
|
|
35252
35361
|
var elements = React.useMemo(function () {
|
|
35253
35362
|
var _resolvedOrder$image, _metadata$og17, _metadata$og17$image, _metadata$og17$image$, _resolvedOrder$title, _metadata$og18, _metadata$og18$title, _resolvedOrder$descri, _metadata$og19, _metadata$og19$descri, _resolvedOrder$link;
|
|
35254
35363
|
return [showImage ? {
|