sceyt-chat-react-uikit 1.7.6-beta.3 → 1.7.6-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +303 -290
- package/index.modern.js +303 -290
- package/package.json +1 -1
package/index.modern.js
CHANGED
|
@@ -14408,7 +14408,7 @@ function watchForEvents() {
|
|
|
14408
14408
|
};
|
|
14409
14409
|
});
|
|
14410
14410
|
_loop = /*#__PURE__*/_regenerator().m(function _callee2() {
|
|
14411
|
-
var _yield$take, type, args, createdChannel, channelFilterTypes, getFromContacts, channelExists, _chan, channel, _chan2, _channel, member, _channelExists, _activeChannelId, groupName, updateChannelData, _channel2, _channelExists2, _channel3, removedMembers, _activeChannelId2, _channelExists3, activeChannel, _updateChannelData, _groupName, _channel4, addedMembers, _activeChannelId3, _channelExists4, _updateChannelData2, _groupName2, updatedChannel, _channelExists5, subject, avatarUrl, muted, mutedTill, metadata, _activeChannelId4, _groupName3, _channel5, message, messageToHandle, _channelFilterTypes, _activeChannelId5, _channelExists6, channelForAdd, hasNextMessage, _groupName4, showNotifications, tabIsActive, _state$ThemeReducer$n, _state$ThemeReducer$n2, _state$ThemeReducer$n3, _state$ThemeReducer$n4, _state$ThemeReducer$n5, _state$ThemeReducer$n6, contactsMap, _getFromContacts, state, theme, accentColor, textSecondary, messageBody, channelId, markerList, _channel6, _activeChannelId6, updateLastMessage, markersMap, activeChannelMessages, lastMessage, _channelId, _channel7, _channel8, deletedMessage, _activeChannelId7, _channelExists7, _channel9, _message, _activeChannelId8, _channelExists8, _channel0, user, _message2, reaction, isSelf, _activeChannelId9, _state$ThemeReducer$n7, _state$ThemeReducer$n8, _state$ThemeReducer$n9, _state$ThemeReducer$n0, _state$ThemeReducer$n1, _state$ThemeReducer$n10, _contactsMap, _getFromContacts2, _state, _theme, _accentColor, _textSecondary, _messageBody, channelUpdateParams, _pollDetailsData$chan, _pollDetailsData$chan2, _channel1, pollDetails, messageId, pollDetailsData, _activeChannelId0, addedVotes, deletedVotes, objs,
|
|
14411
|
+
var _yield$take, type, args, createdChannel, channelFilterTypes, getFromContacts, channelExists, _chan, channel, _chan2, _channel, member, _channelExists, _activeChannelId, groupName, updateChannelData, _channel2, _channelExists2, _channel3, removedMembers, _activeChannelId2, _channelExists3, activeChannel, _updateChannelData, _groupName, _channel4, addedMembers, _activeChannelId3, _channelExists4, _updateChannelData2, _groupName2, updatedChannel, _channelExists5, subject, avatarUrl, muted, mutedTill, metadata, _activeChannelId4, _groupName3, _channel5, message, messageToHandle, _channelFilterTypes, _activeChannelId5, _channelExists6, channelForAdd, hasNextMessage, _groupName4, showNotifications, tabIsActive, _state$ThemeReducer$n, _state$ThemeReducer$n2, _state$ThemeReducer$n3, _state$ThemeReducer$n4, _state$ThemeReducer$n5, _state$ThemeReducer$n6, contactsMap, _getFromContacts, state, theme, accentColor, textSecondary, messageBody, channelId, markerList, _channel6, _activeChannelId6, updateLastMessage, markersMap, activeChannelMessages, _loop2, _iterator, _step, lastMessage, _channelId, _channel7, _channel8, deletedMessage, _activeChannelId7, _channelExists7, _channel9, _message, _activeChannelId8, _channelExists8, _channel0, user, _message2, reaction, isSelf, _activeChannelId9, _state$ThemeReducer$n7, _state$ThemeReducer$n8, _state$ThemeReducer$n9, _state$ThemeReducer$n0, _state$ThemeReducer$n1, _state$ThemeReducer$n10, _contactsMap, _getFromContacts2, _state, _theme, _accentColor, _textSecondary, _messageBody, channelUpdateParams, _pollDetailsData$chan, _pollDetailsData$chan2, _channel1, 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, _channel10, _pollDetails, _messageId, _pollDetailsData, _activeChannelId1, _deletedVotes, _objs3, _iterator4, _step4, _vote2, _i3, _objs4, _obj2, _i4, _objs5, _obj3, _pollDetailsData2$cha, _channel11, _pollDetails2, _messageId2, _activeChannelId10, _pollDetailsData2, retractedVotes, _objs6, _iterator5, _step5, _vote4, _i5, _objs7, _obj4, _iterator6, _step6, _vote3, _channel12, _messageId3, _activeChannelId11, _obj5, _channel13, _user, _message3, _reaction, channelFromMap, _isSelf, _activeChannelId12, _channelUpdateParams, _channel14, _updatedChannel, _channel15, _activeChannelId13, channelExist, _channel16, _channel17, _channel18, _channel19, _channel20, _channel21, _channel22, _groupName5, _channel23, _groupName6, _channel24, members, _activeChannelId14, i, _channel25, _channel26, _channelId2, from, name, status, _t, _t2;
|
|
14412
14412
|
return _regenerator().w(function (_context2) {
|
|
14413
14413
|
while (1) switch (_context2.p = _context2.n) {
|
|
14414
14414
|
case 0:
|
|
@@ -14420,7 +14420,7 @@ function watchForEvents() {
|
|
|
14420
14420
|
type = _yield$take.type;
|
|
14421
14421
|
args = _yield$take.args;
|
|
14422
14422
|
_t = type;
|
|
14423
|
-
_context2.n = _t === CHANNEL_EVENT_TYPES.CREATE ? 2 : _t === CHANNEL_EVENT_TYPES.JOIN ? 7 : _t === CHANNEL_EVENT_TYPES.LEAVE ? 9 : _t === CHANNEL_EVENT_TYPES.BLOCK ? 22 : _t === CHANNEL_EVENT_TYPES.UNBLOCK ? 24 : _t === CHANNEL_EVENT_TYPES.KICK_MEMBERS ? 25 : _t === CHANNEL_EVENT_TYPES.ADD_MEMBERS ? 36 : _t === CHANNEL_EVENT_TYPES.UPDATE_CHANNEL ? 46 : _t === CHANNEL_EVENT_TYPES.MESSAGE ? 51 : _t === CHANNEL_EVENT_TYPES.MESSAGE_MARKERS_RECEIVED ? 68 : _t === CHANNEL_EVENT_TYPES.DELETE ?
|
|
14423
|
+
_context2.n = _t === CHANNEL_EVENT_TYPES.CREATE ? 2 : _t === CHANNEL_EVENT_TYPES.JOIN ? 7 : _t === CHANNEL_EVENT_TYPES.LEAVE ? 9 : _t === CHANNEL_EVENT_TYPES.BLOCK ? 22 : _t === CHANNEL_EVENT_TYPES.UNBLOCK ? 24 : _t === CHANNEL_EVENT_TYPES.KICK_MEMBERS ? 25 : _t === CHANNEL_EVENT_TYPES.ADD_MEMBERS ? 36 : _t === CHANNEL_EVENT_TYPES.UPDATE_CHANNEL ? 46 : _t === CHANNEL_EVENT_TYPES.MESSAGE ? 51 : _t === CHANNEL_EVENT_TYPES.MESSAGE_MARKERS_RECEIVED ? 68 : _t === CHANNEL_EVENT_TYPES.DELETE ? 78 : _t === CHANNEL_EVENT_TYPES.DELETE_MESSAGE ? 80 : _t === CHANNEL_EVENT_TYPES.EDIT_MESSAGE ? 85 : _t === CHANNEL_EVENT_TYPES.REACTION_ADDED ? 90 : _t === CHANNEL_EVENT_TYPES.POLL_ADDED ? 98 : _t === CHANNEL_EVENT_TYPES.POLL_DELETED ? 108 : _t === CHANNEL_EVENT_TYPES.POLL_RETRACTED ? 116 : _t === CHANNEL_EVENT_TYPES.POLL_CLOSED ? 124 : _t === CHANNEL_EVENT_TYPES.REACTION_DELETED ? 128 : _t === CHANNEL_EVENT_TYPES.UNREAD_MESSAGES_INFO ? 133 : _t === CHANNEL_EVENT_TYPES.CLEAR_HISTORY ? 136 : _t === CHANNEL_EVENT_TYPES.MUTE ? 142 : _t === CHANNEL_EVENT_TYPES.UNMUTE ? 144 : _t === CHANNEL_EVENT_TYPES.PINED ? 146 : _t === CHANNEL_EVENT_TYPES.UNPINED ? 148 : _t === CHANNEL_EVENT_TYPES.HIDE ? 150 : _t === CHANNEL_EVENT_TYPES.UNHIDE ? 152 : _t === CHANNEL_EVENT_TYPES.CHANNEL_MARKED_AS_UNREAD ? 154 : _t === CHANNEL_EVENT_TYPES.CHANNEL_MARKED_AS_READ ? 157 : _t === CHANNEL_EVENT_TYPES.CHANGE_ROLE ? 160 : _t === CHANNEL_EVENT_TYPES.FROZEN ? 167 : _t === CHANNEL_EVENT_TYPES.UNFROZEN ? 168 : _t === CHANNEL_EVENT_TYPES.CHANNEL_EVENT ? 169 : _t === CONNECTION_EVENT_TYPES.CONNECTION_STATUS_CHANGED ? 178 : 181;
|
|
14424
14424
|
break;
|
|
14425
14425
|
case 2:
|
|
14426
14426
|
createdChannel = args.createdChannel;
|
|
@@ -14454,7 +14454,7 @@ function watchForEvents() {
|
|
|
14454
14454
|
addChannelToAllChannels(createdChannel);
|
|
14455
14455
|
}
|
|
14456
14456
|
case 6:
|
|
14457
|
-
return _context2.a(3,
|
|
14457
|
+
return _context2.a(3, 182);
|
|
14458
14458
|
case 7:
|
|
14459
14459
|
channel = args.channel;
|
|
14460
14460
|
log.info('channel JOIN ... . ', channel);
|
|
@@ -14465,7 +14465,7 @@ function watchForEvents() {
|
|
|
14465
14465
|
if (!_chan2) {
|
|
14466
14466
|
addChannelToAllChannels(channel);
|
|
14467
14467
|
}
|
|
14468
|
-
return _context2.a(3,
|
|
14468
|
+
return _context2.a(3, 182);
|
|
14469
14469
|
case 9:
|
|
14470
14470
|
_channel = args.channel, member = args.member;
|
|
14471
14471
|
log.info('channel LEAVE ... ', _channel, member);
|
|
@@ -14533,7 +14533,7 @@ function watchForEvents() {
|
|
|
14533
14533
|
mutedTill: _channel.mutedTill
|
|
14534
14534
|
});
|
|
14535
14535
|
case 21:
|
|
14536
|
-
return _context2.a(3,
|
|
14536
|
+
return _context2.a(3, 182);
|
|
14537
14537
|
case 22:
|
|
14538
14538
|
log.info('channel BLOCK ... ');
|
|
14539
14539
|
_channel2 = args.channel;
|
|
@@ -14545,10 +14545,10 @@ function watchForEvents() {
|
|
|
14545
14545
|
_context2.n = 23;
|
|
14546
14546
|
return put(removeChannelAC(_channel2.id));
|
|
14547
14547
|
case 23:
|
|
14548
|
-
return _context2.a(3,
|
|
14548
|
+
return _context2.a(3, 182);
|
|
14549
14549
|
case 24:
|
|
14550
14550
|
log.info('channel UNBLOCK ... ');
|
|
14551
|
-
return _context2.a(3,
|
|
14551
|
+
return _context2.a(3, 182);
|
|
14552
14552
|
case 25:
|
|
14553
14553
|
_channel3 = args.channel, removedMembers = args.removedMembers;
|
|
14554
14554
|
log.info('channel KICK_MEMBERS ... ', removedMembers);
|
|
@@ -14618,7 +14618,7 @@ function watchForEvents() {
|
|
|
14618
14618
|
muted: _channel3.muted,
|
|
14619
14619
|
mutedTill: _channel3.mutedTill
|
|
14620
14620
|
});
|
|
14621
|
-
return _context2.a(3,
|
|
14621
|
+
return _context2.a(3, 182);
|
|
14622
14622
|
case 36:
|
|
14623
14623
|
_channel4 = args.channel, addedMembers = args.addedMembers;
|
|
14624
14624
|
log.info('channel ADD_MEMBERS ... ', addedMembers);
|
|
@@ -14673,7 +14673,7 @@ function watchForEvents() {
|
|
|
14673
14673
|
muted: _channel4.muted,
|
|
14674
14674
|
mutedTill: _channel4.mutedTill
|
|
14675
14675
|
});
|
|
14676
|
-
return _context2.a(3,
|
|
14676
|
+
return _context2.a(3, 182);
|
|
14677
14677
|
case 46:
|
|
14678
14678
|
log.info('channel UPDATE_CHANNEL ... ');
|
|
14679
14679
|
updatedChannel = args.updatedChannel;
|
|
@@ -14720,7 +14720,7 @@ function watchForEvents() {
|
|
|
14720
14720
|
mutedTill: mutedTill,
|
|
14721
14721
|
metadata: isJSON(metadata) ? JSON.parse(metadata) : metadata
|
|
14722
14722
|
});
|
|
14723
|
-
return _context2.a(3,
|
|
14723
|
+
return _context2.a(3, 182);
|
|
14724
14724
|
case 51:
|
|
14725
14725
|
_channel5 = args.channel, message = args.message;
|
|
14726
14726
|
log.info('channel MESSAGE ... id : ', message.id, ', channel.id: ', _channel5.id);
|
|
@@ -14885,7 +14885,7 @@ function watchForEvents() {
|
|
|
14885
14885
|
});
|
|
14886
14886
|
updateChannelLastMessageOnAllChannels(_channel5.id, _channel5.lastMessage);
|
|
14887
14887
|
case 67:
|
|
14888
|
-
return _context2.a(3,
|
|
14888
|
+
return _context2.a(3, 182);
|
|
14889
14889
|
case 68:
|
|
14890
14890
|
channelId = args.channelId, markerList = args.markerList;
|
|
14891
14891
|
_context2.n = 69;
|
|
@@ -14894,7 +14894,7 @@ function watchForEvents() {
|
|
|
14894
14894
|
_channel6 = _context2.v;
|
|
14895
14895
|
log.info('channel MESSAGE_MARKERS_RECEIVED ... channel: ', _channel6, 'markers list: ', markerList);
|
|
14896
14896
|
if (!_channel6) {
|
|
14897
|
-
_context2.n =
|
|
14897
|
+
_context2.n = 77;
|
|
14898
14898
|
break;
|
|
14899
14899
|
}
|
|
14900
14900
|
_context2.n = 70;
|
|
@@ -14904,11 +14904,12 @@ function watchForEvents() {
|
|
|
14904
14904
|
updateLastMessage = false;
|
|
14905
14905
|
markersMap = {};
|
|
14906
14906
|
activeChannelMessages = getMessagesFromMap(_activeChannelId6);
|
|
14907
|
-
|
|
14908
|
-
var isPendingMessage;
|
|
14907
|
+
_loop2 = /*#__PURE__*/_regenerator().m(function _callee() {
|
|
14908
|
+
var messageId, isPendingMessage;
|
|
14909
14909
|
return _regenerator().w(function (_context) {
|
|
14910
14910
|
while (1) switch (_context.n) {
|
|
14911
14911
|
case 0:
|
|
14912
|
+
messageId = _step.value;
|
|
14912
14913
|
if (!(activeChannelMessages !== null && activeChannelMessages !== void 0 && activeChannelMessages.find(function (message) {
|
|
14913
14914
|
return message.id === messageId;
|
|
14914
14915
|
}))) {
|
|
@@ -14942,100 +14943,111 @@ function watchForEvents() {
|
|
|
14942
14943
|
return _context.a(2);
|
|
14943
14944
|
}
|
|
14944
14945
|
}, _callee);
|
|
14945
|
-
})
|
|
14946
|
+
});
|
|
14947
|
+
_iterator = _createForOfIteratorHelperLoose(markerList.messageIds);
|
|
14948
|
+
case 71:
|
|
14949
|
+
if ((_step = _iterator()).done) {
|
|
14950
|
+
_context2.n = 73;
|
|
14951
|
+
break;
|
|
14952
|
+
}
|
|
14953
|
+
return _context2.d(_regeneratorValues(_loop2()), 72);
|
|
14954
|
+
case 72:
|
|
14955
|
+
_context2.n = 71;
|
|
14956
|
+
break;
|
|
14957
|
+
case 73:
|
|
14946
14958
|
if (!updateLastMessage) {
|
|
14947
|
-
_context2.n =
|
|
14959
|
+
_context2.n = 74;
|
|
14948
14960
|
break;
|
|
14949
14961
|
}
|
|
14950
14962
|
lastMessage = _extends({}, _channel6.lastMessage, {
|
|
14951
14963
|
deliveryStatus: markerList.name
|
|
14952
14964
|
});
|
|
14953
14965
|
updateChannelLastMessageOnAllChannels(_channel6.id, lastMessage);
|
|
14954
|
-
_context2.n =
|
|
14966
|
+
_context2.n = 74;
|
|
14955
14967
|
return put(updateChannelLastMessageStatusAC(lastMessage, _channel6));
|
|
14956
|
-
case
|
|
14968
|
+
case 74:
|
|
14957
14969
|
if (!(_activeChannelId6 === channelId)) {
|
|
14958
|
-
_context2.n =
|
|
14970
|
+
_context2.n = 76;
|
|
14959
14971
|
break;
|
|
14960
14972
|
}
|
|
14961
|
-
_context2.n =
|
|
14973
|
+
_context2.n = 75;
|
|
14962
14974
|
return put(updateMessagesStatusAC(markerList.name, markersMap));
|
|
14963
|
-
case
|
|
14975
|
+
case 75:
|
|
14964
14976
|
updateMarkersOnAllMessages(markersMap, markerList.name);
|
|
14965
|
-
case
|
|
14977
|
+
case 76:
|
|
14966
14978
|
updateMessageStatusOnMap(_channel6.id, {
|
|
14967
14979
|
name: markerList.name,
|
|
14968
14980
|
markersMap: markersMap
|
|
14969
14981
|
});
|
|
14970
|
-
_context2.n =
|
|
14982
|
+
_context2.n = 77;
|
|
14971
14983
|
return put(updateMessagesMarkersAC(channelId, markerList.name, markerList));
|
|
14972
|
-
case
|
|
14973
|
-
return _context2.a(3,
|
|
14974
|
-
case
|
|
14984
|
+
case 77:
|
|
14985
|
+
return _context2.a(3, 182);
|
|
14986
|
+
case 78:
|
|
14975
14987
|
_channelId = args.channelId;
|
|
14976
14988
|
log.info('channel DELETE ... ');
|
|
14977
14989
|
_channel7 = getChannelFromMap(_channelId);
|
|
14978
|
-
_context2.n =
|
|
14990
|
+
_context2.n = 79;
|
|
14979
14991
|
return put(setChannelToRemoveAC(_channel7));
|
|
14980
|
-
case
|
|
14992
|
+
case 79:
|
|
14981
14993
|
deleteChannelFromAllChannels(_channelId);
|
|
14982
|
-
return _context2.a(3,
|
|
14983
|
-
case
|
|
14994
|
+
return _context2.a(3, 182);
|
|
14995
|
+
case 80:
|
|
14984
14996
|
_channel8 = args.channel, deletedMessage = args.deletedMessage;
|
|
14985
|
-
_context2.n =
|
|
14997
|
+
_context2.n = 81;
|
|
14986
14998
|
return call(getActiveChannelId);
|
|
14987
|
-
case
|
|
14999
|
+
case 81:
|
|
14988
15000
|
_activeChannelId7 = _context2.v;
|
|
14989
15001
|
log.info('channel DELETE_MESSAGE ... ');
|
|
14990
15002
|
_channelExists7 = checkChannelExists(_channel8.id);
|
|
14991
15003
|
if (!(_channel8.id === _activeChannelId7)) {
|
|
14992
|
-
_context2.n =
|
|
15004
|
+
_context2.n = 82;
|
|
14993
15005
|
break;
|
|
14994
15006
|
}
|
|
14995
15007
|
updateMessageOnAllMessages(deletedMessage.id, deletedMessage);
|
|
14996
|
-
_context2.n =
|
|
15008
|
+
_context2.n = 82;
|
|
14997
15009
|
return put(updateMessageAC(deletedMessage.id, deletedMessage));
|
|
14998
|
-
case
|
|
15010
|
+
case 82:
|
|
14999
15011
|
updateMessageOnMap(_channel8.id, {
|
|
15000
15012
|
messageId: deletedMessage.id,
|
|
15001
15013
|
params: deletedMessage
|
|
15002
15014
|
});
|
|
15003
15015
|
if (!_channelExists7) {
|
|
15004
|
-
_context2.n =
|
|
15016
|
+
_context2.n = 84;
|
|
15005
15017
|
break;
|
|
15006
15018
|
}
|
|
15007
|
-
_context2.n =
|
|
15019
|
+
_context2.n = 83;
|
|
15008
15020
|
return put(updateChannelDataAC(_channel8.id, {
|
|
15009
15021
|
newMessageCount: _channel8.newMessageCount,
|
|
15010
15022
|
muted: _channel8.muted,
|
|
15011
15023
|
mutedTill: _channel8.mutedTill
|
|
15012
15024
|
}));
|
|
15013
|
-
case
|
|
15025
|
+
case 83:
|
|
15014
15026
|
if (!(_channel8.lastMessage.id === deletedMessage.id)) {
|
|
15015
|
-
_context2.n =
|
|
15027
|
+
_context2.n = 84;
|
|
15016
15028
|
break;
|
|
15017
15029
|
}
|
|
15018
|
-
_context2.n =
|
|
15030
|
+
_context2.n = 84;
|
|
15019
15031
|
return put(updateChannelLastMessageAC(deletedMessage, _channel8));
|
|
15020
|
-
case
|
|
15032
|
+
case 84:
|
|
15021
15033
|
updateChannelOnAllChannels(_channel8.id, {
|
|
15022
15034
|
newMessageCount: _channel8.newMessageCount,
|
|
15023
15035
|
muted: _channel8.muted,
|
|
15024
15036
|
mutedTill: _channel8.mutedTill
|
|
15025
15037
|
}, deletedMessage);
|
|
15026
|
-
return _context2.a(3,
|
|
15027
|
-
case
|
|
15038
|
+
return _context2.a(3, 182);
|
|
15039
|
+
case 85:
|
|
15028
15040
|
_channel9 = args.channel, _message = args.message;
|
|
15029
|
-
_context2.n =
|
|
15041
|
+
_context2.n = 86;
|
|
15030
15042
|
return call(getActiveChannelId);
|
|
15031
|
-
case
|
|
15043
|
+
case 86:
|
|
15032
15044
|
_activeChannelId8 = _context2.v;
|
|
15033
15045
|
_channelExists8 = checkChannelExists(_channel9.id);
|
|
15034
15046
|
if (!(_channel9.id === _activeChannelId8)) {
|
|
15035
|
-
_context2.n =
|
|
15047
|
+
_context2.n = 88;
|
|
15036
15048
|
break;
|
|
15037
15049
|
}
|
|
15038
|
-
_context2.n =
|
|
15050
|
+
_context2.n = 87;
|
|
15039
15051
|
return put(updateMessageAC(_message.id, {
|
|
15040
15052
|
body: _message.body,
|
|
15041
15053
|
state: _message.state,
|
|
@@ -15044,7 +15056,7 @@ function watchForEvents() {
|
|
|
15044
15056
|
mentionedUsers: _message.mentionedUsers,
|
|
15045
15057
|
updatedAt: _message.updatedAt
|
|
15046
15058
|
}));
|
|
15047
|
-
case
|
|
15059
|
+
case 87:
|
|
15048
15060
|
updateMessageOnAllMessages(_message.id, {
|
|
15049
15061
|
body: _message.body,
|
|
15050
15062
|
state: _message.state,
|
|
@@ -15053,18 +15065,18 @@ function watchForEvents() {
|
|
|
15053
15065
|
mentionedUsers: _message.mentionedUsers,
|
|
15054
15066
|
updatedAt: _message.updatedAt
|
|
15055
15067
|
});
|
|
15056
|
-
case
|
|
15068
|
+
case 88:
|
|
15057
15069
|
if (!_channelExists8) {
|
|
15058
|
-
_context2.n =
|
|
15070
|
+
_context2.n = 89;
|
|
15059
15071
|
break;
|
|
15060
15072
|
}
|
|
15061
15073
|
if (!(_channel9.lastMessage.id === _message.id)) {
|
|
15062
|
-
_context2.n =
|
|
15074
|
+
_context2.n = 89;
|
|
15063
15075
|
break;
|
|
15064
15076
|
}
|
|
15065
|
-
_context2.n =
|
|
15077
|
+
_context2.n = 89;
|
|
15066
15078
|
return put(updateChannelLastMessageAC(_message, _channel9));
|
|
15067
|
-
case
|
|
15079
|
+
case 89:
|
|
15068
15080
|
if (checkChannelExistsOnMessagesMap(_channel9.id)) {
|
|
15069
15081
|
updateMessageOnMap(_channel9.id, {
|
|
15070
15082
|
messageId: _message.id,
|
|
@@ -15072,38 +15084,38 @@ function watchForEvents() {
|
|
|
15072
15084
|
});
|
|
15073
15085
|
}
|
|
15074
15086
|
updateChannelOnAllChannels(_channel9.id, {}, _message);
|
|
15075
|
-
return _context2.a(3,
|
|
15076
|
-
case
|
|
15087
|
+
return _context2.a(3, 182);
|
|
15088
|
+
case 90:
|
|
15077
15089
|
_channel0 = args.channel, user = args.user, _message2 = args.message, reaction = args.reaction;
|
|
15078
15090
|
isSelf = user.id === SceytChatClient.user.id;
|
|
15079
|
-
_context2.n =
|
|
15091
|
+
_context2.n = 91;
|
|
15080
15092
|
return call(getActiveChannelId);
|
|
15081
|
-
case
|
|
15093
|
+
case 91:
|
|
15082
15094
|
_activeChannelId9 = _context2.v;
|
|
15083
15095
|
if (!(_channel0.id === _activeChannelId9)) {
|
|
15084
|
-
_context2.n =
|
|
15096
|
+
_context2.n = 93;
|
|
15085
15097
|
break;
|
|
15086
15098
|
}
|
|
15087
|
-
_context2.n =
|
|
15099
|
+
_context2.n = 92;
|
|
15088
15100
|
return put(addReactionToMessageAC(_message2, reaction, isSelf));
|
|
15089
|
-
case
|
|
15101
|
+
case 92:
|
|
15090
15102
|
addReactionOnAllMessages(_message2, reaction, true);
|
|
15091
|
-
case
|
|
15103
|
+
case 93:
|
|
15092
15104
|
if (!(_message2.user.id === SceytChatClient.user.id)) {
|
|
15093
|
-
_context2.n =
|
|
15105
|
+
_context2.n = 97;
|
|
15094
15106
|
break;
|
|
15095
15107
|
}
|
|
15096
15108
|
if (!(!isSelf && Notification.permission === 'granted')) {
|
|
15097
|
-
_context2.n =
|
|
15109
|
+
_context2.n = 95;
|
|
15098
15110
|
break;
|
|
15099
15111
|
}
|
|
15100
15112
|
if (!(document.visibilityState !== 'visible' || _channel0.id !== _activeChannelId9)) {
|
|
15101
|
-
_context2.n =
|
|
15113
|
+
_context2.n = 95;
|
|
15102
15114
|
break;
|
|
15103
15115
|
}
|
|
15104
|
-
_context2.n =
|
|
15116
|
+
_context2.n = 94;
|
|
15105
15117
|
return select(contactsMapSelector);
|
|
15106
|
-
case
|
|
15118
|
+
case 94:
|
|
15107
15119
|
_contactsMap = _context2.v;
|
|
15108
15120
|
_getFromContacts2 = getShowOnlyContactUsers();
|
|
15109
15121
|
_state = store.getState();
|
|
@@ -15123,9 +15135,9 @@ function watchForEvents() {
|
|
|
15123
15135
|
setNotification(_messageBody, reaction.user, _channel0, reaction.key, _message2.attachments && _message2.attachments.length ? _message2.attachments.find(function (att) {
|
|
15124
15136
|
return att.type !== attachmentTypes.link;
|
|
15125
15137
|
}) : undefined);
|
|
15126
|
-
case
|
|
15138
|
+
case 95:
|
|
15127
15139
|
if (!(_channel0.newReactions && _channel0.newReactions.length)) {
|
|
15128
|
-
_context2.n =
|
|
15140
|
+
_context2.n = 96;
|
|
15129
15141
|
break;
|
|
15130
15142
|
}
|
|
15131
15143
|
channelUpdateParams = {
|
|
@@ -15135,9 +15147,9 @@ function watchForEvents() {
|
|
|
15135
15147
|
muted: _channel0.muted,
|
|
15136
15148
|
mutedTill: _channel0.mutedTill
|
|
15137
15149
|
};
|
|
15138
|
-
_context2.n =
|
|
15150
|
+
_context2.n = 96;
|
|
15139
15151
|
return put(updateChannelDataAC(_channel0.id, channelUpdateParams));
|
|
15140
|
-
case
|
|
15152
|
+
case 96:
|
|
15141
15153
|
updateChannelOnAllChannels(_channel0.id, {
|
|
15142
15154
|
userMessageReactions: _channel0.newReactions,
|
|
15143
15155
|
lastReactedMessage: _message2,
|
|
@@ -15145,31 +15157,31 @@ function watchForEvents() {
|
|
|
15145
15157
|
muted: _channel0.muted,
|
|
15146
15158
|
mutedTill: _channel0.mutedTill
|
|
15147
15159
|
});
|
|
15148
|
-
case
|
|
15160
|
+
case 97:
|
|
15149
15161
|
if (checkChannelExistsOnMessagesMap(_channel0.id)) {
|
|
15150
15162
|
addReactionToMessageOnMap(_channel0.id, _message2, reaction, true);
|
|
15151
15163
|
}
|
|
15152
|
-
return _context2.a(3,
|
|
15153
|
-
case
|
|
15164
|
+
return _context2.a(3, 182);
|
|
15165
|
+
case 98:
|
|
15154
15166
|
_channel1 = args.channel, pollDetails = args.pollDetails, messageId = args.messageId;
|
|
15155
15167
|
pollDetailsData = pollDetails;
|
|
15156
|
-
_context2.n =
|
|
15168
|
+
_context2.n = 99;
|
|
15157
15169
|
return call(getActiveChannelId);
|
|
15158
|
-
case
|
|
15170
|
+
case 99:
|
|
15159
15171
|
_activeChannelId0 = _context2.v;
|
|
15160
15172
|
addedVotes = (pollDetailsData === null || pollDetailsData === void 0 ? void 0 : (_pollDetailsData$chan = pollDetailsData.changedVotes) === null || _pollDetailsData$chan === void 0 ? void 0 : _pollDetailsData$chan.addedVotes) || [];
|
|
15161
15173
|
deletedVotes = (pollDetailsData === null || pollDetailsData === void 0 ? void 0 : (_pollDetailsData$chan2 = pollDetailsData.changedVotes) === null || _pollDetailsData$chan2 === void 0 ? void 0 : _pollDetailsData$chan2.removedVotes) || [];
|
|
15162
15174
|
objs = [];
|
|
15163
|
-
for (
|
|
15164
|
-
vote =
|
|
15175
|
+
for (_iterator2 = _createForOfIteratorHelperLoose(deletedVotes); !(_step2 = _iterator2()).done;) {
|
|
15176
|
+
vote = _step2.value;
|
|
15165
15177
|
objs.push({
|
|
15166
15178
|
type: vote.user.id === SceytChatClient.user.id ? 'deleteOwn' : 'delete',
|
|
15167
15179
|
vote: vote,
|
|
15168
15180
|
incrementVotesPerOptionCount: -((deletedVotes === null || deletedVotes === void 0 ? void 0 : deletedVotes.length) || 0)
|
|
15169
15181
|
});
|
|
15170
15182
|
}
|
|
15171
|
-
for (
|
|
15172
|
-
_vote =
|
|
15183
|
+
for (_iterator3 = _createForOfIteratorHelperLoose(addedVotes); !(_step3 = _iterator3()).done;) {
|
|
15184
|
+
_vote = _step3.value;
|
|
15173
15185
|
objs.push({
|
|
15174
15186
|
type: _vote.user.id === SceytChatClient.user.id ? 'addOwn' : 'add',
|
|
15175
15187
|
vote: _vote,
|
|
@@ -15177,39 +15189,39 @@ function watchForEvents() {
|
|
|
15177
15189
|
});
|
|
15178
15190
|
}
|
|
15179
15191
|
_i = 0, _objs = objs;
|
|
15180
|
-
case
|
|
15192
|
+
case 100:
|
|
15181
15193
|
if (!(_i < _objs.length)) {
|
|
15182
|
-
_context2.n =
|
|
15194
|
+
_context2.n = 104;
|
|
15183
15195
|
break;
|
|
15184
15196
|
}
|
|
15185
15197
|
obj = _objs[_i];
|
|
15186
15198
|
if (!(pollDetailsData !== null && pollDetailsData !== void 0 && pollDetailsData.id && obj.vote)) {
|
|
15187
|
-
_context2.n =
|
|
15199
|
+
_context2.n = 103;
|
|
15188
15200
|
break;
|
|
15189
15201
|
}
|
|
15190
15202
|
key = pollDetailsData.id + "_" + obj.vote.optionId;
|
|
15191
15203
|
hasNext = ((_store$getState$Messa = store.getState().MessageReducer.pollVotesHasMore) === null || _store$getState$Messa === void 0 ? void 0 : _store$getState$Messa[key]) || false;
|
|
15192
15204
|
if (!(obj.type === 'addOwn')) {
|
|
15193
|
-
_context2.n =
|
|
15205
|
+
_context2.n = 102;
|
|
15194
15206
|
break;
|
|
15195
15207
|
}
|
|
15196
|
-
_context2.n =
|
|
15208
|
+
_context2.n = 101;
|
|
15197
15209
|
return put(addPollVotesToListAC(pollDetailsData.id, obj.vote.optionId, [obj.vote], hasNext, undefined));
|
|
15198
|
-
case
|
|
15199
|
-
_context2.n =
|
|
15210
|
+
case 101:
|
|
15211
|
+
_context2.n = 103;
|
|
15200
15212
|
break;
|
|
15201
|
-
case
|
|
15202
|
-
_context2.n =
|
|
15213
|
+
case 102:
|
|
15214
|
+
_context2.n = 103;
|
|
15203
15215
|
return put(deletePollVotesFromListAC(pollDetailsData.id, obj.vote.optionId, [obj.vote], messageId));
|
|
15204
|
-
case
|
|
15216
|
+
case 103:
|
|
15205
15217
|
_i++;
|
|
15206
|
-
_context2.n =
|
|
15218
|
+
_context2.n = 100;
|
|
15207
15219
|
break;
|
|
15208
|
-
case
|
|
15220
|
+
case 104:
|
|
15209
15221
|
_i2 = 0, _objs2 = objs;
|
|
15210
|
-
case
|
|
15222
|
+
case 105:
|
|
15211
15223
|
if (!(_i2 < _objs2.length)) {
|
|
15212
|
-
_context2.n =
|
|
15224
|
+
_context2.n = 107;
|
|
15213
15225
|
break;
|
|
15214
15226
|
}
|
|
15215
15227
|
_obj = _objs2[_i2];
|
|
@@ -15222,29 +15234,29 @@ function watchForEvents() {
|
|
|
15222
15234
|
incrementVotesPerOptionCount: _obj.incrementVotesPerOptionCount
|
|
15223
15235
|
});
|
|
15224
15236
|
if (!(_channel1.id === _activeChannelId0)) {
|
|
15225
|
-
_context2.n =
|
|
15237
|
+
_context2.n = 106;
|
|
15226
15238
|
break;
|
|
15227
15239
|
}
|
|
15228
15240
|
updateMessageOnAllMessages(messageId, {}, _obj);
|
|
15229
|
-
_context2.n =
|
|
15241
|
+
_context2.n = 106;
|
|
15230
15242
|
return put(updateMessageAC(messageId, {}, undefined, _obj));
|
|
15231
|
-
case
|
|
15243
|
+
case 106:
|
|
15232
15244
|
_i2++;
|
|
15233
|
-
_context2.n =
|
|
15245
|
+
_context2.n = 105;
|
|
15234
15246
|
break;
|
|
15235
|
-
case
|
|
15236
|
-
return _context2.a(3,
|
|
15237
|
-
case
|
|
15247
|
+
case 107:
|
|
15248
|
+
return _context2.a(3, 182);
|
|
15249
|
+
case 108:
|
|
15238
15250
|
_channel10 = args.channel, _pollDetails = args.pollDetails, _messageId = args.messageId;
|
|
15239
15251
|
_pollDetailsData = _pollDetails;
|
|
15240
|
-
_context2.n =
|
|
15252
|
+
_context2.n = 109;
|
|
15241
15253
|
return call(getActiveChannelId);
|
|
15242
|
-
case
|
|
15254
|
+
case 109:
|
|
15243
15255
|
_activeChannelId1 = _context2.v;
|
|
15244
15256
|
_deletedVotes = (_pollDetailsData === null || _pollDetailsData === void 0 ? void 0 : (_pollDetailsData$chan3 = _pollDetailsData.changedVotes) === null || _pollDetailsData$chan3 === void 0 ? void 0 : _pollDetailsData$chan3.removedVotes) || [];
|
|
15245
15257
|
_objs3 = [];
|
|
15246
|
-
for (
|
|
15247
|
-
_vote2 =
|
|
15258
|
+
for (_iterator4 = _createForOfIteratorHelperLoose(_deletedVotes); !(_step4 = _iterator4()).done;) {
|
|
15259
|
+
_vote2 = _step4.value;
|
|
15248
15260
|
_objs3.push({
|
|
15249
15261
|
type: _vote2.user.id === SceytChatClient.user.id ? 'deleteOwn' : 'delete',
|
|
15250
15262
|
vote: _vote2,
|
|
@@ -15252,27 +15264,27 @@ function watchForEvents() {
|
|
|
15252
15264
|
});
|
|
15253
15265
|
}
|
|
15254
15266
|
_i3 = 0, _objs4 = _objs3;
|
|
15255
|
-
case
|
|
15267
|
+
case 110:
|
|
15256
15268
|
if (!(_i3 < _objs4.length)) {
|
|
15257
|
-
_context2.n =
|
|
15269
|
+
_context2.n = 112;
|
|
15258
15270
|
break;
|
|
15259
15271
|
}
|
|
15260
15272
|
_obj2 = _objs4[_i3];
|
|
15261
15273
|
if (!(_pollDetailsData !== null && _pollDetailsData !== void 0 && _pollDetailsData.id && _obj2.vote)) {
|
|
15262
|
-
_context2.n =
|
|
15274
|
+
_context2.n = 111;
|
|
15263
15275
|
break;
|
|
15264
15276
|
}
|
|
15265
|
-
_context2.n =
|
|
15277
|
+
_context2.n = 111;
|
|
15266
15278
|
return put(deletePollVotesFromListAC(_pollDetailsData.id, _obj2.vote.optionId, [_obj2.vote], _messageId));
|
|
15267
|
-
case
|
|
15279
|
+
case 111:
|
|
15268
15280
|
_i3++;
|
|
15269
|
-
_context2.n =
|
|
15281
|
+
_context2.n = 110;
|
|
15270
15282
|
break;
|
|
15271
|
-
case
|
|
15283
|
+
case 112:
|
|
15272
15284
|
_i4 = 0, _objs5 = _objs3;
|
|
15273
|
-
case
|
|
15285
|
+
case 113:
|
|
15274
15286
|
if (!(_i4 < _objs5.length)) {
|
|
15275
|
-
_context2.n =
|
|
15287
|
+
_context2.n = 115;
|
|
15276
15288
|
break;
|
|
15277
15289
|
}
|
|
15278
15290
|
_obj3 = _objs5[_i4];
|
|
@@ -15281,29 +15293,29 @@ function watchForEvents() {
|
|
|
15281
15293
|
params: {}
|
|
15282
15294
|
}, _obj3);
|
|
15283
15295
|
if (!(_channel10.id === _activeChannelId1)) {
|
|
15284
|
-
_context2.n =
|
|
15296
|
+
_context2.n = 114;
|
|
15285
15297
|
break;
|
|
15286
15298
|
}
|
|
15287
15299
|
updateMessageOnAllMessages(_messageId, {}, _obj3);
|
|
15288
|
-
_context2.n =
|
|
15300
|
+
_context2.n = 114;
|
|
15289
15301
|
return put(updateMessageAC(_messageId, {}, undefined, _obj3));
|
|
15290
|
-
case
|
|
15302
|
+
case 114:
|
|
15291
15303
|
_i4++;
|
|
15292
|
-
_context2.n =
|
|
15304
|
+
_context2.n = 113;
|
|
15293
15305
|
break;
|
|
15294
|
-
case
|
|
15295
|
-
return _context2.a(3,
|
|
15296
|
-
case
|
|
15306
|
+
case 115:
|
|
15307
|
+
return _context2.a(3, 182);
|
|
15308
|
+
case 116:
|
|
15297
15309
|
_channel11 = args.channel, _pollDetails2 = args.pollDetails, _messageId2 = args.messageId;
|
|
15298
|
-
_context2.n =
|
|
15310
|
+
_context2.n = 117;
|
|
15299
15311
|
return call(getActiveChannelId);
|
|
15300
|
-
case
|
|
15312
|
+
case 117:
|
|
15301
15313
|
_activeChannelId10 = _context2.v;
|
|
15302
15314
|
_pollDetailsData2 = _pollDetails2;
|
|
15303
15315
|
retractedVotes = (_pollDetailsData2 === null || _pollDetailsData2 === void 0 ? void 0 : (_pollDetailsData2$cha = _pollDetailsData2.changedVotes) === null || _pollDetailsData2$cha === void 0 ? void 0 : _pollDetailsData2$cha.removedVotes) || [];
|
|
15304
15316
|
_objs6 = [];
|
|
15305
|
-
for (
|
|
15306
|
-
_vote4 =
|
|
15317
|
+
for (_iterator5 = _createForOfIteratorHelperLoose(retractedVotes); !(_step5 = _iterator5()).done;) {
|
|
15318
|
+
_vote4 = _step5.value;
|
|
15307
15319
|
_objs6.push({
|
|
15308
15320
|
type: _vote4.user.id === SceytChatClient.user.id ? 'deleteOwn' : 'delete',
|
|
15309
15321
|
vote: _vote4,
|
|
@@ -15311,9 +15323,9 @@ function watchForEvents() {
|
|
|
15311
15323
|
});
|
|
15312
15324
|
}
|
|
15313
15325
|
_i5 = 0, _objs7 = _objs6;
|
|
15314
|
-
case
|
|
15326
|
+
case 118:
|
|
15315
15327
|
if (!(_i5 < _objs7.length)) {
|
|
15316
|
-
_context2.n =
|
|
15328
|
+
_context2.n = 123;
|
|
15317
15329
|
break;
|
|
15318
15330
|
}
|
|
15319
15331
|
_obj4 = _objs7[_i5];
|
|
@@ -15322,40 +15334,40 @@ function watchForEvents() {
|
|
|
15322
15334
|
params: {}
|
|
15323
15335
|
}, _obj4);
|
|
15324
15336
|
if (!(_pollDetailsData2 !== null && _pollDetailsData2 !== void 0 && _pollDetailsData2.id && retractedVotes.length > 0)) {
|
|
15325
|
-
_context2.n =
|
|
15337
|
+
_context2.n = 121;
|
|
15326
15338
|
break;
|
|
15327
15339
|
}
|
|
15328
|
-
|
|
15329
|
-
case
|
|
15330
|
-
if ((
|
|
15331
|
-
_context2.n =
|
|
15340
|
+
_iterator6 = _createForOfIteratorHelperLoose(retractedVotes);
|
|
15341
|
+
case 119:
|
|
15342
|
+
if ((_step6 = _iterator6()).done) {
|
|
15343
|
+
_context2.n = 121;
|
|
15332
15344
|
break;
|
|
15333
15345
|
}
|
|
15334
|
-
_vote3 =
|
|
15335
|
-
_context2.n =
|
|
15346
|
+
_vote3 = _step6.value;
|
|
15347
|
+
_context2.n = 120;
|
|
15336
15348
|
return put(deletePollVotesFromListAC(_pollDetailsData2.id, _vote3.optionId, [_vote3], _messageId2));
|
|
15337
|
-
case
|
|
15338
|
-
_context2.n =
|
|
15349
|
+
case 120:
|
|
15350
|
+
_context2.n = 119;
|
|
15339
15351
|
break;
|
|
15340
|
-
case
|
|
15352
|
+
case 121:
|
|
15341
15353
|
if (!(_channel11.id === _activeChannelId10)) {
|
|
15342
|
-
_context2.n =
|
|
15354
|
+
_context2.n = 122;
|
|
15343
15355
|
break;
|
|
15344
15356
|
}
|
|
15345
15357
|
updateMessageOnAllMessages(_messageId2, {}, _obj4);
|
|
15346
|
-
_context2.n =
|
|
15358
|
+
_context2.n = 122;
|
|
15347
15359
|
return put(updateMessageAC(_messageId2, {}, undefined, _obj4));
|
|
15348
|
-
case
|
|
15360
|
+
case 122:
|
|
15349
15361
|
_i5++;
|
|
15350
|
-
_context2.n =
|
|
15362
|
+
_context2.n = 118;
|
|
15351
15363
|
break;
|
|
15352
|
-
case
|
|
15353
|
-
return _context2.a(3,
|
|
15354
|
-
case
|
|
15364
|
+
case 123:
|
|
15365
|
+
return _context2.a(3, 182);
|
|
15366
|
+
case 124:
|
|
15355
15367
|
_channel12 = args.channel, _messageId3 = args.messageId;
|
|
15356
|
-
_context2.n =
|
|
15368
|
+
_context2.n = 125;
|
|
15357
15369
|
return call(getActiveChannelId);
|
|
15358
|
-
case
|
|
15370
|
+
case 125:
|
|
15359
15371
|
_activeChannelId11 = _context2.v;
|
|
15360
15372
|
_obj5 = {
|
|
15361
15373
|
type: 'close',
|
|
@@ -15366,54 +15378,54 @@ function watchForEvents() {
|
|
|
15366
15378
|
params: {}
|
|
15367
15379
|
}, _obj5);
|
|
15368
15380
|
if (!(_channel12.id === _activeChannelId11)) {
|
|
15369
|
-
_context2.n =
|
|
15381
|
+
_context2.n = 127;
|
|
15370
15382
|
break;
|
|
15371
15383
|
}
|
|
15372
15384
|
updateMessageOnAllMessages(_messageId3, {}, _obj5);
|
|
15373
|
-
_context2.n =
|
|
15385
|
+
_context2.n = 126;
|
|
15374
15386
|
return put(updateMessageAC(_messageId3, {}, undefined, _obj5));
|
|
15375
|
-
case
|
|
15376
|
-
return _context2.a(3,
|
|
15377
|
-
case
|
|
15378
|
-
return _context2.a(3,
|
|
15379
|
-
case
|
|
15387
|
+
case 126:
|
|
15388
|
+
return _context2.a(3, 182);
|
|
15389
|
+
case 127:
|
|
15390
|
+
return _context2.a(3, 182);
|
|
15391
|
+
case 128:
|
|
15380
15392
|
_channel13 = args.channel, _user = args.user, _message3 = args.message, _reaction = args.reaction;
|
|
15381
15393
|
log.info('channel REACTION_DELETED ... ', _channel13);
|
|
15382
15394
|
channelFromMap = getChannelFromMap(_channel13.id);
|
|
15383
15395
|
_isSelf = _user.id === SceytChatClient.user.id;
|
|
15384
|
-
_context2.n =
|
|
15396
|
+
_context2.n = 129;
|
|
15385
15397
|
return call(getActiveChannelId);
|
|
15386
|
-
case
|
|
15398
|
+
case 129:
|
|
15387
15399
|
_activeChannelId12 = _context2.v;
|
|
15388
15400
|
if (!(_channel13.id === _activeChannelId12)) {
|
|
15389
|
-
_context2.n =
|
|
15401
|
+
_context2.n = 131;
|
|
15390
15402
|
break;
|
|
15391
15403
|
}
|
|
15392
|
-
_context2.n =
|
|
15404
|
+
_context2.n = 130;
|
|
15393
15405
|
return put(deleteReactionFromMessageAC(_message3, _reaction, _isSelf));
|
|
15394
|
-
case
|
|
15406
|
+
case 130:
|
|
15395
15407
|
removeReactionOnAllMessages(_message3, _reaction, true);
|
|
15396
|
-
case
|
|
15408
|
+
case 131:
|
|
15397
15409
|
_channelUpdateParams = JSON.parse(JSON.stringify(_channel13));
|
|
15398
15410
|
if (channelFromMap && channelFromMap.lastReactedMessage && channelFromMap.lastReactedMessage.id === _message3.id) {
|
|
15399
15411
|
_channelUpdateParams.lastReactedMessage = null;
|
|
15400
15412
|
}
|
|
15401
|
-
_context2.n =
|
|
15413
|
+
_context2.n = 132;
|
|
15402
15414
|
return put(updateChannelDataAC(_channel13.id, _channelUpdateParams));
|
|
15403
|
-
case
|
|
15415
|
+
case 132:
|
|
15404
15416
|
updateChannelOnAllChannels(_channel13.id, _channelUpdateParams);
|
|
15405
15417
|
if (checkChannelExistsOnMessagesMap(_channel13.id)) {
|
|
15406
15418
|
removeReactionToMessageOnMap(_channel13.id, _message3, _reaction, true);
|
|
15407
15419
|
}
|
|
15408
|
-
return _context2.a(3,
|
|
15409
|
-
case
|
|
15420
|
+
return _context2.a(3, 182);
|
|
15421
|
+
case 133:
|
|
15410
15422
|
_channel14 = args.channel;
|
|
15411
15423
|
if (!_channel14) {
|
|
15412
|
-
_context2.n =
|
|
15424
|
+
_context2.n = 135;
|
|
15413
15425
|
break;
|
|
15414
15426
|
}
|
|
15415
15427
|
_updatedChannel = JSON.parse(JSON.stringify(_channel14));
|
|
15416
|
-
_context2.n =
|
|
15428
|
+
_context2.n = 134;
|
|
15417
15429
|
return put(updateChannelDataAC(_channel14.id, {
|
|
15418
15430
|
lastMessage: _channel14.lastMessage,
|
|
15419
15431
|
newMessageCount: _channel14.newMessageCount,
|
|
@@ -15426,36 +15438,36 @@ function watchForEvents() {
|
|
|
15426
15438
|
lastDisplayedMessageId: _channel14.lastDisplayedMessageId,
|
|
15427
15439
|
messageRetentionPeriod: _channel14.messageRetentionPeriod
|
|
15428
15440
|
}));
|
|
15429
|
-
case
|
|
15441
|
+
case 134:
|
|
15430
15442
|
updateChannelOnAllChannels(_channel14.id, _updatedChannel);
|
|
15431
|
-
case
|
|
15432
|
-
return _context2.a(3,
|
|
15433
|
-
case
|
|
15443
|
+
case 135:
|
|
15444
|
+
return _context2.a(3, 182);
|
|
15445
|
+
case 136:
|
|
15434
15446
|
_channel15 = args.channel;
|
|
15435
15447
|
log.info('CLEAR_HISTORY: ', _channel15);
|
|
15436
|
-
_context2.n =
|
|
15448
|
+
_context2.n = 137;
|
|
15437
15449
|
return call(getActiveChannelId);
|
|
15438
|
-
case
|
|
15450
|
+
case 137:
|
|
15439
15451
|
_activeChannelId13 = _context2.v;
|
|
15440
|
-
_context2.n =
|
|
15452
|
+
_context2.n = 138;
|
|
15441
15453
|
return call(checkChannelExists, _channel15.id);
|
|
15442
|
-
case
|
|
15454
|
+
case 138:
|
|
15443
15455
|
channelExist = _context2.v;
|
|
15444
15456
|
if (!(_channel15.id === _activeChannelId13)) {
|
|
15445
|
-
_context2.n =
|
|
15457
|
+
_context2.n = 140;
|
|
15446
15458
|
break;
|
|
15447
15459
|
}
|
|
15448
|
-
_context2.n =
|
|
15460
|
+
_context2.n = 139;
|
|
15449
15461
|
return put(clearMessagesAC());
|
|
15450
|
-
case
|
|
15462
|
+
case 139:
|
|
15451
15463
|
removeAllMessages();
|
|
15452
|
-
case
|
|
15464
|
+
case 140:
|
|
15453
15465
|
removeMessagesFromMap(_channel15.id);
|
|
15454
15466
|
if (!channelExist) {
|
|
15455
|
-
_context2.n =
|
|
15467
|
+
_context2.n = 141;
|
|
15456
15468
|
break;
|
|
15457
15469
|
}
|
|
15458
|
-
_context2.n =
|
|
15470
|
+
_context2.n = 141;
|
|
15459
15471
|
return put(updateChannelDataAC(_channel15.id, {
|
|
15460
15472
|
lastMessage: null,
|
|
15461
15473
|
newMessageCount: 0,
|
|
@@ -15463,7 +15475,7 @@ function watchForEvents() {
|
|
|
15463
15475
|
muted: _channel15.muted,
|
|
15464
15476
|
mutedTill: _channel15.mutedTill
|
|
15465
15477
|
}));
|
|
15466
|
-
case
|
|
15478
|
+
case 141:
|
|
15467
15479
|
updateChannelOnAllChannels(_channel15.id, {
|
|
15468
15480
|
lastMessage: null,
|
|
15469
15481
|
newMessageCount: 0,
|
|
@@ -15471,173 +15483,173 @@ function watchForEvents() {
|
|
|
15471
15483
|
muted: _channel15.muted,
|
|
15472
15484
|
mutedTill: _channel15.mutedTill
|
|
15473
15485
|
});
|
|
15474
|
-
return _context2.a(3,
|
|
15475
|
-
case
|
|
15486
|
+
return _context2.a(3, 182);
|
|
15487
|
+
case 142:
|
|
15476
15488
|
_channel16 = args.channel;
|
|
15477
15489
|
log.info('channel MUTE ... ');
|
|
15478
|
-
_context2.n =
|
|
15490
|
+
_context2.n = 143;
|
|
15479
15491
|
return put(updateChannelDataAC(_channel16.id, {
|
|
15480
15492
|
muted: _channel16.muted,
|
|
15481
15493
|
mutedTill: _channel16.mutedTill
|
|
15482
15494
|
}));
|
|
15483
|
-
case
|
|
15495
|
+
case 143:
|
|
15484
15496
|
updateChannelOnAllChannels(_channel16.id, {
|
|
15485
15497
|
muted: _channel16.muted,
|
|
15486
15498
|
mutedTill: _channel16.mutedTill
|
|
15487
15499
|
});
|
|
15488
|
-
return _context2.a(3,
|
|
15489
|
-
case
|
|
15500
|
+
return _context2.a(3, 182);
|
|
15501
|
+
case 144:
|
|
15490
15502
|
_channel17 = args.channel;
|
|
15491
15503
|
log.info('channel UNMUTE ... ');
|
|
15492
|
-
_context2.n =
|
|
15504
|
+
_context2.n = 145;
|
|
15493
15505
|
return put(updateChannelDataAC(_channel17.id, {
|
|
15494
15506
|
muted: _channel17.muted,
|
|
15495
15507
|
mutedTill: _channel17.mutedTill
|
|
15496
15508
|
}));
|
|
15497
|
-
case
|
|
15509
|
+
case 145:
|
|
15498
15510
|
updateChannelOnAllChannels(_channel17.id, {
|
|
15499
15511
|
muted: _channel17.muted,
|
|
15500
15512
|
mutedTill: _channel17.mutedTill
|
|
15501
15513
|
});
|
|
15502
|
-
return _context2.a(3,
|
|
15503
|
-
case
|
|
15514
|
+
return _context2.a(3, 182);
|
|
15515
|
+
case 146:
|
|
15504
15516
|
_channel18 = args.channel;
|
|
15505
15517
|
log.info('channel PINED ... ');
|
|
15506
|
-
_context2.n =
|
|
15518
|
+
_context2.n = 147;
|
|
15507
15519
|
return put(updateChannelDataAC(_channel18.id, {
|
|
15508
15520
|
pinnedAt: _channel18.pinnedAt
|
|
15509
15521
|
}, true));
|
|
15510
|
-
case
|
|
15522
|
+
case 147:
|
|
15511
15523
|
updateChannelOnAllChannels(_channel18.id, {
|
|
15512
15524
|
pinnedAt: _channel18.pinnedAt
|
|
15513
15525
|
});
|
|
15514
|
-
return _context2.a(3,
|
|
15515
|
-
case
|
|
15526
|
+
return _context2.a(3, 182);
|
|
15527
|
+
case 148:
|
|
15516
15528
|
_channel19 = args.channel;
|
|
15517
15529
|
log.info('channel UNPINED ... ');
|
|
15518
|
-
_context2.n =
|
|
15530
|
+
_context2.n = 149;
|
|
15519
15531
|
return put(updateChannelDataAC(_channel19.id, {
|
|
15520
15532
|
pinnedAt: _channel19.pinnedAt
|
|
15521
15533
|
}, false, true));
|
|
15522
|
-
case
|
|
15534
|
+
case 149:
|
|
15523
15535
|
updateChannelOnAllChannels(_channel19.id, {
|
|
15524
15536
|
pinnedAt: _channel19.pinnedAt
|
|
15525
15537
|
});
|
|
15526
|
-
return _context2.a(3,
|
|
15527
|
-
case
|
|
15538
|
+
return _context2.a(3, 182);
|
|
15539
|
+
case 150:
|
|
15528
15540
|
_channel20 = args.channel;
|
|
15529
15541
|
log.info('channel HIDE ... ');
|
|
15530
|
-
_context2.n =
|
|
15542
|
+
_context2.n = 151;
|
|
15531
15543
|
return put(setChannelToHideAC(_channel20));
|
|
15532
|
-
case
|
|
15533
|
-
return _context2.a(3,
|
|
15534
|
-
case
|
|
15544
|
+
case 151:
|
|
15545
|
+
return _context2.a(3, 182);
|
|
15546
|
+
case 152:
|
|
15535
15547
|
_channel21 = args.channel;
|
|
15536
15548
|
log.info('channel UNHIDE ... ');
|
|
15537
|
-
_context2.n =
|
|
15549
|
+
_context2.n = 153;
|
|
15538
15550
|
return put(setChannelToUnHideAC(_channel21));
|
|
15539
|
-
case
|
|
15540
|
-
return _context2.a(3,
|
|
15541
|
-
case
|
|
15551
|
+
case 153:
|
|
15552
|
+
return _context2.a(3, 182);
|
|
15553
|
+
case 154:
|
|
15542
15554
|
_channel22 = args.channel;
|
|
15543
|
-
_context2.n =
|
|
15555
|
+
_context2.n = 155;
|
|
15544
15556
|
return put(updateChannelDataAC(_channel22.id, {
|
|
15545
15557
|
unread: _channel22.unread,
|
|
15546
15558
|
muted: _channel22.muted,
|
|
15547
15559
|
mutedTill: _channel22.mutedTill
|
|
15548
15560
|
}));
|
|
15549
|
-
case
|
|
15561
|
+
case 155:
|
|
15550
15562
|
_groupName5 = getChannelGroupName(_channel22);
|
|
15551
|
-
_context2.n =
|
|
15563
|
+
_context2.n = 156;
|
|
15552
15564
|
return put(updateSearchedChannelDataAC(_channel22.id, {
|
|
15553
15565
|
unread: _channel22.unread
|
|
15554
15566
|
}, _groupName5));
|
|
15555
|
-
case
|
|
15567
|
+
case 156:
|
|
15556
15568
|
updateChannelOnAllChannels(_channel22.id, {
|
|
15557
15569
|
unread: _channel22.unread
|
|
15558
15570
|
});
|
|
15559
|
-
return _context2.a(3,
|
|
15560
|
-
case
|
|
15571
|
+
return _context2.a(3, 182);
|
|
15572
|
+
case 157:
|
|
15561
15573
|
_channel23 = args.channel;
|
|
15562
|
-
_context2.n =
|
|
15574
|
+
_context2.n = 158;
|
|
15563
15575
|
return put(updateChannelDataAC(_channel23.id, {
|
|
15564
15576
|
unread: _channel23.unread,
|
|
15565
15577
|
muted: _channel23.muted,
|
|
15566
15578
|
mutedTill: _channel23.mutedTill
|
|
15567
15579
|
}));
|
|
15568
|
-
case
|
|
15580
|
+
case 158:
|
|
15569
15581
|
_groupName6 = getChannelGroupName(_channel23);
|
|
15570
|
-
_context2.n =
|
|
15582
|
+
_context2.n = 159;
|
|
15571
15583
|
return put(updateSearchedChannelDataAC(_channel23.id, {
|
|
15572
15584
|
unread: _channel23.unread
|
|
15573
15585
|
}, _groupName6));
|
|
15574
|
-
case
|
|
15586
|
+
case 159:
|
|
15575
15587
|
updateChannelOnAllChannels(_channel23.id, {
|
|
15576
15588
|
unread: _channel23.unread
|
|
15577
15589
|
});
|
|
15578
|
-
return _context2.a(3,
|
|
15579
|
-
case
|
|
15590
|
+
return _context2.a(3, 182);
|
|
15591
|
+
case 160:
|
|
15580
15592
|
_channel24 = args.channel, members = args.members;
|
|
15581
15593
|
log.info('channel CHANGE_ROLE channel ... ', _channel24);
|
|
15582
15594
|
log.info('channel CHANGE_ROLE member ... ', members);
|
|
15583
|
-
_context2.n =
|
|
15595
|
+
_context2.n = 161;
|
|
15584
15596
|
return call(getActiveChannelId);
|
|
15585
|
-
case
|
|
15597
|
+
case 161:
|
|
15586
15598
|
_activeChannelId14 = _context2.v;
|
|
15587
15599
|
if (!(_channel24.id === _activeChannelId14)) {
|
|
15588
|
-
_context2.n =
|
|
15600
|
+
_context2.n = 162;
|
|
15589
15601
|
break;
|
|
15590
15602
|
}
|
|
15591
|
-
_context2.n =
|
|
15603
|
+
_context2.n = 162;
|
|
15592
15604
|
return put(updateMembersAC(members));
|
|
15593
|
-
case
|
|
15605
|
+
case 162:
|
|
15594
15606
|
i = 0;
|
|
15595
|
-
case
|
|
15607
|
+
case 163:
|
|
15596
15608
|
if (!(i < members.length)) {
|
|
15597
|
-
_context2.n =
|
|
15609
|
+
_context2.n = 166;
|
|
15598
15610
|
break;
|
|
15599
15611
|
}
|
|
15600
15612
|
if (!(members[i].id === SceytChatClient.user.id)) {
|
|
15601
|
-
_context2.n =
|
|
15613
|
+
_context2.n = 165;
|
|
15602
15614
|
break;
|
|
15603
15615
|
}
|
|
15604
|
-
_context2.n =
|
|
15616
|
+
_context2.n = 164;
|
|
15605
15617
|
return put(updateChannelDataAC(_channel24.id, {
|
|
15606
15618
|
userRole: members[i].role,
|
|
15607
15619
|
muted: _channel24.muted,
|
|
15608
15620
|
mutedTill: _channel24.mutedTill
|
|
15609
15621
|
}));
|
|
15610
|
-
case
|
|
15622
|
+
case 164:
|
|
15611
15623
|
updateChannelOnAllChannels(_channel24.id, {
|
|
15612
15624
|
userRole: members[i].role,
|
|
15613
15625
|
muted: _channel24.muted,
|
|
15614
15626
|
mutedTill: _channel24.mutedTill
|
|
15615
15627
|
});
|
|
15616
|
-
case
|
|
15628
|
+
case 165:
|
|
15617
15629
|
i++;
|
|
15618
|
-
_context2.n =
|
|
15630
|
+
_context2.n = 163;
|
|
15619
15631
|
break;
|
|
15620
|
-
case
|
|
15621
|
-
return _context2.a(3,
|
|
15622
|
-
case
|
|
15632
|
+
case 166:
|
|
15633
|
+
return _context2.a(3, 182);
|
|
15634
|
+
case 167:
|
|
15623
15635
|
_channel25 = args.channel;
|
|
15624
15636
|
log.info('channel frozen channel ... ', _channel25);
|
|
15625
|
-
return _context2.a(3,
|
|
15626
|
-
case
|
|
15637
|
+
return _context2.a(3, 182);
|
|
15638
|
+
case 168:
|
|
15627
15639
|
_channel26 = args.channel;
|
|
15628
15640
|
log.info('channel unfrozen channel ... ', _channel26);
|
|
15629
|
-
return _context2.a(3,
|
|
15630
|
-
case
|
|
15641
|
+
return _context2.a(3, 182);
|
|
15642
|
+
case 169:
|
|
15631
15643
|
_channelId2 = args.channelId, from = args.from, name = args.name;
|
|
15632
15644
|
log.info('channel event received >>>... . . . . . ', args);
|
|
15633
15645
|
if (!(from.id === SceytChatClient.user.id)) {
|
|
15634
|
-
_context2.n =
|
|
15646
|
+
_context2.n = 170;
|
|
15635
15647
|
break;
|
|
15636
15648
|
}
|
|
15637
|
-
return _context2.a(3,
|
|
15638
|
-
case
|
|
15649
|
+
return _context2.a(3, 182);
|
|
15650
|
+
case 170:
|
|
15639
15651
|
if (!(name === 'start_typing')) {
|
|
15640
|
-
_context2.n =
|
|
15652
|
+
_context2.n = 172;
|
|
15641
15653
|
break;
|
|
15642
15654
|
}
|
|
15643
15655
|
if (!usersTimeout[_channelId2]) {
|
|
@@ -15649,27 +15661,27 @@ function watchForEvents() {
|
|
|
15649
15661
|
usersTimeout[_channelId2][from.id] = setTimeout(function () {
|
|
15650
15662
|
channelListener.onReceivedChannelEvent(_channelId2, from, 'stop_typing');
|
|
15651
15663
|
}, 5000);
|
|
15652
|
-
_context2.n =
|
|
15664
|
+
_context2.n = 171;
|
|
15653
15665
|
return put(switchTypingIndicatorAC(true, _channelId2, from));
|
|
15654
|
-
case
|
|
15655
|
-
_context2.n =
|
|
15666
|
+
case 171:
|
|
15667
|
+
_context2.n = 177;
|
|
15656
15668
|
break;
|
|
15657
|
-
case
|
|
15669
|
+
case 172:
|
|
15658
15670
|
if (!(name === 'stop_typing')) {
|
|
15659
|
-
_context2.n =
|
|
15671
|
+
_context2.n = 174;
|
|
15660
15672
|
break;
|
|
15661
15673
|
}
|
|
15662
15674
|
if (usersTimeout[_channelId2] && usersTimeout[_channelId2][from.id]) {
|
|
15663
15675
|
clearTimeout(usersTimeout[_channelId2][from.id]);
|
|
15664
15676
|
}
|
|
15665
|
-
_context2.n =
|
|
15677
|
+
_context2.n = 173;
|
|
15666
15678
|
return put(switchTypingIndicatorAC(false, _channelId2, from));
|
|
15667
|
-
case
|
|
15668
|
-
_context2.n =
|
|
15679
|
+
case 173:
|
|
15680
|
+
_context2.n = 177;
|
|
15669
15681
|
break;
|
|
15670
|
-
case
|
|
15682
|
+
case 174:
|
|
15671
15683
|
if (!(name === 'start_recording')) {
|
|
15672
|
-
_context2.n =
|
|
15684
|
+
_context2.n = 176;
|
|
15673
15685
|
break;
|
|
15674
15686
|
}
|
|
15675
15687
|
if (!usersTimeout[_channelId2]) {
|
|
@@ -15681,50 +15693,50 @@ function watchForEvents() {
|
|
|
15681
15693
|
usersTimeout[_channelId2][from.id] = setTimeout(function () {
|
|
15682
15694
|
channelListener.onReceivedChannelEvent(_channelId2, from, 'stop_recording');
|
|
15683
15695
|
}, 5000);
|
|
15684
|
-
_context2.n =
|
|
15696
|
+
_context2.n = 175;
|
|
15685
15697
|
return put(switchRecordingIndicatorAC(true, _channelId2, from));
|
|
15686
|
-
case
|
|
15687
|
-
_context2.n =
|
|
15698
|
+
case 175:
|
|
15699
|
+
_context2.n = 177;
|
|
15688
15700
|
break;
|
|
15689
|
-
case
|
|
15701
|
+
case 176:
|
|
15690
15702
|
if (!(name === 'stop_recording')) {
|
|
15691
|
-
_context2.n =
|
|
15703
|
+
_context2.n = 177;
|
|
15692
15704
|
break;
|
|
15693
15705
|
}
|
|
15694
15706
|
if (usersTimeout[_channelId2] && usersTimeout[_channelId2][from.id]) {
|
|
15695
15707
|
clearTimeout(usersTimeout[_channelId2][from.id]);
|
|
15696
15708
|
}
|
|
15697
|
-
_context2.n =
|
|
15709
|
+
_context2.n = 177;
|
|
15698
15710
|
return put(switchRecordingIndicatorAC(false, _channelId2, from));
|
|
15699
|
-
case
|
|
15700
|
-
return _context2.a(3,
|
|
15701
|
-
case
|
|
15711
|
+
case 177:
|
|
15712
|
+
return _context2.a(3, 182);
|
|
15713
|
+
case 178:
|
|
15702
15714
|
status = args.status;
|
|
15703
15715
|
log.info('connection status changed . . . . . ', status);
|
|
15704
|
-
_context2.n =
|
|
15716
|
+
_context2.n = 179;
|
|
15705
15717
|
return put(setConnectionStatusAC(status));
|
|
15706
|
-
case
|
|
15718
|
+
case 179:
|
|
15707
15719
|
if (!(status === CONNECTION_STATUS.CONNECTED)) {
|
|
15708
|
-
_context2.n =
|
|
15720
|
+
_context2.n = 180;
|
|
15709
15721
|
break;
|
|
15710
15722
|
}
|
|
15711
|
-
_context2.n =
|
|
15723
|
+
_context2.n = 180;
|
|
15712
15724
|
return put(getRolesAC());
|
|
15713
|
-
case
|
|
15714
|
-
return _context2.a(3,
|
|
15715
|
-
case
|
|
15725
|
+
case 180:
|
|
15726
|
+
return _context2.a(3, 182);
|
|
15727
|
+
case 181:
|
|
15716
15728
|
log.warn('UNHANDLED EVENT FROM REDUX-SAGA EVENT-CHANNEL');
|
|
15717
|
-
case
|
|
15718
|
-
_context2.n =
|
|
15729
|
+
case 182:
|
|
15730
|
+
_context2.n = 184;
|
|
15719
15731
|
break;
|
|
15720
|
-
case
|
|
15721
|
-
_context2.p =
|
|
15732
|
+
case 183:
|
|
15733
|
+
_context2.p = 183;
|
|
15722
15734
|
_t2 = _context2.v;
|
|
15723
15735
|
log.error('Error in watchForEvents:', _t2);
|
|
15724
|
-
case
|
|
15736
|
+
case 184:
|
|
15725
15737
|
return _context2.a(2);
|
|
15726
15738
|
}
|
|
15727
|
-
}, _callee2, null, [[0,
|
|
15739
|
+
}, _callee2, null, [[0, 183]]);
|
|
15728
15740
|
});
|
|
15729
15741
|
case 1:
|
|
15730
15742
|
return _context3.d(_regeneratorValues(_loop()), 2);
|
|
@@ -19046,7 +19058,7 @@ function sendMessage(action) {
|
|
|
19046
19058
|
}, _marked$3, null, [[1, 18]]);
|
|
19047
19059
|
}
|
|
19048
19060
|
function sendTextMessage(action) {
|
|
19049
|
-
var payload, message, connectionState, channelId, channel, sendMessageTid, activeChannelId, SceytChatClient, createChannelData, mentionedUserIds, attachments, attachmentBuilder, att, messageBuilder, messageToSend, pendingMessage, messageResponse, messageUpdateData, messageToUpdate, channelUpdateParam, _t3;
|
|
19061
|
+
var payload, message, connectionState, channelId, channel, sendMessageTid, activeChannelId, SceytChatClient, createChannelData, mentionedUserIds, attachments, attachmentBuilder, att, messageBuilder, messageToSend, pendingMessage, _messageResponse, messageResponse, messageUpdateData, messageToUpdate, channelUpdateParam, _t3;
|
|
19050
19062
|
return _regenerator().w(function (_context4) {
|
|
19051
19063
|
while (1) switch (_context4.p = _context4.n) {
|
|
19052
19064
|
case 0:
|
|
@@ -19159,6 +19171,7 @@ function sendTextMessage(action) {
|
|
|
19159
19171
|
parentMessage: messageResponse.parentMessage,
|
|
19160
19172
|
repliedInThread: messageResponse.repliedInThread,
|
|
19161
19173
|
createdAt: messageResponse.createdAt,
|
|
19174
|
+
pollDetails: (_messageResponse = messageResponse) === null || _messageResponse === void 0 ? void 0 : _messageResponse.pollDetails,
|
|
19162
19175
|
channelId: channel.id
|
|
19163
19176
|
};
|
|
19164
19177
|
if (!(activeChannelId === channel.id)) {
|
|
@@ -19439,7 +19452,7 @@ function forwardMessage(action) {
|
|
|
19439
19452
|
}, _marked3$1, null, [[0, 20]]);
|
|
19440
19453
|
}
|
|
19441
19454
|
function resendMessage(action) {
|
|
19442
|
-
var payload, message, connectionState, channelId, channel, customUploader, attachmentCompilation, messageAttachment, messageCopy, handleUploadProgress, uri, filePath, handleUpdateLocalPath, pendingAttachment, thumbnailMetas, fileSize, meta, attachmentMeta, attachmentBuilder, attachmentToSend, messageResponse, messageUpdateData, fileType, messageToUpdate, _messageCopy2, _getMessagesFromMap,
|
|
19455
|
+
var payload, message, connectionState, channelId, channel, customUploader, attachmentCompilation, messageAttachment, messageCopy, handleUploadProgress, uri, filePath, handleUpdateLocalPath, pendingAttachment, thumbnailMetas, fileSize, meta, attachmentMeta, attachmentBuilder, attachmentToSend, messageResponse, messageUpdateData, fileType, messageToUpdate, _messageCopy2, _getMessagesFromMap, _messageResponse2, _messageUpdateData, isInActiveChannel, activeChannelId, _messageToUpdate, _t5, _t6;
|
|
19443
19456
|
return _regenerator().w(function (_context6) {
|
|
19444
19457
|
while (1) switch (_context6.p = _context6.n) {
|
|
19445
19458
|
case 0:
|
|
@@ -19692,24 +19705,24 @@ function resendMessage(action) {
|
|
|
19692
19705
|
_context6.n = 27;
|
|
19693
19706
|
return call(channel.sendMessage, _messageCopy2);
|
|
19694
19707
|
case 27:
|
|
19695
|
-
|
|
19708
|
+
_messageResponse2 = _context6.v;
|
|
19696
19709
|
_context6.n = 28;
|
|
19697
19710
|
return put(removePendingMessageAC(channel.id, _messageCopy2.tid || _messageCopy2.id));
|
|
19698
19711
|
case 28:
|
|
19699
19712
|
_messageUpdateData = {
|
|
19700
|
-
id:
|
|
19701
|
-
body:
|
|
19702
|
-
type:
|
|
19703
|
-
state:
|
|
19704
|
-
displayCount:
|
|
19705
|
-
deliveryStatus:
|
|
19713
|
+
id: _messageResponse2.id,
|
|
19714
|
+
body: _messageResponse2.body,
|
|
19715
|
+
type: _messageResponse2.type,
|
|
19716
|
+
state: _messageResponse2.state,
|
|
19717
|
+
displayCount: _messageResponse2.displayCount,
|
|
19718
|
+
deliveryStatus: _messageResponse2.deliveryStatus,
|
|
19706
19719
|
attachments: [],
|
|
19707
|
-
mentionedUsers:
|
|
19708
|
-
metadata:
|
|
19709
|
-
parentMessage:
|
|
19710
|
-
repliedInThread:
|
|
19711
|
-
bodyAttributes:
|
|
19712
|
-
createdAt:
|
|
19720
|
+
mentionedUsers: _messageResponse2.mentionedUsers,
|
|
19721
|
+
metadata: _messageResponse2.metadata,
|
|
19722
|
+
parentMessage: _messageResponse2.parentMessage,
|
|
19723
|
+
repliedInThread: _messageResponse2.repliedInThread,
|
|
19724
|
+
bodyAttributes: _messageResponse2.bodyAttributes,
|
|
19725
|
+
createdAt: _messageResponse2.createdAt,
|
|
19713
19726
|
channelId: channel.id
|
|
19714
19727
|
};
|
|
19715
19728
|
isInActiveChannel = (_getMessagesFromMap = getMessagesFromMap(channelId)) === null || _getMessagesFromMap === void 0 ? void 0 : _getMessagesFromMap.find(function (message) {
|
|
@@ -19735,7 +19748,7 @@ function resendMessage(action) {
|
|
|
19735
19748
|
break;
|
|
19736
19749
|
}
|
|
19737
19750
|
_context6.n = 31;
|
|
19738
|
-
return put(updateMessageAC(_messageCopy2.tid, JSON.parse(JSON.stringify(
|
|
19751
|
+
return put(updateMessageAC(_messageCopy2.tid, JSON.parse(JSON.stringify(_messageResponse2))));
|
|
19739
19752
|
case 31:
|
|
19740
19753
|
updateMessageOnMap(channel.id, {
|
|
19741
19754
|
messageId: _messageCopy2.tid,
|
|
@@ -19744,7 +19757,7 @@ function resendMessage(action) {
|
|
|
19744
19757
|
updateMessageOnAllMessages(_messageCopy2.tid, _messageUpdateData);
|
|
19745
19758
|
case 32:
|
|
19746
19759
|
updateChannelOnAllChannels(channel.id, channel);
|
|
19747
|
-
_messageToUpdate = JSON.parse(JSON.stringify(
|
|
19760
|
+
_messageToUpdate = JSON.parse(JSON.stringify(_messageResponse2));
|
|
19748
19761
|
updateChannelLastMessageOnAllChannels(channel.id, _messageToUpdate);
|
|
19749
19762
|
_context6.n = 33;
|
|
19750
19763
|
return put(updateChannelLastMessageAC(_messageToUpdate, {
|
|
@@ -36531,7 +36544,7 @@ var Message$1 = function Message(_ref) {
|
|
|
36531
36544
|
})) {
|
|
36532
36545
|
if (message.userMarkers && message.userMarkers.length && message.userMarkers.find(function (marker) {
|
|
36533
36546
|
return marker.name === MESSAGE_DELIVERY_STATUS.READ;
|
|
36534
|
-
})) {
|
|
36547
|
+
}) && message.incoming) {
|
|
36535
36548
|
dispatch(markMessagesAsDeliveredAC(channel.id, [message.id]));
|
|
36536
36549
|
}
|
|
36537
36550
|
}
|