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