sceyt-chat-react-uikit 1.7.6-beta.15 → 1.7.6-beta.17
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/assets/svg/document_icon.svg +6 -0
- package/components/ChannelDetails/DetailsTab/MonthHeader.d.ts +10 -0
- package/index.js +891 -1087
- package/index.modern.js +891 -1087
- package/package.json +1 -1
- package/assets/svg/file_icon.svg +0 -4
package/index.js
CHANGED
|
@@ -10057,7 +10057,10 @@ var queryDirection = {
|
|
|
10057
10057
|
NEAR: 'near'
|
|
10058
10058
|
};
|
|
10059
10059
|
|
|
10060
|
-
function sendMessageAC(message, channelId, connectionState, sendAttachmentsAsSeparateMessage, isResend) {
|
|
10060
|
+
function sendMessageAC(message, channelId, connectionState, sendAttachmentsAsSeparateMessage, isResend, isAddToPendingMessagesMap) {
|
|
10061
|
+
if (isAddToPendingMessagesMap === void 0) {
|
|
10062
|
+
isAddToPendingMessagesMap = true;
|
|
10063
|
+
}
|
|
10061
10064
|
return {
|
|
10062
10065
|
type: SEND_MESSAGE,
|
|
10063
10066
|
payload: {
|
|
@@ -10065,17 +10068,22 @@ function sendMessageAC(message, channelId, connectionState, sendAttachmentsAsSep
|
|
|
10065
10068
|
channelId: channelId,
|
|
10066
10069
|
connectionState: connectionState,
|
|
10067
10070
|
sendAttachmentsAsSeparateMessage: sendAttachmentsAsSeparateMessage,
|
|
10068
|
-
isResend: isResend
|
|
10071
|
+
isResend: isResend,
|
|
10072
|
+
isAddToPendingMessagesMap: isAddToPendingMessagesMap
|
|
10069
10073
|
}
|
|
10070
10074
|
};
|
|
10071
10075
|
}
|
|
10072
|
-
function sendTextMessageAC(message, channelId, connectionState) {
|
|
10076
|
+
function sendTextMessageAC(message, channelId, connectionState, isAddToPendingMessagesMap) {
|
|
10077
|
+
if (isAddToPendingMessagesMap === void 0) {
|
|
10078
|
+
isAddToPendingMessagesMap = true;
|
|
10079
|
+
}
|
|
10073
10080
|
return {
|
|
10074
10081
|
type: SEND_TEXT_MESSAGE,
|
|
10075
10082
|
payload: {
|
|
10076
10083
|
message: message,
|
|
10077
10084
|
channelId: channelId,
|
|
10078
|
-
connectionState: connectionState
|
|
10085
|
+
connectionState: connectionState,
|
|
10086
|
+
isAddToPendingMessagesMap: isAddToPendingMessagesMap
|
|
10079
10087
|
}
|
|
10080
10088
|
};
|
|
10081
10089
|
}
|
|
@@ -10089,17 +10097,21 @@ function resendMessageAC(message, channelId, connectionState) {
|
|
|
10089
10097
|
}
|
|
10090
10098
|
};
|
|
10091
10099
|
}
|
|
10092
|
-
function forwardMessageAC(message, channelId, connectionState, isForward) {
|
|
10100
|
+
function forwardMessageAC(message, channelId, connectionState, isForward, isAddToPendingMessagesMap) {
|
|
10093
10101
|
if (isForward === void 0) {
|
|
10094
10102
|
isForward = true;
|
|
10095
10103
|
}
|
|
10104
|
+
if (isAddToPendingMessagesMap === void 0) {
|
|
10105
|
+
isAddToPendingMessagesMap = true;
|
|
10106
|
+
}
|
|
10096
10107
|
return {
|
|
10097
10108
|
type: FORWARD_MESSAGE,
|
|
10098
10109
|
payload: {
|
|
10099
10110
|
message: message,
|
|
10100
10111
|
channelId: channelId,
|
|
10101
10112
|
connectionState: connectionState,
|
|
10102
|
-
isForward: isForward
|
|
10113
|
+
isForward: isForward,
|
|
10114
|
+
isAddToPendingMessagesMap: isAddToPendingMessagesMap
|
|
10103
10115
|
}
|
|
10104
10116
|
};
|
|
10105
10117
|
}
|
|
@@ -10816,17 +10828,20 @@ function setMessagesToMap(channelId, messages) {
|
|
|
10816
10828
|
messagesMap[channelId] = {};
|
|
10817
10829
|
}
|
|
10818
10830
|
messages.forEach(function (msg) {
|
|
10819
|
-
messagesMap[channelId][msg.
|
|
10831
|
+
if (msg.tid && messagesMap[channelId][msg.tid]) {
|
|
10832
|
+
delete messagesMap[channelId][msg.tid];
|
|
10833
|
+
}
|
|
10834
|
+
messagesMap[channelId][msg.id || msg.tid] = msg;
|
|
10820
10835
|
});
|
|
10821
10836
|
}
|
|
10822
10837
|
function addMessageToMap(channelId, message) {
|
|
10823
10838
|
if (!messagesMap[channelId]) {
|
|
10824
10839
|
messagesMap[channelId] = {};
|
|
10825
10840
|
}
|
|
10826
|
-
messagesMap[channelId][message.
|
|
10827
|
-
|
|
10828
|
-
setPendingMessage(channelId, message);
|
|
10841
|
+
if (message.tid && messagesMap[channelId][message.tid]) {
|
|
10842
|
+
delete messagesMap[channelId][message.tid];
|
|
10829
10843
|
}
|
|
10844
|
+
messagesMap[channelId][message.id || message.tid] = message;
|
|
10830
10845
|
}
|
|
10831
10846
|
function updateMessageOnMap(channelId, updatedMessage, voteDetails) {
|
|
10832
10847
|
var pendingMessagesMap = store.getState().MessageReducer.pendingMessagesMap;
|
|
@@ -10877,7 +10892,10 @@ function updateMessageOnMap(channelId, updatedMessage, voteDetails) {
|
|
|
10877
10892
|
if (!messagesMap[channelId]) {
|
|
10878
10893
|
messagesMap[channelId] = {};
|
|
10879
10894
|
}
|
|
10880
|
-
messagesMap[channelId][msg.
|
|
10895
|
+
if (msg.tid && messagesMap[channelId][msg.tid]) {
|
|
10896
|
+
delete messagesMap[channelId][msg.tid];
|
|
10897
|
+
}
|
|
10898
|
+
messagesMap[channelId][msg.id || msg.tid] = msg;
|
|
10881
10899
|
});
|
|
10882
10900
|
}
|
|
10883
10901
|
return updatedMessageData;
|
|
@@ -10893,7 +10911,10 @@ function addReactionToMessageOnMap(channelId, message, reaction, isSelf) {
|
|
|
10893
10911
|
slfReactions = [reaction];
|
|
10894
10912
|
}
|
|
10895
10913
|
}
|
|
10896
|
-
messagesMap[channelId][message.
|
|
10914
|
+
if (message.tid && messagesMap[channelId][message.tid]) {
|
|
10915
|
+
delete messagesMap[channelId][message.tid];
|
|
10916
|
+
}
|
|
10917
|
+
messagesMap[channelId][message.id || message.tid] = _extends({}, messageShouldBeUpdated, {
|
|
10897
10918
|
userReactions: slfReactions,
|
|
10898
10919
|
reactionTotals: message.reactionTotals
|
|
10899
10920
|
});
|
|
@@ -10927,7 +10948,10 @@ function removeReactionToMessageOnMap(channelId, message, reaction, isSelf) {
|
|
|
10927
10948
|
return selfReaction.key !== reaction.key;
|
|
10928
10949
|
});
|
|
10929
10950
|
}
|
|
10930
|
-
messagesMap[channelId][message.
|
|
10951
|
+
if (message.tid && messagesMap[channelId][message.tid]) {
|
|
10952
|
+
delete messagesMap[channelId][message.tid];
|
|
10953
|
+
}
|
|
10954
|
+
messagesMap[channelId][message.id || message.tid] = _extends({}, messageShouldBeUpdated, {
|
|
10931
10955
|
reactionTotals: message.reactionTotals,
|
|
10932
10956
|
userReactions: userReactions
|
|
10933
10957
|
});
|
|
@@ -10962,6 +10986,9 @@ function updateMessageStatusOnMap(channelId, newMarkers) {
|
|
|
10962
10986
|
var messageShouldBeUpdated = messagesMap[channelId][messageId];
|
|
10963
10987
|
if (messageShouldBeUpdated) {
|
|
10964
10988
|
var statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(messageShouldBeUpdated, newMarkers.name);
|
|
10989
|
+
if (messageShouldBeUpdated.tid && messagesMap[channelId][messageShouldBeUpdated.tid]) {
|
|
10990
|
+
delete messagesMap[channelId][messageShouldBeUpdated.tid];
|
|
10991
|
+
}
|
|
10965
10992
|
messagesMap[channelId][messageId] = _extends({}, messageShouldBeUpdated, statusUpdatedMessage);
|
|
10966
10993
|
}
|
|
10967
10994
|
});
|
|
@@ -10995,13 +11022,6 @@ function clearMessagesMap() {
|
|
|
10995
11022
|
function checkChannelExistsOnMessagesMap(channelId) {
|
|
10996
11023
|
return !!messagesMap[channelId];
|
|
10997
11024
|
}
|
|
10998
|
-
var pendingVideoAttachmentsThumbs = {};
|
|
10999
|
-
var getVideoThumb = function getVideoThumb(attachmentId) {
|
|
11000
|
-
return pendingVideoAttachmentsThumbs[attachmentId];
|
|
11001
|
-
};
|
|
11002
|
-
var deleteVideoThumb = function deleteVideoThumb(attachmentId) {
|
|
11003
|
-
delete pendingVideoAttachmentsThumbs[attachmentId];
|
|
11004
|
-
};
|
|
11005
11025
|
var setPendingAttachment = function setPendingAttachment(attachmentId, data) {
|
|
11006
11026
|
pendingAttachments[attachmentId] = _extends({}, pendingAttachments[attachmentId], data);
|
|
11007
11027
|
};
|
|
@@ -14091,7 +14111,10 @@ function watchForEvents() {
|
|
|
14091
14111
|
SceytChatClient = getClient();
|
|
14092
14112
|
channelListener = new SceytChatClient.ChannelListener();
|
|
14093
14113
|
connectionListener = new SceytChatClient.ConnectionListener();
|
|
14094
|
-
usersTimeout = {
|
|
14114
|
+
usersTimeout = {
|
|
14115
|
+
recordingTimeout: {},
|
|
14116
|
+
typingTimeout: {}
|
|
14117
|
+
};
|
|
14095
14118
|
chan = createSagaMiddleware.eventChannel(function (emitter) {
|
|
14096
14119
|
var shouldSkip = function shouldSkip(channel) {
|
|
14097
14120
|
var channelTypesFilter = getChannelTypesFilter();
|
|
@@ -14497,7 +14520,7 @@ function watchForEvents() {
|
|
|
14497
14520
|
type = _yield$take.type;
|
|
14498
14521
|
args = _yield$take.args;
|
|
14499
14522
|
_t = type;
|
|
14500
|
-
_context.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 ?
|
|
14523
|
+
_context.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 ? 66 : _t === CHANNEL_EVENT_TYPES.DELETE ? 79 : _t === CHANNEL_EVENT_TYPES.DELETE_MESSAGE ? 81 : _t === CHANNEL_EVENT_TYPES.EDIT_MESSAGE ? 86 : _t === CHANNEL_EVENT_TYPES.REACTION_ADDED ? 91 : _t === CHANNEL_EVENT_TYPES.POLL_ADDED ? 99 : _t === CHANNEL_EVENT_TYPES.POLL_DELETED ? 109 : _t === CHANNEL_EVENT_TYPES.POLL_RETRACTED ? 117 : _t === CHANNEL_EVENT_TYPES.POLL_CLOSED ? 125 : _t === CHANNEL_EVENT_TYPES.REACTION_DELETED ? 129 : _t === CHANNEL_EVENT_TYPES.UNREAD_MESSAGES_INFO ? 134 : _t === CHANNEL_EVENT_TYPES.CLEAR_HISTORY ? 137 : _t === CHANNEL_EVENT_TYPES.MUTE ? 143 : _t === CHANNEL_EVENT_TYPES.UNMUTE ? 145 : _t === CHANNEL_EVENT_TYPES.PINED ? 147 : _t === CHANNEL_EVENT_TYPES.UNPINED ? 149 : _t === CHANNEL_EVENT_TYPES.HIDE ? 151 : _t === CHANNEL_EVENT_TYPES.UNHIDE ? 153 : _t === CHANNEL_EVENT_TYPES.CHANNEL_MARKED_AS_UNREAD ? 155 : _t === CHANNEL_EVENT_TYPES.CHANNEL_MARKED_AS_READ ? 158 : _t === CHANNEL_EVENT_TYPES.CHANGE_ROLE ? 161 : _t === CHANNEL_EVENT_TYPES.FROZEN ? 168 : _t === CHANNEL_EVENT_TYPES.UNFROZEN ? 169 : _t === CHANNEL_EVENT_TYPES.CHANNEL_EVENT ? 170 : _t === CONNECTION_EVENT_TYPES.CONNECTION_STATUS_CHANGED ? 179 : 182;
|
|
14501
14524
|
break;
|
|
14502
14525
|
case 2:
|
|
14503
14526
|
createdChannel = args.createdChannel;
|
|
@@ -14531,7 +14554,7 @@ function watchForEvents() {
|
|
|
14531
14554
|
addChannelToAllChannels(createdChannel);
|
|
14532
14555
|
}
|
|
14533
14556
|
case 6:
|
|
14534
|
-
return _context.a(3,
|
|
14557
|
+
return _context.a(3, 183);
|
|
14535
14558
|
case 7:
|
|
14536
14559
|
channel = args.channel;
|
|
14537
14560
|
log.info('channel JOIN ... . ', channel);
|
|
@@ -14542,7 +14565,7 @@ function watchForEvents() {
|
|
|
14542
14565
|
if (!_chan2) {
|
|
14543
14566
|
addChannelToAllChannels(channel);
|
|
14544
14567
|
}
|
|
14545
|
-
return _context.a(3,
|
|
14568
|
+
return _context.a(3, 183);
|
|
14546
14569
|
case 9:
|
|
14547
14570
|
_channel = args.channel, member = args.member;
|
|
14548
14571
|
log.info('channel LEAVE ... ', _channel, member);
|
|
@@ -14610,7 +14633,7 @@ function watchForEvents() {
|
|
|
14610
14633
|
mutedTill: _channel.mutedTill
|
|
14611
14634
|
});
|
|
14612
14635
|
case 21:
|
|
14613
|
-
return _context.a(3,
|
|
14636
|
+
return _context.a(3, 183);
|
|
14614
14637
|
case 22:
|
|
14615
14638
|
log.info('channel BLOCK ... ');
|
|
14616
14639
|
_channel2 = args.channel;
|
|
@@ -14622,10 +14645,10 @@ function watchForEvents() {
|
|
|
14622
14645
|
_context.n = 23;
|
|
14623
14646
|
return effects.put(removeChannelAC(_channel2.id));
|
|
14624
14647
|
case 23:
|
|
14625
|
-
return _context.a(3,
|
|
14648
|
+
return _context.a(3, 183);
|
|
14626
14649
|
case 24:
|
|
14627
14650
|
log.info('channel UNBLOCK ... ');
|
|
14628
|
-
return _context.a(3,
|
|
14651
|
+
return _context.a(3, 183);
|
|
14629
14652
|
case 25:
|
|
14630
14653
|
_channel3 = args.channel, removedMembers = args.removedMembers;
|
|
14631
14654
|
log.info('channel KICK_MEMBERS ... ', removedMembers);
|
|
@@ -14695,7 +14718,7 @@ function watchForEvents() {
|
|
|
14695
14718
|
muted: _channel3.muted,
|
|
14696
14719
|
mutedTill: _channel3.mutedTill
|
|
14697
14720
|
});
|
|
14698
|
-
return _context.a(3,
|
|
14721
|
+
return _context.a(3, 183);
|
|
14699
14722
|
case 36:
|
|
14700
14723
|
_channel4 = args.channel, addedMembers = args.addedMembers;
|
|
14701
14724
|
log.info('channel ADD_MEMBERS ... ', addedMembers);
|
|
@@ -14750,7 +14773,7 @@ function watchForEvents() {
|
|
|
14750
14773
|
muted: _channel4.muted,
|
|
14751
14774
|
mutedTill: _channel4.mutedTill
|
|
14752
14775
|
});
|
|
14753
|
-
return _context.a(3,
|
|
14776
|
+
return _context.a(3, 183);
|
|
14754
14777
|
case 46:
|
|
14755
14778
|
log.info('channel UPDATE_CHANNEL ... ');
|
|
14756
14779
|
updatedChannel = args.updatedChannel;
|
|
@@ -14797,65 +14820,60 @@ function watchForEvents() {
|
|
|
14797
14820
|
mutedTill: mutedTill,
|
|
14798
14821
|
metadata: isJSON(metadata) ? JSON.parse(metadata) : metadata
|
|
14799
14822
|
});
|
|
14800
|
-
return _context.a(3,
|
|
14823
|
+
return _context.a(3, 183);
|
|
14801
14824
|
case 51:
|
|
14802
14825
|
_channel5 = args.channel, message = args.message;
|
|
14803
14826
|
log.info('channel MESSAGE ... id : ', message.id, ', channel.id: ', _channel5.id);
|
|
14804
14827
|
messageToHandle = handleNewMessages ? handleNewMessages(message, _channel5) : message;
|
|
14805
14828
|
_channelFilterTypes = getChannelTypesFilter();
|
|
14806
14829
|
if (!(messageToHandle && _channel5 && (_channelFilterTypes !== null && _channelFilterTypes !== void 0 && _channelFilterTypes.length ? _channelFilterTypes.includes(_channel5.type) : true))) {
|
|
14807
|
-
_context.n =
|
|
14830
|
+
_context.n = 65;
|
|
14808
14831
|
break;
|
|
14809
14832
|
}
|
|
14810
14833
|
_channel5.metadata = isJSON(_channel5.metadata) ? JSON.parse(_channel5.metadata) : _channel5.metadata;
|
|
14811
|
-
|
|
14812
|
-
return effects.call(getActiveChannelId);
|
|
14813
|
-
case 52:
|
|
14814
|
-
_activeChannelId5 = _context.v;
|
|
14834
|
+
_activeChannelId5 = getActiveChannelId();
|
|
14815
14835
|
_channelExists6 = checkChannelExists(_channel5.id);
|
|
14816
14836
|
channelForAdd = JSON.parse(JSON.stringify(_channel5));
|
|
14817
|
-
_context.n =
|
|
14837
|
+
_context.n = 52;
|
|
14818
14838
|
return effects.put(addChannelAC(channelForAdd));
|
|
14819
|
-
case
|
|
14839
|
+
case 52:
|
|
14820
14840
|
if (_channelExists6) {
|
|
14821
|
-
_context.n =
|
|
14841
|
+
_context.n = 53;
|
|
14822
14842
|
break;
|
|
14823
14843
|
}
|
|
14844
|
+
setChannelInMap(_channel5);
|
|
14824
14845
|
_context.n = 54;
|
|
14825
|
-
return effects.call(setChannelInMap, _channel5);
|
|
14826
|
-
case 54:
|
|
14827
|
-
_context.n = 56;
|
|
14828
14846
|
break;
|
|
14829
|
-
case
|
|
14847
|
+
case 53:
|
|
14830
14848
|
if (message.repliedInThread) {
|
|
14831
|
-
_context.n =
|
|
14849
|
+
_context.n = 54;
|
|
14832
14850
|
break;
|
|
14833
14851
|
}
|
|
14834
|
-
_context.n =
|
|
14852
|
+
_context.n = 54;
|
|
14835
14853
|
return effects.put(updateChannelLastMessageAC(message, channelForAdd));
|
|
14836
|
-
case
|
|
14854
|
+
case 54:
|
|
14837
14855
|
if (!(_channel5.id === _activeChannelId5)) {
|
|
14838
|
-
_context.n =
|
|
14856
|
+
_context.n = 56;
|
|
14839
14857
|
break;
|
|
14840
14858
|
}
|
|
14841
14859
|
if (getHasNextCached()) {
|
|
14842
|
-
_context.n =
|
|
14860
|
+
_context.n = 55;
|
|
14843
14861
|
break;
|
|
14844
14862
|
}
|
|
14845
|
-
_context.n =
|
|
14863
|
+
_context.n = 55;
|
|
14846
14864
|
return effects.put(addMessageAC(message));
|
|
14847
|
-
case
|
|
14865
|
+
case 55:
|
|
14848
14866
|
addAllMessages([message], MESSAGE_LOAD_DIRECTION.NEXT);
|
|
14849
14867
|
hasNextMessage = store.getState().MessageReducer.messagesHasNext;
|
|
14850
14868
|
if (!(!getHasNextCached() && !hasNextMessage)) {
|
|
14851
|
-
_context.n =
|
|
14869
|
+
_context.n = 56;
|
|
14852
14870
|
break;
|
|
14853
14871
|
}
|
|
14854
|
-
_context.n =
|
|
14872
|
+
_context.n = 56;
|
|
14855
14873
|
return effects.put(scrollToNewMessageAC(true, false, true));
|
|
14856
|
-
case
|
|
14874
|
+
case 56:
|
|
14857
14875
|
addMessageToMap(_channel5.id, message);
|
|
14858
|
-
_context.n =
|
|
14876
|
+
_context.n = 57;
|
|
14859
14877
|
return effects.put(updateChannelDataAC(_channel5.id, {
|
|
14860
14878
|
messageCount: channelForAdd.messageCount,
|
|
14861
14879
|
unread: channelForAdd.unread,
|
|
@@ -14871,9 +14889,9 @@ function watchForEvents() {
|
|
|
14871
14889
|
userMessageReactions: [],
|
|
14872
14890
|
lastReactedMessage: null
|
|
14873
14891
|
}));
|
|
14874
|
-
case
|
|
14892
|
+
case 57:
|
|
14875
14893
|
_groupName4 = getChannelGroupName(_channel5);
|
|
14876
|
-
_context.n =
|
|
14894
|
+
_context.n = 58;
|
|
14877
14895
|
return effects.put(updateSearchedChannelDataAC(_channel5.id, {
|
|
14878
14896
|
messageCount: channelForAdd.messageCount,
|
|
14879
14897
|
unread: channelForAdd.unread,
|
|
@@ -14889,27 +14907,27 @@ function watchForEvents() {
|
|
|
14889
14907
|
userMessageReactions: [],
|
|
14890
14908
|
lastReactedMessage: null
|
|
14891
14909
|
}, _groupName4));
|
|
14892
|
-
case
|
|
14910
|
+
case 58:
|
|
14893
14911
|
showNotifications = getShowNotifications();
|
|
14894
14912
|
if (!(showNotifications && !message.silent && message.user.id !== SceytChatClient.user.id && !_channel5.muted)) {
|
|
14895
|
-
_context.n =
|
|
14913
|
+
_context.n = 61;
|
|
14896
14914
|
break;
|
|
14897
14915
|
}
|
|
14898
14916
|
if (!(Notification.permission === 'granted')) {
|
|
14899
|
-
_context.n =
|
|
14917
|
+
_context.n = 61;
|
|
14900
14918
|
break;
|
|
14901
14919
|
}
|
|
14902
|
-
_context.n =
|
|
14920
|
+
_context.n = 59;
|
|
14903
14921
|
return effects.select(browserTabIsActiveSelector);
|
|
14904
|
-
case
|
|
14922
|
+
case 59:
|
|
14905
14923
|
tabIsActive = _context.v;
|
|
14906
14924
|
if (!(document.visibilityState !== 'visible' || !tabIsActive || _channel5.id !== _activeChannelId5)) {
|
|
14907
|
-
_context.n =
|
|
14925
|
+
_context.n = 61;
|
|
14908
14926
|
break;
|
|
14909
14927
|
}
|
|
14910
|
-
_context.n =
|
|
14928
|
+
_context.n = 60;
|
|
14911
14929
|
return effects.select(contactsMapSelector);
|
|
14912
|
-
case
|
|
14930
|
+
case 60:
|
|
14913
14931
|
contactsMap = _context.v;
|
|
14914
14932
|
_getFromContacts = getShowOnlyContactUsers();
|
|
14915
14933
|
state = store.getState();
|
|
@@ -14929,20 +14947,20 @@ function watchForEvents() {
|
|
|
14929
14947
|
setNotification(messageBody, message.user, _channel5, undefined, message.attachments && message.attachments.length ? message.attachments.find(function (att) {
|
|
14930
14948
|
return att.type !== attachmentTypes.link;
|
|
14931
14949
|
}) : undefined);
|
|
14932
|
-
case
|
|
14950
|
+
case 61:
|
|
14933
14951
|
if (!(message.repliedInThread && message.parentMessage.id)) {
|
|
14934
|
-
_context.n =
|
|
14952
|
+
_context.n = 63;
|
|
14935
14953
|
break;
|
|
14936
14954
|
}
|
|
14937
|
-
_context.n =
|
|
14955
|
+
_context.n = 62;
|
|
14938
14956
|
return effects.put(markMessagesAsDeliveredAC(message.parentMessage.id, [message.id]));
|
|
14939
|
-
case
|
|
14940
|
-
_context.n =
|
|
14957
|
+
case 62:
|
|
14958
|
+
_context.n = 64;
|
|
14941
14959
|
break;
|
|
14942
|
-
case
|
|
14943
|
-
_context.n =
|
|
14960
|
+
case 63:
|
|
14961
|
+
_context.n = 64;
|
|
14944
14962
|
return effects.put(markMessagesAsDeliveredAC(_channel5.id, [message.id]));
|
|
14945
|
-
case
|
|
14963
|
+
case 64:
|
|
14946
14964
|
updateChannelOnAllChannels(_channel5.id, {
|
|
14947
14965
|
messageCount: channelForAdd.messageCount,
|
|
14948
14966
|
unread: channelForAdd.unread,
|
|
@@ -14959,50 +14977,50 @@ function watchForEvents() {
|
|
|
14959
14977
|
userMessageReactions: _channel5.userMessageReactions
|
|
14960
14978
|
});
|
|
14961
14979
|
updateChannelLastMessageOnAllChannels(_channel5.id, _channel5.lastMessage);
|
|
14962
|
-
case
|
|
14963
|
-
return _context.a(3,
|
|
14964
|
-
case
|
|
14980
|
+
case 65:
|
|
14981
|
+
return _context.a(3, 183);
|
|
14982
|
+
case 66:
|
|
14965
14983
|
channelId = args.channelId, markerList = args.markerList;
|
|
14966
|
-
_context.n =
|
|
14984
|
+
_context.n = 67;
|
|
14967
14985
|
return effects.call(getChannelFromMap, channelId);
|
|
14968
|
-
case
|
|
14986
|
+
case 67:
|
|
14969
14987
|
_channel6 = _context.v;
|
|
14970
14988
|
log.info('channel MESSAGE_MARKERS_RECEIVED ... channel: ', _channel6, 'markers list: ', markerList);
|
|
14971
14989
|
if (!_channel6) {
|
|
14972
|
-
_context.n =
|
|
14990
|
+
_context.n = 78;
|
|
14973
14991
|
break;
|
|
14974
14992
|
}
|
|
14975
|
-
_context.n =
|
|
14993
|
+
_context.n = 68;
|
|
14976
14994
|
return effects.call(getActiveChannelId);
|
|
14977
|
-
case
|
|
14995
|
+
case 68:
|
|
14978
14996
|
_activeChannelId6 = _context.v;
|
|
14979
14997
|
updateLastMessage = false;
|
|
14980
14998
|
markersMap = {};
|
|
14981
14999
|
activeChannelMessages = getMessagesFromMap(_activeChannelId6);
|
|
14982
15000
|
_iterator = _createForOfIteratorHelperLoose(markerList.messageIds);
|
|
14983
|
-
case
|
|
15001
|
+
case 69:
|
|
14984
15002
|
if ((_step = _iterator()).done) {
|
|
14985
|
-
_context.n =
|
|
15003
|
+
_context.n = 74;
|
|
14986
15004
|
break;
|
|
14987
15005
|
}
|
|
14988
15006
|
messageId = _step.value;
|
|
14989
15007
|
if (!(activeChannelMessages !== null && activeChannelMessages !== void 0 && activeChannelMessages[messageId])) {
|
|
14990
|
-
_context.n =
|
|
15008
|
+
_context.n = 71;
|
|
14991
15009
|
break;
|
|
14992
15010
|
}
|
|
14993
|
-
_context.n =
|
|
15011
|
+
_context.n = 70;
|
|
14994
15012
|
return effects.put(removePendingMessageAC(channelId, messageId));
|
|
14995
|
-
case
|
|
14996
|
-
_context.n =
|
|
15013
|
+
case 70:
|
|
15014
|
+
_context.n = 72;
|
|
14997
15015
|
break;
|
|
14998
|
-
case
|
|
15016
|
+
case 71:
|
|
14999
15017
|
isPendingMessage = getMessageFromPendingMessagesMap(_activeChannelId6, messageId);
|
|
15000
15018
|
if (isPendingMessage) {
|
|
15001
15019
|
updatePendingMessageOnMap(_activeChannelId6, messageId, {
|
|
15002
15020
|
deliveryStatus: markerList.name
|
|
15003
15021
|
});
|
|
15004
15022
|
}
|
|
15005
|
-
case
|
|
15023
|
+
case 72:
|
|
15006
15024
|
markersMap[messageId] = true;
|
|
15007
15025
|
if (_channel6) {
|
|
15008
15026
|
if (_channel6.lastMessage && messageId === _channel6.lastMessage.id) {
|
|
@@ -15013,102 +15031,102 @@ function watchForEvents() {
|
|
|
15013
15031
|
id: messageId,
|
|
15014
15032
|
deliveryStatus: markerList.name
|
|
15015
15033
|
});
|
|
15016
|
-
case
|
|
15017
|
-
_context.n =
|
|
15034
|
+
case 73:
|
|
15035
|
+
_context.n = 69;
|
|
15018
15036
|
break;
|
|
15019
|
-
case
|
|
15037
|
+
case 74:
|
|
15020
15038
|
if (!updateLastMessage) {
|
|
15021
|
-
_context.n =
|
|
15039
|
+
_context.n = 75;
|
|
15022
15040
|
break;
|
|
15023
15041
|
}
|
|
15024
15042
|
lastMessage = _extends({}, _channel6.lastMessage, updateMessageDeliveryStatusAndMarkers(_channel6.lastMessage, markerList.name));
|
|
15025
15043
|
updateChannelLastMessageOnAllChannels(_channel6.id, lastMessage);
|
|
15026
|
-
_context.n =
|
|
15044
|
+
_context.n = 75;
|
|
15027
15045
|
return effects.put(updateChannelLastMessageStatusAC(lastMessage, _channel6));
|
|
15028
|
-
case
|
|
15046
|
+
case 75:
|
|
15029
15047
|
if (!(_activeChannelId6 === channelId)) {
|
|
15030
|
-
_context.n =
|
|
15048
|
+
_context.n = 77;
|
|
15031
15049
|
break;
|
|
15032
15050
|
}
|
|
15033
|
-
_context.n =
|
|
15051
|
+
_context.n = 76;
|
|
15034
15052
|
return effects.put(updateMessagesStatusAC(markerList.name, markersMap));
|
|
15035
|
-
case
|
|
15053
|
+
case 76:
|
|
15036
15054
|
updateMarkersOnAllMessages(markersMap, markerList.name);
|
|
15037
|
-
case
|
|
15055
|
+
case 77:
|
|
15038
15056
|
updateMessageStatusOnMap(_channel6.id, {
|
|
15039
15057
|
name: markerList.name,
|
|
15040
15058
|
markersMap: markersMap
|
|
15041
15059
|
});
|
|
15042
15060
|
updateMessageStatusOnAllMessages(markerList.name, markersMap);
|
|
15043
|
-
_context.n =
|
|
15061
|
+
_context.n = 78;
|
|
15044
15062
|
return effects.put(updateMessagesMarkersAC(channelId, markerList.name, markerList));
|
|
15045
|
-
case
|
|
15046
|
-
return _context.a(3,
|
|
15047
|
-
case
|
|
15063
|
+
case 78:
|
|
15064
|
+
return _context.a(3, 183);
|
|
15065
|
+
case 79:
|
|
15048
15066
|
_channelId = args.channelId;
|
|
15049
15067
|
log.info('channel DELETE ... ');
|
|
15050
15068
|
_channel7 = getChannelFromMap(_channelId);
|
|
15051
|
-
_context.n =
|
|
15069
|
+
_context.n = 80;
|
|
15052
15070
|
return effects.put(setChannelToRemoveAC(_channel7));
|
|
15053
|
-
case
|
|
15071
|
+
case 80:
|
|
15054
15072
|
deleteChannelFromAllChannels(_channelId);
|
|
15055
|
-
return _context.a(3,
|
|
15056
|
-
case
|
|
15073
|
+
return _context.a(3, 183);
|
|
15074
|
+
case 81:
|
|
15057
15075
|
_channel8 = args.channel, deletedMessage = args.deletedMessage;
|
|
15058
|
-
_context.n =
|
|
15076
|
+
_context.n = 82;
|
|
15059
15077
|
return effects.call(getActiveChannelId);
|
|
15060
|
-
case
|
|
15078
|
+
case 82:
|
|
15061
15079
|
_activeChannelId7 = _context.v;
|
|
15062
15080
|
log.info('channel DELETE_MESSAGE ... ');
|
|
15063
15081
|
_channelExists7 = checkChannelExists(_channel8.id);
|
|
15064
15082
|
if (!(_channel8.id === _activeChannelId7)) {
|
|
15065
|
-
_context.n =
|
|
15083
|
+
_context.n = 83;
|
|
15066
15084
|
break;
|
|
15067
15085
|
}
|
|
15068
15086
|
updateMessageOnAllMessages(deletedMessage.id, deletedMessage);
|
|
15069
|
-
_context.n =
|
|
15087
|
+
_context.n = 83;
|
|
15070
15088
|
return effects.put(updateMessageAC(deletedMessage.id, deletedMessage));
|
|
15071
|
-
case
|
|
15089
|
+
case 83:
|
|
15072
15090
|
updateMessageOnMap(_channel8.id, {
|
|
15073
15091
|
messageId: deletedMessage.id,
|
|
15074
15092
|
params: deletedMessage
|
|
15075
15093
|
});
|
|
15076
15094
|
if (!_channelExists7) {
|
|
15077
|
-
_context.n =
|
|
15095
|
+
_context.n = 85;
|
|
15078
15096
|
break;
|
|
15079
15097
|
}
|
|
15080
|
-
_context.n =
|
|
15098
|
+
_context.n = 84;
|
|
15081
15099
|
return effects.put(updateChannelDataAC(_channel8.id, {
|
|
15082
15100
|
newMessageCount: _channel8.newMessageCount,
|
|
15083
15101
|
muted: _channel8.muted,
|
|
15084
15102
|
mutedTill: _channel8.mutedTill
|
|
15085
15103
|
}));
|
|
15086
|
-
case
|
|
15104
|
+
case 84:
|
|
15087
15105
|
if (!(_channel8.lastMessage.id === deletedMessage.id)) {
|
|
15088
|
-
_context.n =
|
|
15106
|
+
_context.n = 85;
|
|
15089
15107
|
break;
|
|
15090
15108
|
}
|
|
15091
|
-
_context.n =
|
|
15109
|
+
_context.n = 85;
|
|
15092
15110
|
return effects.put(updateChannelLastMessageAC(deletedMessage, _channel8));
|
|
15093
|
-
case
|
|
15111
|
+
case 85:
|
|
15094
15112
|
updateChannelOnAllChannels(_channel8.id, {
|
|
15095
15113
|
newMessageCount: _channel8.newMessageCount,
|
|
15096
15114
|
muted: _channel8.muted,
|
|
15097
15115
|
mutedTill: _channel8.mutedTill
|
|
15098
15116
|
}, deletedMessage);
|
|
15099
|
-
return _context.a(3,
|
|
15100
|
-
case
|
|
15117
|
+
return _context.a(3, 183);
|
|
15118
|
+
case 86:
|
|
15101
15119
|
_channel9 = args.channel, _message = args.message;
|
|
15102
|
-
_context.n =
|
|
15120
|
+
_context.n = 87;
|
|
15103
15121
|
return effects.call(getActiveChannelId);
|
|
15104
|
-
case
|
|
15122
|
+
case 87:
|
|
15105
15123
|
_activeChannelId8 = _context.v;
|
|
15106
15124
|
_channelExists8 = checkChannelExists(_channel9.id);
|
|
15107
15125
|
if (!(_channel9.id === _activeChannelId8)) {
|
|
15108
|
-
_context.n =
|
|
15126
|
+
_context.n = 89;
|
|
15109
15127
|
break;
|
|
15110
15128
|
}
|
|
15111
|
-
_context.n =
|
|
15129
|
+
_context.n = 88;
|
|
15112
15130
|
return effects.put(updateMessageAC(_message.id, {
|
|
15113
15131
|
body: _message.body,
|
|
15114
15132
|
state: _message.state,
|
|
@@ -15117,7 +15135,7 @@ function watchForEvents() {
|
|
|
15117
15135
|
mentionedUsers: _message.mentionedUsers,
|
|
15118
15136
|
updatedAt: _message.updatedAt
|
|
15119
15137
|
}));
|
|
15120
|
-
case
|
|
15138
|
+
case 88:
|
|
15121
15139
|
updateMessageOnAllMessages(_message.id, {
|
|
15122
15140
|
body: _message.body,
|
|
15123
15141
|
state: _message.state,
|
|
@@ -15126,18 +15144,18 @@ function watchForEvents() {
|
|
|
15126
15144
|
mentionedUsers: _message.mentionedUsers,
|
|
15127
15145
|
updatedAt: _message.updatedAt
|
|
15128
15146
|
});
|
|
15129
|
-
case
|
|
15147
|
+
case 89:
|
|
15130
15148
|
if (!_channelExists8) {
|
|
15131
|
-
_context.n =
|
|
15149
|
+
_context.n = 90;
|
|
15132
15150
|
break;
|
|
15133
15151
|
}
|
|
15134
15152
|
if (!(_channel9.lastMessage.id === _message.id)) {
|
|
15135
|
-
_context.n =
|
|
15153
|
+
_context.n = 90;
|
|
15136
15154
|
break;
|
|
15137
15155
|
}
|
|
15138
|
-
_context.n =
|
|
15156
|
+
_context.n = 90;
|
|
15139
15157
|
return effects.put(updateChannelLastMessageAC(_message, _channel9));
|
|
15140
|
-
case
|
|
15158
|
+
case 90:
|
|
15141
15159
|
if (checkChannelExistsOnMessagesMap(_channel9.id)) {
|
|
15142
15160
|
updateMessageOnMap(_channel9.id, {
|
|
15143
15161
|
messageId: _message.id,
|
|
@@ -15145,38 +15163,38 @@ function watchForEvents() {
|
|
|
15145
15163
|
});
|
|
15146
15164
|
}
|
|
15147
15165
|
updateChannelOnAllChannels(_channel9.id, {}, _message);
|
|
15148
|
-
return _context.a(3,
|
|
15149
|
-
case
|
|
15166
|
+
return _context.a(3, 183);
|
|
15167
|
+
case 91:
|
|
15150
15168
|
_channel0 = args.channel, user = args.user, _message2 = args.message, reaction = args.reaction;
|
|
15151
15169
|
isSelf = user.id === SceytChatClient.user.id;
|
|
15152
|
-
_context.n =
|
|
15170
|
+
_context.n = 92;
|
|
15153
15171
|
return effects.call(getActiveChannelId);
|
|
15154
|
-
case
|
|
15172
|
+
case 92:
|
|
15155
15173
|
_activeChannelId9 = _context.v;
|
|
15156
15174
|
if (!(_channel0.id === _activeChannelId9)) {
|
|
15157
|
-
_context.n =
|
|
15175
|
+
_context.n = 94;
|
|
15158
15176
|
break;
|
|
15159
15177
|
}
|
|
15160
|
-
_context.n =
|
|
15178
|
+
_context.n = 93;
|
|
15161
15179
|
return effects.put(addReactionToMessageAC(_message2, reaction, isSelf));
|
|
15162
|
-
case
|
|
15180
|
+
case 93:
|
|
15163
15181
|
addReactionOnAllMessages(_message2, reaction, true);
|
|
15164
|
-
case
|
|
15182
|
+
case 94:
|
|
15165
15183
|
if (!(_message2.user.id === SceytChatClient.user.id)) {
|
|
15166
|
-
_context.n =
|
|
15184
|
+
_context.n = 98;
|
|
15167
15185
|
break;
|
|
15168
15186
|
}
|
|
15169
15187
|
if (!(!isSelf && Notification.permission === 'granted')) {
|
|
15170
|
-
_context.n =
|
|
15188
|
+
_context.n = 96;
|
|
15171
15189
|
break;
|
|
15172
15190
|
}
|
|
15173
15191
|
if (!(document.visibilityState !== 'visible' || _channel0.id !== _activeChannelId9)) {
|
|
15174
|
-
_context.n =
|
|
15192
|
+
_context.n = 96;
|
|
15175
15193
|
break;
|
|
15176
15194
|
}
|
|
15177
|
-
_context.n =
|
|
15195
|
+
_context.n = 95;
|
|
15178
15196
|
return effects.select(contactsMapSelector);
|
|
15179
|
-
case
|
|
15197
|
+
case 95:
|
|
15180
15198
|
_contactsMap = _context.v;
|
|
15181
15199
|
_getFromContacts2 = getShowOnlyContactUsers();
|
|
15182
15200
|
_state = store.getState();
|
|
@@ -15196,9 +15214,9 @@ function watchForEvents() {
|
|
|
15196
15214
|
setNotification(_messageBody, reaction.user, _channel0, reaction.key, _message2.attachments && _message2.attachments.length ? _message2.attachments.find(function (att) {
|
|
15197
15215
|
return att.type !== attachmentTypes.link;
|
|
15198
15216
|
}) : undefined);
|
|
15199
|
-
case
|
|
15217
|
+
case 96:
|
|
15200
15218
|
if (!(_channel0.newReactions && _channel0.newReactions.length)) {
|
|
15201
|
-
_context.n =
|
|
15219
|
+
_context.n = 97;
|
|
15202
15220
|
break;
|
|
15203
15221
|
}
|
|
15204
15222
|
channelUpdateParams = {
|
|
@@ -15208,9 +15226,9 @@ function watchForEvents() {
|
|
|
15208
15226
|
muted: _channel0.muted,
|
|
15209
15227
|
mutedTill: _channel0.mutedTill
|
|
15210
15228
|
};
|
|
15211
|
-
_context.n =
|
|
15229
|
+
_context.n = 97;
|
|
15212
15230
|
return effects.put(updateChannelDataAC(_channel0.id, channelUpdateParams));
|
|
15213
|
-
case
|
|
15231
|
+
case 97:
|
|
15214
15232
|
updateChannelOnAllChannels(_channel0.id, {
|
|
15215
15233
|
userMessageReactions: _channel0.newReactions,
|
|
15216
15234
|
lastReactedMessage: _message2,
|
|
@@ -15218,17 +15236,17 @@ function watchForEvents() {
|
|
|
15218
15236
|
muted: _channel0.muted,
|
|
15219
15237
|
mutedTill: _channel0.mutedTill
|
|
15220
15238
|
});
|
|
15221
|
-
case
|
|
15239
|
+
case 98:
|
|
15222
15240
|
if (checkChannelExistsOnMessagesMap(_channel0.id)) {
|
|
15223
15241
|
addReactionToMessageOnMap(_channel0.id, _message2, reaction, true);
|
|
15224
15242
|
}
|
|
15225
|
-
return _context.a(3,
|
|
15226
|
-
case
|
|
15243
|
+
return _context.a(3, 183);
|
|
15244
|
+
case 99:
|
|
15227
15245
|
_channel1 = args.channel, pollDetails = args.pollDetails, _messageId = args.messageId;
|
|
15228
15246
|
pollDetailsData = pollDetails;
|
|
15229
|
-
_context.n =
|
|
15247
|
+
_context.n = 100;
|
|
15230
15248
|
return effects.call(getActiveChannelId);
|
|
15231
|
-
case
|
|
15249
|
+
case 100:
|
|
15232
15250
|
_activeChannelId0 = _context.v;
|
|
15233
15251
|
addedVotes = (pollDetailsData === null || pollDetailsData === void 0 ? void 0 : (_pollDetailsData$chan = pollDetailsData.changedVotes) === null || _pollDetailsData$chan === void 0 ? void 0 : _pollDetailsData$chan.addedVotes) || [];
|
|
15234
15252
|
deletedVotes = (pollDetailsData === null || pollDetailsData === void 0 ? void 0 : (_pollDetailsData$chan2 = pollDetailsData.changedVotes) === null || _pollDetailsData$chan2 === void 0 ? void 0 : _pollDetailsData$chan2.removedVotes) || [];
|
|
@@ -15250,39 +15268,39 @@ function watchForEvents() {
|
|
|
15250
15268
|
});
|
|
15251
15269
|
}
|
|
15252
15270
|
_i = 0, _objs = objs;
|
|
15253
|
-
case
|
|
15271
|
+
case 101:
|
|
15254
15272
|
if (!(_i < _objs.length)) {
|
|
15255
|
-
_context.n =
|
|
15273
|
+
_context.n = 105;
|
|
15256
15274
|
break;
|
|
15257
15275
|
}
|
|
15258
15276
|
obj = _objs[_i];
|
|
15259
15277
|
if (!(pollDetailsData !== null && pollDetailsData !== void 0 && pollDetailsData.id && obj.vote)) {
|
|
15260
|
-
_context.n =
|
|
15278
|
+
_context.n = 104;
|
|
15261
15279
|
break;
|
|
15262
15280
|
}
|
|
15263
15281
|
key = pollDetailsData.id + "_" + obj.vote.optionId;
|
|
15264
15282
|
hasNext = ((_store$getState$Messa = store.getState().MessageReducer.pollVotesHasMore) === null || _store$getState$Messa === void 0 ? void 0 : _store$getState$Messa[key]) || false;
|
|
15265
15283
|
if (!(obj.type === 'addOwn')) {
|
|
15266
|
-
_context.n =
|
|
15284
|
+
_context.n = 103;
|
|
15267
15285
|
break;
|
|
15268
15286
|
}
|
|
15269
|
-
_context.n =
|
|
15287
|
+
_context.n = 102;
|
|
15270
15288
|
return effects.put(addPollVotesToListAC(pollDetailsData.id, obj.vote.optionId, [obj.vote], hasNext, undefined));
|
|
15271
|
-
case
|
|
15272
|
-
_context.n =
|
|
15289
|
+
case 102:
|
|
15290
|
+
_context.n = 104;
|
|
15273
15291
|
break;
|
|
15274
|
-
case
|
|
15275
|
-
_context.n =
|
|
15292
|
+
case 103:
|
|
15293
|
+
_context.n = 104;
|
|
15276
15294
|
return effects.put(deletePollVotesFromListAC(pollDetailsData.id, obj.vote.optionId, [obj.vote], _messageId));
|
|
15277
|
-
case
|
|
15295
|
+
case 104:
|
|
15278
15296
|
_i++;
|
|
15279
|
-
_context.n =
|
|
15297
|
+
_context.n = 101;
|
|
15280
15298
|
break;
|
|
15281
|
-
case
|
|
15299
|
+
case 105:
|
|
15282
15300
|
_i2 = 0, _objs2 = objs;
|
|
15283
|
-
case
|
|
15301
|
+
case 106:
|
|
15284
15302
|
if (!(_i2 < _objs2.length)) {
|
|
15285
|
-
_context.n =
|
|
15303
|
+
_context.n = 108;
|
|
15286
15304
|
break;
|
|
15287
15305
|
}
|
|
15288
15306
|
_obj = _objs2[_i2];
|
|
@@ -15295,24 +15313,24 @@ function watchForEvents() {
|
|
|
15295
15313
|
incrementVotesPerOptionCount: _obj.incrementVotesPerOptionCount
|
|
15296
15314
|
});
|
|
15297
15315
|
if (!(_channel1.id === _activeChannelId0)) {
|
|
15298
|
-
_context.n =
|
|
15316
|
+
_context.n = 107;
|
|
15299
15317
|
break;
|
|
15300
15318
|
}
|
|
15301
15319
|
updateMessageOnAllMessages(_messageId, {}, _obj);
|
|
15302
|
-
_context.n =
|
|
15320
|
+
_context.n = 107;
|
|
15303
15321
|
return effects.put(updateMessageAC(_messageId, {}, undefined, _obj));
|
|
15304
|
-
case
|
|
15322
|
+
case 107:
|
|
15305
15323
|
_i2++;
|
|
15306
|
-
_context.n =
|
|
15324
|
+
_context.n = 106;
|
|
15307
15325
|
break;
|
|
15308
|
-
case
|
|
15309
|
-
return _context.a(3,
|
|
15310
|
-
case
|
|
15326
|
+
case 108:
|
|
15327
|
+
return _context.a(3, 183);
|
|
15328
|
+
case 109:
|
|
15311
15329
|
_channel10 = args.channel, _pollDetails = args.pollDetails, _messageId2 = args.messageId;
|
|
15312
15330
|
_pollDetailsData = _pollDetails;
|
|
15313
|
-
_context.n =
|
|
15331
|
+
_context.n = 110;
|
|
15314
15332
|
return effects.call(getActiveChannelId);
|
|
15315
|
-
case
|
|
15333
|
+
case 110:
|
|
15316
15334
|
_activeChannelId1 = _context.v;
|
|
15317
15335
|
_deletedVotes = (_pollDetailsData === null || _pollDetailsData === void 0 ? void 0 : (_pollDetailsData$chan3 = _pollDetailsData.changedVotes) === null || _pollDetailsData$chan3 === void 0 ? void 0 : _pollDetailsData$chan3.removedVotes) || [];
|
|
15318
15336
|
_objs3 = [];
|
|
@@ -15325,27 +15343,27 @@ function watchForEvents() {
|
|
|
15325
15343
|
});
|
|
15326
15344
|
}
|
|
15327
15345
|
_i3 = 0, _objs4 = _objs3;
|
|
15328
|
-
case
|
|
15346
|
+
case 111:
|
|
15329
15347
|
if (!(_i3 < _objs4.length)) {
|
|
15330
|
-
_context.n =
|
|
15348
|
+
_context.n = 113;
|
|
15331
15349
|
break;
|
|
15332
15350
|
}
|
|
15333
15351
|
_obj2 = _objs4[_i3];
|
|
15334
15352
|
if (!(_pollDetailsData !== null && _pollDetailsData !== void 0 && _pollDetailsData.id && _obj2.vote)) {
|
|
15335
|
-
_context.n =
|
|
15353
|
+
_context.n = 112;
|
|
15336
15354
|
break;
|
|
15337
15355
|
}
|
|
15338
|
-
_context.n =
|
|
15356
|
+
_context.n = 112;
|
|
15339
15357
|
return effects.put(deletePollVotesFromListAC(_pollDetailsData.id, _obj2.vote.optionId, [_obj2.vote], _messageId2));
|
|
15340
|
-
case
|
|
15358
|
+
case 112:
|
|
15341
15359
|
_i3++;
|
|
15342
|
-
_context.n =
|
|
15360
|
+
_context.n = 111;
|
|
15343
15361
|
break;
|
|
15344
|
-
case
|
|
15362
|
+
case 113:
|
|
15345
15363
|
_i4 = 0, _objs5 = _objs3;
|
|
15346
|
-
case
|
|
15364
|
+
case 114:
|
|
15347
15365
|
if (!(_i4 < _objs5.length)) {
|
|
15348
|
-
_context.n =
|
|
15366
|
+
_context.n = 116;
|
|
15349
15367
|
break;
|
|
15350
15368
|
}
|
|
15351
15369
|
_obj3 = _objs5[_i4];
|
|
@@ -15354,23 +15372,23 @@ function watchForEvents() {
|
|
|
15354
15372
|
params: {}
|
|
15355
15373
|
}, _obj3);
|
|
15356
15374
|
if (!(_channel10.id === _activeChannelId1)) {
|
|
15357
|
-
_context.n =
|
|
15375
|
+
_context.n = 115;
|
|
15358
15376
|
break;
|
|
15359
15377
|
}
|
|
15360
15378
|
updateMessageOnAllMessages(_messageId2, {}, _obj3);
|
|
15361
|
-
_context.n =
|
|
15379
|
+
_context.n = 115;
|
|
15362
15380
|
return effects.put(updateMessageAC(_messageId2, {}, undefined, _obj3));
|
|
15363
|
-
case
|
|
15381
|
+
case 115:
|
|
15364
15382
|
_i4++;
|
|
15365
|
-
_context.n =
|
|
15383
|
+
_context.n = 114;
|
|
15366
15384
|
break;
|
|
15367
|
-
case
|
|
15368
|
-
return _context.a(3,
|
|
15369
|
-
case
|
|
15385
|
+
case 116:
|
|
15386
|
+
return _context.a(3, 183);
|
|
15387
|
+
case 117:
|
|
15370
15388
|
_channel11 = args.channel, _pollDetails2 = args.pollDetails, _messageId3 = args.messageId;
|
|
15371
|
-
_context.n =
|
|
15389
|
+
_context.n = 118;
|
|
15372
15390
|
return effects.call(getActiveChannelId);
|
|
15373
|
-
case
|
|
15391
|
+
case 118:
|
|
15374
15392
|
_activeChannelId10 = _context.v;
|
|
15375
15393
|
_pollDetailsData2 = _pollDetails2;
|
|
15376
15394
|
retractedVotes = (_pollDetailsData2 === null || _pollDetailsData2 === void 0 ? void 0 : (_pollDetailsData2$cha = _pollDetailsData2.changedVotes) === null || _pollDetailsData2$cha === void 0 ? void 0 : _pollDetailsData2$cha.removedVotes) || [];
|
|
@@ -15384,9 +15402,9 @@ function watchForEvents() {
|
|
|
15384
15402
|
});
|
|
15385
15403
|
}
|
|
15386
15404
|
_i5 = 0, _objs7 = _objs6;
|
|
15387
|
-
case
|
|
15405
|
+
case 119:
|
|
15388
15406
|
if (!(_i5 < _objs7.length)) {
|
|
15389
|
-
_context.n =
|
|
15407
|
+
_context.n = 124;
|
|
15390
15408
|
break;
|
|
15391
15409
|
}
|
|
15392
15410
|
_obj4 = _objs7[_i5];
|
|
@@ -15395,40 +15413,40 @@ function watchForEvents() {
|
|
|
15395
15413
|
params: {}
|
|
15396
15414
|
}, _obj4);
|
|
15397
15415
|
if (!(_pollDetailsData2 !== null && _pollDetailsData2 !== void 0 && _pollDetailsData2.id && retractedVotes.length > 0)) {
|
|
15398
|
-
_context.n =
|
|
15416
|
+
_context.n = 122;
|
|
15399
15417
|
break;
|
|
15400
15418
|
}
|
|
15401
15419
|
_iterator6 = _createForOfIteratorHelperLoose(retractedVotes);
|
|
15402
|
-
case
|
|
15420
|
+
case 120:
|
|
15403
15421
|
if ((_step6 = _iterator6()).done) {
|
|
15404
|
-
_context.n =
|
|
15422
|
+
_context.n = 122;
|
|
15405
15423
|
break;
|
|
15406
15424
|
}
|
|
15407
15425
|
_vote3 = _step6.value;
|
|
15408
|
-
_context.n =
|
|
15426
|
+
_context.n = 121;
|
|
15409
15427
|
return effects.put(deletePollVotesFromListAC(_pollDetailsData2.id, _vote3.optionId, [_vote3], _messageId3));
|
|
15410
|
-
case
|
|
15411
|
-
_context.n =
|
|
15428
|
+
case 121:
|
|
15429
|
+
_context.n = 120;
|
|
15412
15430
|
break;
|
|
15413
|
-
case
|
|
15431
|
+
case 122:
|
|
15414
15432
|
if (!(_channel11.id === _activeChannelId10)) {
|
|
15415
|
-
_context.n =
|
|
15433
|
+
_context.n = 123;
|
|
15416
15434
|
break;
|
|
15417
15435
|
}
|
|
15418
15436
|
updateMessageOnAllMessages(_messageId3, {}, _obj4);
|
|
15419
|
-
_context.n =
|
|
15437
|
+
_context.n = 123;
|
|
15420
15438
|
return effects.put(updateMessageAC(_messageId3, {}, undefined, _obj4));
|
|
15421
|
-
case
|
|
15439
|
+
case 123:
|
|
15422
15440
|
_i5++;
|
|
15423
|
-
_context.n =
|
|
15441
|
+
_context.n = 119;
|
|
15424
15442
|
break;
|
|
15425
|
-
case
|
|
15426
|
-
return _context.a(3,
|
|
15427
|
-
case
|
|
15443
|
+
case 124:
|
|
15444
|
+
return _context.a(3, 183);
|
|
15445
|
+
case 125:
|
|
15428
15446
|
_channel12 = args.channel, _messageId4 = args.messageId;
|
|
15429
|
-
_context.n =
|
|
15447
|
+
_context.n = 126;
|
|
15430
15448
|
return effects.call(getActiveChannelId);
|
|
15431
|
-
case
|
|
15449
|
+
case 126:
|
|
15432
15450
|
_activeChannelId11 = _context.v;
|
|
15433
15451
|
_obj5 = {
|
|
15434
15452
|
type: 'close',
|
|
@@ -15439,54 +15457,54 @@ function watchForEvents() {
|
|
|
15439
15457
|
params: {}
|
|
15440
15458
|
}, _obj5);
|
|
15441
15459
|
if (!(_channel12.id === _activeChannelId11)) {
|
|
15442
|
-
_context.n =
|
|
15460
|
+
_context.n = 128;
|
|
15443
15461
|
break;
|
|
15444
15462
|
}
|
|
15445
15463
|
updateMessageOnAllMessages(_messageId4, {}, _obj5);
|
|
15446
|
-
_context.n =
|
|
15464
|
+
_context.n = 127;
|
|
15447
15465
|
return effects.put(updateMessageAC(_messageId4, {}, undefined, _obj5));
|
|
15466
|
+
case 127:
|
|
15467
|
+
return _context.a(3, 183);
|
|
15468
|
+
case 128:
|
|
15469
|
+
return _context.a(3, 183);
|
|
15448
15470
|
case 129:
|
|
15449
|
-
return _context.a(3, 185);
|
|
15450
|
-
case 130:
|
|
15451
|
-
return _context.a(3, 185);
|
|
15452
|
-
case 131:
|
|
15453
15471
|
_channel13 = args.channel, _user = args.user, _message3 = args.message, _reaction = args.reaction;
|
|
15454
15472
|
log.info('channel REACTION_DELETED ... ', _channel13);
|
|
15455
15473
|
channelFromMap = getChannelFromMap(_channel13.id);
|
|
15456
15474
|
_isSelf = _user.id === SceytChatClient.user.id;
|
|
15457
|
-
_context.n =
|
|
15475
|
+
_context.n = 130;
|
|
15458
15476
|
return effects.call(getActiveChannelId);
|
|
15459
|
-
case
|
|
15477
|
+
case 130:
|
|
15460
15478
|
_activeChannelId12 = _context.v;
|
|
15461
15479
|
if (!(_channel13.id === _activeChannelId12)) {
|
|
15462
|
-
_context.n =
|
|
15480
|
+
_context.n = 132;
|
|
15463
15481
|
break;
|
|
15464
15482
|
}
|
|
15465
|
-
_context.n =
|
|
15483
|
+
_context.n = 131;
|
|
15466
15484
|
return effects.put(deleteReactionFromMessageAC(_message3, _reaction, _isSelf));
|
|
15467
|
-
case
|
|
15485
|
+
case 131:
|
|
15468
15486
|
removeReactionOnAllMessages(_message3, _reaction, true);
|
|
15469
|
-
case
|
|
15487
|
+
case 132:
|
|
15470
15488
|
_channelUpdateParams = JSON.parse(JSON.stringify(_channel13));
|
|
15471
15489
|
if (channelFromMap && channelFromMap.lastReactedMessage && channelFromMap.lastReactedMessage.id === _message3.id) {
|
|
15472
15490
|
_channelUpdateParams.lastReactedMessage = null;
|
|
15473
15491
|
}
|
|
15474
|
-
_context.n =
|
|
15492
|
+
_context.n = 133;
|
|
15475
15493
|
return effects.put(updateChannelDataAC(_channel13.id, _channelUpdateParams));
|
|
15476
|
-
case
|
|
15494
|
+
case 133:
|
|
15477
15495
|
updateChannelOnAllChannels(_channel13.id, _channelUpdateParams);
|
|
15478
15496
|
if (checkChannelExistsOnMessagesMap(_channel13.id)) {
|
|
15479
15497
|
removeReactionToMessageOnMap(_channel13.id, _message3, _reaction, true);
|
|
15480
15498
|
}
|
|
15481
|
-
return _context.a(3,
|
|
15482
|
-
case
|
|
15499
|
+
return _context.a(3, 183);
|
|
15500
|
+
case 134:
|
|
15483
15501
|
_channel14 = args.channel;
|
|
15484
15502
|
if (!_channel14) {
|
|
15485
|
-
_context.n =
|
|
15503
|
+
_context.n = 136;
|
|
15486
15504
|
break;
|
|
15487
15505
|
}
|
|
15488
15506
|
_updatedChannel = JSON.parse(JSON.stringify(_channel14));
|
|
15489
|
-
_context.n =
|
|
15507
|
+
_context.n = 135;
|
|
15490
15508
|
return effects.put(updateChannelDataAC(_channel14.id, {
|
|
15491
15509
|
lastMessage: _channel14.lastMessage,
|
|
15492
15510
|
newMessageCount: _channel14.newMessageCount,
|
|
@@ -15499,36 +15517,36 @@ function watchForEvents() {
|
|
|
15499
15517
|
lastDisplayedMessageId: _channel14.lastDisplayedMessageId,
|
|
15500
15518
|
messageRetentionPeriod: _channel14.messageRetentionPeriod
|
|
15501
15519
|
}));
|
|
15502
|
-
case
|
|
15520
|
+
case 135:
|
|
15503
15521
|
updateChannelOnAllChannels(_channel14.id, _updatedChannel);
|
|
15504
|
-
case
|
|
15505
|
-
return _context.a(3,
|
|
15506
|
-
case
|
|
15522
|
+
case 136:
|
|
15523
|
+
return _context.a(3, 183);
|
|
15524
|
+
case 137:
|
|
15507
15525
|
_channel15 = args.channel;
|
|
15508
15526
|
log.info('CLEAR_HISTORY: ', _channel15);
|
|
15509
|
-
_context.n =
|
|
15527
|
+
_context.n = 138;
|
|
15510
15528
|
return effects.call(getActiveChannelId);
|
|
15511
|
-
case
|
|
15529
|
+
case 138:
|
|
15512
15530
|
_activeChannelId13 = _context.v;
|
|
15513
|
-
_context.n =
|
|
15531
|
+
_context.n = 139;
|
|
15514
15532
|
return effects.call(checkChannelExists, _channel15.id);
|
|
15515
|
-
case
|
|
15533
|
+
case 139:
|
|
15516
15534
|
channelExist = _context.v;
|
|
15517
15535
|
if (!(_channel15.id === _activeChannelId13)) {
|
|
15518
|
-
_context.n =
|
|
15536
|
+
_context.n = 141;
|
|
15519
15537
|
break;
|
|
15520
15538
|
}
|
|
15521
|
-
_context.n =
|
|
15539
|
+
_context.n = 140;
|
|
15522
15540
|
return effects.put(clearMessagesAC());
|
|
15523
|
-
case
|
|
15541
|
+
case 140:
|
|
15524
15542
|
removeAllMessages();
|
|
15525
|
-
case
|
|
15543
|
+
case 141:
|
|
15526
15544
|
removeMessagesFromMap(_channel15.id);
|
|
15527
15545
|
if (!channelExist) {
|
|
15528
|
-
_context.n =
|
|
15546
|
+
_context.n = 142;
|
|
15529
15547
|
break;
|
|
15530
15548
|
}
|
|
15531
|
-
_context.n =
|
|
15549
|
+
_context.n = 142;
|
|
15532
15550
|
return effects.put(updateChannelDataAC(_channel15.id, {
|
|
15533
15551
|
lastMessage: null,
|
|
15534
15552
|
newMessageCount: 0,
|
|
@@ -15536,7 +15554,7 @@ function watchForEvents() {
|
|
|
15536
15554
|
muted: _channel15.muted,
|
|
15537
15555
|
mutedTill: _channel15.mutedTill
|
|
15538
15556
|
}));
|
|
15539
|
-
case
|
|
15557
|
+
case 142:
|
|
15540
15558
|
updateChannelOnAllChannels(_channel15.id, {
|
|
15541
15559
|
lastMessage: null,
|
|
15542
15560
|
newMessageCount: 0,
|
|
@@ -15544,260 +15562,260 @@ function watchForEvents() {
|
|
|
15544
15562
|
muted: _channel15.muted,
|
|
15545
15563
|
mutedTill: _channel15.mutedTill
|
|
15546
15564
|
});
|
|
15547
|
-
return _context.a(3,
|
|
15548
|
-
case
|
|
15565
|
+
return _context.a(3, 183);
|
|
15566
|
+
case 143:
|
|
15549
15567
|
_channel16 = args.channel;
|
|
15550
15568
|
log.info('channel MUTE ... ');
|
|
15551
|
-
_context.n =
|
|
15569
|
+
_context.n = 144;
|
|
15552
15570
|
return effects.put(updateChannelDataAC(_channel16.id, {
|
|
15553
15571
|
muted: _channel16.muted,
|
|
15554
15572
|
mutedTill: _channel16.mutedTill
|
|
15555
15573
|
}));
|
|
15556
|
-
case
|
|
15574
|
+
case 144:
|
|
15557
15575
|
updateChannelOnAllChannels(_channel16.id, {
|
|
15558
15576
|
muted: _channel16.muted,
|
|
15559
15577
|
mutedTill: _channel16.mutedTill
|
|
15560
15578
|
});
|
|
15561
|
-
return _context.a(3,
|
|
15562
|
-
case
|
|
15579
|
+
return _context.a(3, 183);
|
|
15580
|
+
case 145:
|
|
15563
15581
|
_channel17 = args.channel;
|
|
15564
15582
|
log.info('channel UNMUTE ... ');
|
|
15565
|
-
_context.n =
|
|
15583
|
+
_context.n = 146;
|
|
15566
15584
|
return effects.put(updateChannelDataAC(_channel17.id, {
|
|
15567
15585
|
muted: _channel17.muted,
|
|
15568
15586
|
mutedTill: _channel17.mutedTill
|
|
15569
15587
|
}));
|
|
15570
|
-
case
|
|
15588
|
+
case 146:
|
|
15571
15589
|
updateChannelOnAllChannels(_channel17.id, {
|
|
15572
15590
|
muted: _channel17.muted,
|
|
15573
15591
|
mutedTill: _channel17.mutedTill
|
|
15574
15592
|
});
|
|
15575
|
-
return _context.a(3,
|
|
15576
|
-
case
|
|
15593
|
+
return _context.a(3, 183);
|
|
15594
|
+
case 147:
|
|
15577
15595
|
_channel18 = args.channel;
|
|
15578
15596
|
log.info('channel PINED ... ');
|
|
15579
|
-
_context.n =
|
|
15597
|
+
_context.n = 148;
|
|
15580
15598
|
return effects.put(updateChannelDataAC(_channel18.id, {
|
|
15581
15599
|
pinnedAt: _channel18.pinnedAt
|
|
15582
15600
|
}, true));
|
|
15583
|
-
case
|
|
15601
|
+
case 148:
|
|
15584
15602
|
updateChannelOnAllChannels(_channel18.id, {
|
|
15585
15603
|
pinnedAt: _channel18.pinnedAt
|
|
15586
15604
|
});
|
|
15587
|
-
return _context.a(3,
|
|
15588
|
-
case
|
|
15605
|
+
return _context.a(3, 183);
|
|
15606
|
+
case 149:
|
|
15589
15607
|
_channel19 = args.channel;
|
|
15590
15608
|
log.info('channel UNPINED ... ');
|
|
15591
|
-
_context.n =
|
|
15609
|
+
_context.n = 150;
|
|
15592
15610
|
return effects.put(updateChannelDataAC(_channel19.id, {
|
|
15593
15611
|
pinnedAt: _channel19.pinnedAt
|
|
15594
15612
|
}, false, true));
|
|
15595
|
-
case
|
|
15613
|
+
case 150:
|
|
15596
15614
|
updateChannelOnAllChannels(_channel19.id, {
|
|
15597
15615
|
pinnedAt: _channel19.pinnedAt
|
|
15598
15616
|
});
|
|
15599
|
-
return _context.a(3,
|
|
15600
|
-
case
|
|
15617
|
+
return _context.a(3, 183);
|
|
15618
|
+
case 151:
|
|
15601
15619
|
_channel20 = args.channel;
|
|
15602
15620
|
log.info('channel HIDE ... ');
|
|
15603
|
-
_context.n =
|
|
15621
|
+
_context.n = 152;
|
|
15604
15622
|
return effects.put(setChannelToHideAC(_channel20));
|
|
15605
|
-
case
|
|
15606
|
-
return _context.a(3,
|
|
15607
|
-
case
|
|
15623
|
+
case 152:
|
|
15624
|
+
return _context.a(3, 183);
|
|
15625
|
+
case 153:
|
|
15608
15626
|
_channel21 = args.channel;
|
|
15609
15627
|
log.info('channel UNHIDE ... ');
|
|
15610
|
-
_context.n =
|
|
15628
|
+
_context.n = 154;
|
|
15611
15629
|
return effects.put(setChannelToUnHideAC(_channel21));
|
|
15612
|
-
case
|
|
15613
|
-
return _context.a(3,
|
|
15614
|
-
case
|
|
15630
|
+
case 154:
|
|
15631
|
+
return _context.a(3, 183);
|
|
15632
|
+
case 155:
|
|
15615
15633
|
_channel22 = args.channel;
|
|
15616
|
-
_context.n =
|
|
15634
|
+
_context.n = 156;
|
|
15617
15635
|
return effects.put(updateChannelDataAC(_channel22.id, {
|
|
15618
15636
|
unread: _channel22.unread,
|
|
15619
15637
|
muted: _channel22.muted,
|
|
15620
15638
|
mutedTill: _channel22.mutedTill
|
|
15621
15639
|
}));
|
|
15622
|
-
case
|
|
15640
|
+
case 156:
|
|
15623
15641
|
_groupName5 = getChannelGroupName(_channel22);
|
|
15624
|
-
_context.n =
|
|
15642
|
+
_context.n = 157;
|
|
15625
15643
|
return effects.put(updateSearchedChannelDataAC(_channel22.id, {
|
|
15626
15644
|
unread: _channel22.unread
|
|
15627
15645
|
}, _groupName5));
|
|
15628
|
-
case
|
|
15646
|
+
case 157:
|
|
15629
15647
|
updateChannelOnAllChannels(_channel22.id, {
|
|
15630
15648
|
unread: _channel22.unread
|
|
15631
15649
|
});
|
|
15632
|
-
return _context.a(3,
|
|
15633
|
-
case
|
|
15650
|
+
return _context.a(3, 183);
|
|
15651
|
+
case 158:
|
|
15634
15652
|
_channel23 = args.channel;
|
|
15635
|
-
_context.n =
|
|
15653
|
+
_context.n = 159;
|
|
15636
15654
|
return effects.put(updateChannelDataAC(_channel23.id, {
|
|
15637
15655
|
unread: _channel23.unread,
|
|
15638
15656
|
muted: _channel23.muted,
|
|
15639
15657
|
mutedTill: _channel23.mutedTill
|
|
15640
15658
|
}));
|
|
15641
|
-
case
|
|
15659
|
+
case 159:
|
|
15642
15660
|
_groupName6 = getChannelGroupName(_channel23);
|
|
15643
|
-
_context.n =
|
|
15661
|
+
_context.n = 160;
|
|
15644
15662
|
return effects.put(updateSearchedChannelDataAC(_channel23.id, {
|
|
15645
15663
|
unread: _channel23.unread
|
|
15646
15664
|
}, _groupName6));
|
|
15647
|
-
case
|
|
15665
|
+
case 160:
|
|
15648
15666
|
updateChannelOnAllChannels(_channel23.id, {
|
|
15649
15667
|
unread: _channel23.unread
|
|
15650
15668
|
});
|
|
15651
|
-
return _context.a(3,
|
|
15652
|
-
case
|
|
15669
|
+
return _context.a(3, 183);
|
|
15670
|
+
case 161:
|
|
15653
15671
|
_channel24 = args.channel, members = args.members;
|
|
15654
15672
|
log.info('channel CHANGE_ROLE channel ... ', _channel24);
|
|
15655
15673
|
log.info('channel CHANGE_ROLE member ... ', members);
|
|
15656
|
-
_context.n =
|
|
15674
|
+
_context.n = 162;
|
|
15657
15675
|
return effects.call(getActiveChannelId);
|
|
15658
|
-
case
|
|
15676
|
+
case 162:
|
|
15659
15677
|
_activeChannelId14 = _context.v;
|
|
15660
15678
|
if (!(_channel24.id === _activeChannelId14)) {
|
|
15661
|
-
_context.n =
|
|
15679
|
+
_context.n = 163;
|
|
15662
15680
|
break;
|
|
15663
15681
|
}
|
|
15664
|
-
_context.n =
|
|
15682
|
+
_context.n = 163;
|
|
15665
15683
|
return effects.put(updateMembersAC(members));
|
|
15666
|
-
case
|
|
15684
|
+
case 163:
|
|
15667
15685
|
i = 0;
|
|
15668
|
-
case
|
|
15686
|
+
case 164:
|
|
15669
15687
|
if (!(i < members.length)) {
|
|
15670
|
-
_context.n =
|
|
15688
|
+
_context.n = 167;
|
|
15671
15689
|
break;
|
|
15672
15690
|
}
|
|
15673
15691
|
if (!(members[i].id === SceytChatClient.user.id)) {
|
|
15674
|
-
_context.n =
|
|
15692
|
+
_context.n = 166;
|
|
15675
15693
|
break;
|
|
15676
15694
|
}
|
|
15677
|
-
_context.n =
|
|
15695
|
+
_context.n = 165;
|
|
15678
15696
|
return effects.put(updateChannelDataAC(_channel24.id, {
|
|
15679
15697
|
userRole: members[i].role,
|
|
15680
15698
|
muted: _channel24.muted,
|
|
15681
15699
|
mutedTill: _channel24.mutedTill
|
|
15682
15700
|
}));
|
|
15683
|
-
case
|
|
15701
|
+
case 165:
|
|
15684
15702
|
updateChannelOnAllChannels(_channel24.id, {
|
|
15685
15703
|
userRole: members[i].role,
|
|
15686
15704
|
muted: _channel24.muted,
|
|
15687
15705
|
mutedTill: _channel24.mutedTill
|
|
15688
15706
|
});
|
|
15689
|
-
case
|
|
15707
|
+
case 166:
|
|
15690
15708
|
i++;
|
|
15691
|
-
_context.n =
|
|
15709
|
+
_context.n = 164;
|
|
15692
15710
|
break;
|
|
15693
|
-
case
|
|
15694
|
-
return _context.a(3,
|
|
15695
|
-
case
|
|
15711
|
+
case 167:
|
|
15712
|
+
return _context.a(3, 183);
|
|
15713
|
+
case 168:
|
|
15696
15714
|
_channel25 = args.channel;
|
|
15697
15715
|
log.info('channel frozen channel ... ', _channel25);
|
|
15698
|
-
return _context.a(3,
|
|
15699
|
-
case
|
|
15716
|
+
return _context.a(3, 183);
|
|
15717
|
+
case 169:
|
|
15700
15718
|
_channel26 = args.channel;
|
|
15701
15719
|
log.info('channel unfrozen channel ... ', _channel26);
|
|
15702
|
-
return _context.a(3,
|
|
15703
|
-
case
|
|
15720
|
+
return _context.a(3, 183);
|
|
15721
|
+
case 170:
|
|
15704
15722
|
_channelId2 = args.channelId, from = args.from, name = args.name;
|
|
15705
15723
|
log.info('channel event received >>>... . . . . . ', args);
|
|
15706
15724
|
if (!(from.id === SceytChatClient.user.id)) {
|
|
15707
|
-
_context.n =
|
|
15725
|
+
_context.n = 171;
|
|
15708
15726
|
break;
|
|
15709
15727
|
}
|
|
15710
|
-
return _context.a(3,
|
|
15711
|
-
case
|
|
15728
|
+
return _context.a(3, 183);
|
|
15729
|
+
case 171:
|
|
15712
15730
|
if (!(name === 'start_typing')) {
|
|
15713
|
-
_context.n =
|
|
15731
|
+
_context.n = 173;
|
|
15714
15732
|
break;
|
|
15715
15733
|
}
|
|
15716
|
-
if (!usersTimeout[_channelId2]) {
|
|
15717
|
-
usersTimeout[_channelId2] = {};
|
|
15734
|
+
if (!usersTimeout.typingTimeout[_channelId2]) {
|
|
15735
|
+
usersTimeout.typingTimeout[_channelId2] = {};
|
|
15718
15736
|
}
|
|
15719
|
-
if (usersTimeout[_channelId2] && usersTimeout[_channelId2][from.id]) {
|
|
15720
|
-
clearTimeout(usersTimeout[_channelId2][from.id]);
|
|
15737
|
+
if (usersTimeout.typingTimeout[_channelId2] && usersTimeout.typingTimeout[_channelId2][from.id]) {
|
|
15738
|
+
clearTimeout(usersTimeout.typingTimeout[_channelId2][from.id]);
|
|
15721
15739
|
}
|
|
15722
|
-
usersTimeout[_channelId2][from.id] = setTimeout(function () {
|
|
15740
|
+
usersTimeout.typingTimeout[_channelId2][from.id] = setTimeout(function () {
|
|
15723
15741
|
channelListener.onReceivedChannelEvent(_channelId2, from, 'stop_typing');
|
|
15724
15742
|
}, 5000);
|
|
15725
|
-
_context.n =
|
|
15743
|
+
_context.n = 172;
|
|
15726
15744
|
return effects.put(switchTypingIndicatorAC(true, _channelId2, from));
|
|
15727
|
-
case
|
|
15728
|
-
_context.n =
|
|
15745
|
+
case 172:
|
|
15746
|
+
_context.n = 178;
|
|
15729
15747
|
break;
|
|
15730
|
-
case
|
|
15748
|
+
case 173:
|
|
15731
15749
|
if (!(name === 'stop_typing')) {
|
|
15732
|
-
_context.n =
|
|
15750
|
+
_context.n = 175;
|
|
15733
15751
|
break;
|
|
15734
15752
|
}
|
|
15735
|
-
if (usersTimeout[_channelId2] && usersTimeout[_channelId2][from.id]) {
|
|
15736
|
-
clearTimeout(usersTimeout[_channelId2][from.id]);
|
|
15753
|
+
if (usersTimeout.typingTimeout[_channelId2] && usersTimeout.typingTimeout[_channelId2][from.id]) {
|
|
15754
|
+
clearTimeout(usersTimeout.typingTimeout[_channelId2][from.id]);
|
|
15737
15755
|
}
|
|
15738
|
-
_context.n =
|
|
15756
|
+
_context.n = 174;
|
|
15739
15757
|
return effects.put(switchTypingIndicatorAC(false, _channelId2, from));
|
|
15740
|
-
case
|
|
15741
|
-
_context.n =
|
|
15758
|
+
case 174:
|
|
15759
|
+
_context.n = 178;
|
|
15742
15760
|
break;
|
|
15743
|
-
case
|
|
15761
|
+
case 175:
|
|
15744
15762
|
if (!(name === 'start_recording')) {
|
|
15745
|
-
_context.n =
|
|
15763
|
+
_context.n = 177;
|
|
15746
15764
|
break;
|
|
15747
15765
|
}
|
|
15748
|
-
if (!usersTimeout[_channelId2]) {
|
|
15749
|
-
usersTimeout[_channelId2] = {};
|
|
15766
|
+
if (!usersTimeout.recordingTimeout[_channelId2]) {
|
|
15767
|
+
usersTimeout.recordingTimeout[_channelId2] = {};
|
|
15750
15768
|
}
|
|
15751
|
-
if (usersTimeout[_channelId2] && usersTimeout[_channelId2][from.id]) {
|
|
15752
|
-
clearTimeout(usersTimeout[_channelId2][from.id]);
|
|
15769
|
+
if (usersTimeout.recordingTimeout[_channelId2] && usersTimeout.recordingTimeout[_channelId2][from.id]) {
|
|
15770
|
+
clearTimeout(usersTimeout.recordingTimeout[_channelId2][from.id]);
|
|
15753
15771
|
}
|
|
15754
|
-
usersTimeout[_channelId2][from.id] = setTimeout(function () {
|
|
15772
|
+
usersTimeout.recordingTimeout[_channelId2][from.id] = setTimeout(function () {
|
|
15755
15773
|
channelListener.onReceivedChannelEvent(_channelId2, from, 'stop_recording');
|
|
15756
15774
|
}, 5000);
|
|
15757
|
-
_context.n =
|
|
15775
|
+
_context.n = 176;
|
|
15758
15776
|
return effects.put(switchRecordingIndicatorAC(true, _channelId2, from));
|
|
15759
|
-
case
|
|
15760
|
-
_context.n =
|
|
15777
|
+
case 176:
|
|
15778
|
+
_context.n = 178;
|
|
15761
15779
|
break;
|
|
15762
|
-
case
|
|
15780
|
+
case 177:
|
|
15763
15781
|
if (!(name === 'stop_recording')) {
|
|
15764
|
-
_context.n =
|
|
15782
|
+
_context.n = 178;
|
|
15765
15783
|
break;
|
|
15766
15784
|
}
|
|
15767
|
-
if (usersTimeout[_channelId2] && usersTimeout[_channelId2][from.id]) {
|
|
15768
|
-
clearTimeout(usersTimeout[_channelId2][from.id]);
|
|
15785
|
+
if (usersTimeout.recordingTimeout[_channelId2] && usersTimeout.recordingTimeout[_channelId2][from.id]) {
|
|
15786
|
+
clearTimeout(usersTimeout.recordingTimeout[_channelId2][from.id]);
|
|
15769
15787
|
}
|
|
15770
|
-
_context.n =
|
|
15788
|
+
_context.n = 178;
|
|
15771
15789
|
return effects.put(switchRecordingIndicatorAC(false, _channelId2, from));
|
|
15772
|
-
case
|
|
15773
|
-
return _context.a(3,
|
|
15774
|
-
case
|
|
15790
|
+
case 178:
|
|
15791
|
+
return _context.a(3, 183);
|
|
15792
|
+
case 179:
|
|
15775
15793
|
status = args.status;
|
|
15776
15794
|
log.info('connection status changed . . . . . ', status);
|
|
15777
|
-
_context.n =
|
|
15795
|
+
_context.n = 180;
|
|
15778
15796
|
return effects.put(setConnectionStatusAC(status));
|
|
15779
|
-
case
|
|
15797
|
+
case 180:
|
|
15780
15798
|
if (!(status === CONNECTION_STATUS.CONNECTED)) {
|
|
15781
|
-
_context.n =
|
|
15799
|
+
_context.n = 181;
|
|
15782
15800
|
break;
|
|
15783
15801
|
}
|
|
15784
|
-
_context.n =
|
|
15802
|
+
_context.n = 181;
|
|
15785
15803
|
return effects.put(getRolesAC());
|
|
15786
|
-
case
|
|
15787
|
-
return _context.a(3,
|
|
15788
|
-
case
|
|
15804
|
+
case 181:
|
|
15805
|
+
return _context.a(3, 183);
|
|
15806
|
+
case 182:
|
|
15789
15807
|
log.warn('UNHANDLED EVENT FROM REDUX-SAGA EVENT-CHANNEL');
|
|
15790
|
-
case
|
|
15791
|
-
_context.n =
|
|
15808
|
+
case 183:
|
|
15809
|
+
_context.n = 185;
|
|
15792
15810
|
break;
|
|
15793
|
-
case
|
|
15794
|
-
_context.p =
|
|
15811
|
+
case 184:
|
|
15812
|
+
_context.p = 184;
|
|
15795
15813
|
_t2 = _context.v;
|
|
15796
15814
|
log.error('Error in watchForEvents:', _t2);
|
|
15797
|
-
case
|
|
15815
|
+
case 185:
|
|
15798
15816
|
return _context.a(2);
|
|
15799
15817
|
}
|
|
15800
|
-
}, _callee, null, [[0,
|
|
15818
|
+
}, _callee, null, [[0, 184]]);
|
|
15801
15819
|
});
|
|
15802
15820
|
case 1:
|
|
15803
15821
|
return _context2.d(_regeneratorValues(_loop()), 2);
|
|
@@ -16206,7 +16224,7 @@ function getChannels(action) {
|
|
|
16206
16224
|
case 23:
|
|
16207
16225
|
_context2.p = 23;
|
|
16208
16226
|
_t4 = _context2.v;
|
|
16209
|
-
log.error(_t4, 'Error on get channels');
|
|
16227
|
+
log.error(JSON.stringify(_t4), 'Error on get channels');
|
|
16210
16228
|
case 24:
|
|
16211
16229
|
return _context2.a(2);
|
|
16212
16230
|
}
|
|
@@ -18382,7 +18400,7 @@ var base64ToBinary = function base64ToBinary(base64) {
|
|
|
18382
18400
|
var binaryThumbHashToDataURL = function binaryThumbHashToDataURL(binaryThumbHash) {
|
|
18383
18401
|
return thumbHashToDataURL(binaryThumbHash);
|
|
18384
18402
|
};
|
|
18385
|
-
var
|
|
18403
|
+
var base64ToDataURL = function base64ToDataURL(base64) {
|
|
18386
18404
|
try {
|
|
18387
18405
|
var thumbHashFromBase64 = base64ToBinary(base64);
|
|
18388
18406
|
if (thumbHashFromBase64.length === 0) {
|
|
@@ -18456,106 +18474,6 @@ function calculateSize(width, height, maxWidth, maxHeight) {
|
|
|
18456
18474
|
return [width, height];
|
|
18457
18475
|
}
|
|
18458
18476
|
|
|
18459
|
-
var activeChannelMessagesSelector = function activeChannelMessagesSelector(store) {
|
|
18460
|
-
return store.MessageReducer.activeChannelMessages;
|
|
18461
|
-
};
|
|
18462
|
-
var messagesLoadingState = function messagesLoadingState(store) {
|
|
18463
|
-
return store.MessageReducer.messagesLoadingState;
|
|
18464
|
-
};
|
|
18465
|
-
var messagesHasNextSelector = function messagesHasNextSelector(store) {
|
|
18466
|
-
return store.MessageReducer.messagesHasNext;
|
|
18467
|
-
};
|
|
18468
|
-
var messagesHasPrevSelector = function messagesHasPrevSelector(store) {
|
|
18469
|
-
return store.MessageReducer.messagesHasPrev;
|
|
18470
|
-
};
|
|
18471
|
-
var attachmentCompilationStateSelector = function attachmentCompilationStateSelector(store) {
|
|
18472
|
-
return store.MessageReducer.attachmentsUploadingState;
|
|
18473
|
-
};
|
|
18474
|
-
var attachmentsUploadProgressSelector = function attachmentsUploadProgressSelector(store) {
|
|
18475
|
-
return store.MessageReducer.attachmentsUploadingProgress;
|
|
18476
|
-
};
|
|
18477
|
-
var activeTabAttachmentsSelector = function activeTabAttachmentsSelector(store) {
|
|
18478
|
-
return store.MessageReducer.activeTabAttachments;
|
|
18479
|
-
};
|
|
18480
|
-
var activeTabAttachmentsHasNextSelector = function activeTabAttachmentsHasNextSelector(store) {
|
|
18481
|
-
return store.MessageReducer.attachmentHasNext;
|
|
18482
|
-
};
|
|
18483
|
-
var attachmentsForPopupSelector = function attachmentsForPopupSelector(store) {
|
|
18484
|
-
return store.MessageReducer.attachmentsForPopup;
|
|
18485
|
-
};
|
|
18486
|
-
var messageForReplySelector = function messageForReplySelector(store) {
|
|
18487
|
-
return store.MessageReducer.messageForReply;
|
|
18488
|
-
};
|
|
18489
|
-
var messageToEditSelector = function messageToEditSelector(store) {
|
|
18490
|
-
return store.MessageReducer.messageToEdit;
|
|
18491
|
-
};
|
|
18492
|
-
var scrollToNewMessageSelector = function scrollToNewMessageSelector(store) {
|
|
18493
|
-
return store.MessageReducer.scrollToNewMessage;
|
|
18494
|
-
};
|
|
18495
|
-
var scrollToMentionedMessageSelector = function scrollToMentionedMessageSelector(store) {
|
|
18496
|
-
return store.MessageReducer.scrollToMentionedMessage;
|
|
18497
|
-
};
|
|
18498
|
-
var showScrollToNewMessageButtonSelector = function showScrollToNewMessageButtonSelector(store) {
|
|
18499
|
-
return store.MessageReducer.showScrollToNewMessageButton;
|
|
18500
|
-
};
|
|
18501
|
-
var sendMessageInputHeightSelector = function sendMessageInputHeightSelector(store) {
|
|
18502
|
-
return store.MessageReducer.sendMessageInputHeight;
|
|
18503
|
-
};
|
|
18504
|
-
var scrollToMessageSelector = function scrollToMessageSelector(store) {
|
|
18505
|
-
return store.MessageReducer.scrollToMessage;
|
|
18506
|
-
};
|
|
18507
|
-
var scrollToMessageHighlightSelector = function scrollToMessageHighlightSelector(store) {
|
|
18508
|
-
return store.MessageReducer.scrollToMessageHighlight;
|
|
18509
|
-
};
|
|
18510
|
-
var scrollToMessageBehaviorSelector = function scrollToMessageBehaviorSelector(store) {
|
|
18511
|
-
return store.MessageReducer.scrollToMessageBehavior;
|
|
18512
|
-
};
|
|
18513
|
-
var reactionsListSelector = function reactionsListSelector(store) {
|
|
18514
|
-
return store.MessageReducer.reactionsList;
|
|
18515
|
-
};
|
|
18516
|
-
var reactionsHasNextSelector = function reactionsHasNextSelector(store) {
|
|
18517
|
-
return store.MessageReducer.reactionsHasNext;
|
|
18518
|
-
};
|
|
18519
|
-
var reactionsLoadingStateSelector = function reactionsLoadingStateSelector(store) {
|
|
18520
|
-
return store.MessageReducer.reactionsLoadingState;
|
|
18521
|
-
};
|
|
18522
|
-
var openedMessageMenuSelector = function openedMessageMenuSelector(store) {
|
|
18523
|
-
return store.MessageReducer.openedMessageMenu;
|
|
18524
|
-
};
|
|
18525
|
-
var playingAudioIdSelector = function playingAudioIdSelector(store) {
|
|
18526
|
-
return store.MessageReducer.playingAudioId;
|
|
18527
|
-
};
|
|
18528
|
-
var selectedMessagesMapSelector = function selectedMessagesMapSelector(store) {
|
|
18529
|
-
return store.MessageReducer.selectedMessagesMap;
|
|
18530
|
-
};
|
|
18531
|
-
var attachmentUpdatedMapSelector = function attachmentUpdatedMapSelector(store) {
|
|
18532
|
-
return store.MessageReducer.attachmentUpdatedMap;
|
|
18533
|
-
};
|
|
18534
|
-
var messageMarkersSelector = function messageMarkersSelector(store) {
|
|
18535
|
-
return store.MessageReducer.messageMarkers;
|
|
18536
|
-
};
|
|
18537
|
-
var messagesMarkersLoadingStateSelector = function messagesMarkersLoadingStateSelector(store) {
|
|
18538
|
-
return store.MessageReducer.messagesMarkersLoadingState;
|
|
18539
|
-
};
|
|
18540
|
-
var pollVotesListSelector = function pollVotesListSelector(store) {
|
|
18541
|
-
return store.MessageReducer.pollVotesList;
|
|
18542
|
-
};
|
|
18543
|
-
var pollVotesHasMoreSelector = function pollVotesHasMoreSelector(store) {
|
|
18544
|
-
return store.MessageReducer.pollVotesHasMore;
|
|
18545
|
-
};
|
|
18546
|
-
var pollVotesLoadingStateSelector = function pollVotesLoadingStateSelector(store) {
|
|
18547
|
-
return store.MessageReducer.pollVotesLoadingState;
|
|
18548
|
-
};
|
|
18549
|
-
var pendingPollActionsSelector = function pendingPollActionsSelector(store) {
|
|
18550
|
-
return store.MessageReducer.pendingPollActions;
|
|
18551
|
-
};
|
|
18552
|
-
var pendingMessagesMapSelector = function pendingMessagesMapSelector(store) {
|
|
18553
|
-
return store.MessageReducer.pendingMessagesMap;
|
|
18554
|
-
};
|
|
18555
|
-
var unreadScrollToSelector = function unreadScrollToSelector(store) {
|
|
18556
|
-
return store.MessageReducer.unreadScrollTo;
|
|
18557
|
-
};
|
|
18558
|
-
|
|
18559
18477
|
var getFrame = function getFrame(videoSrc, time) {
|
|
18560
18478
|
try {
|
|
18561
18479
|
var video = document.createElement('video');
|
|
@@ -18725,28 +18643,43 @@ var handleUploadAttachments = function handleUploadAttachments(attachments, mess
|
|
|
18725
18643
|
};
|
|
18726
18644
|
var addPendingMessage = function addPendingMessage(message, messageCopy, channel) {
|
|
18727
18645
|
try {
|
|
18728
|
-
var messageToAdd =
|
|
18646
|
+
var messageToAdd = _extends({}, messageCopy, {
|
|
18729
18647
|
createdAt: new Date(Date.now()),
|
|
18730
18648
|
mentionedUsers: message.mentionedUsers,
|
|
18731
18649
|
parentMessage: message.parentMessage
|
|
18732
|
-
})
|
|
18650
|
+
});
|
|
18733
18651
|
addMessageToMap(channel.id, messageToAdd);
|
|
18734
|
-
|
|
18652
|
+
var activeChannelId = getActiveChannelId();
|
|
18653
|
+
if (activeChannelId === channel.id) {
|
|
18654
|
+
addAllMessages([messageToAdd], MESSAGE_LOAD_DIRECTION.NEXT);
|
|
18655
|
+
}
|
|
18735
18656
|
setPendingMessage(channel.id, messageToAdd);
|
|
18736
18657
|
store.dispatch(scrollToNewMessageAC(true));
|
|
18737
|
-
|
|
18658
|
+
if (activeChannelId === channel.id) {
|
|
18659
|
+
store.dispatch(addMessageAC(messageToAdd));
|
|
18660
|
+
}
|
|
18738
18661
|
return Promise.resolve();
|
|
18739
18662
|
} catch (e) {
|
|
18740
18663
|
return Promise.reject(e);
|
|
18741
18664
|
}
|
|
18742
18665
|
};
|
|
18666
|
+
var updatePendingMessage$1 = function updatePendingMessage(message, channel, updatedMessage) {
|
|
18667
|
+
var messageToUpdate = _extends({}, message, updatedMessage);
|
|
18668
|
+
updateMessageOnMap(channel.id, {
|
|
18669
|
+
messageId: message.tid,
|
|
18670
|
+
params: messageToUpdate
|
|
18671
|
+
});
|
|
18672
|
+
updateMessageOnAllMessages(message.tid, messageToUpdate);
|
|
18673
|
+
updatePendingMessageOnMap(channel.id, message.tid, messageToUpdate);
|
|
18674
|
+
store.dispatch(updateMessageAC(message.tid, messageToUpdate, false));
|
|
18675
|
+
};
|
|
18743
18676
|
function sendMessage(action) {
|
|
18744
|
-
var payload, message, connectionState, channelId, sendAttachmentsAsSeparateMessage, channel, SceytChatClient, createChannelData, mentionedUserIds, customUploader, linkAttachment, attachmentsToSend, messagesToSend, mediaAttachments, _loop, i, messageBuilder, messageToSend, messageCopy, _loop2, _i, _t2;
|
|
18677
|
+
var payload, message, connectionState, channelId, sendAttachmentsAsSeparateMessage, isAddToPendingMessagesMap, channel, SceytChatClient, createChannelData, mentionedUserIds, customUploader, linkAttachment, attachmentsToSend, messagesToSend, mediaAttachments, _loop, i, messageBuilder, messageToSend, messageCopy, _loop2, _i, _t2;
|
|
18745
18678
|
return _regenerator().w(function (_context3) {
|
|
18746
18679
|
while (1) switch (_context3.p = _context3.n) {
|
|
18747
18680
|
case 0:
|
|
18748
18681
|
payload = action.payload;
|
|
18749
|
-
message = payload.message, connectionState = payload.connectionState, channelId = payload.channelId, sendAttachmentsAsSeparateMessage = payload.sendAttachmentsAsSeparateMessage;
|
|
18682
|
+
message = payload.message, connectionState = payload.connectionState, channelId = payload.channelId, sendAttachmentsAsSeparateMessage = payload.sendAttachmentsAsSeparateMessage, isAddToPendingMessagesMap = payload.isAddToPendingMessagesMap;
|
|
18750
18683
|
_context3.p = 1;
|
|
18751
18684
|
_context3.n = 2;
|
|
18752
18685
|
return effects.put(setMessagesLoadingStateAC(LOADING_STATE.LOADING));
|
|
@@ -18790,7 +18723,7 @@ function sendMessage(action) {
|
|
|
18790
18723
|
}) : [];
|
|
18791
18724
|
customUploader = getCustomUploader();
|
|
18792
18725
|
if (!(message.attachments && message.attachments.length)) {
|
|
18793
|
-
_context3.n =
|
|
18726
|
+
_context3.n = 22;
|
|
18794
18727
|
break;
|
|
18795
18728
|
}
|
|
18796
18729
|
linkAttachment = null;
|
|
@@ -18803,7 +18736,7 @@ function sendMessage(action) {
|
|
|
18803
18736
|
return att.type !== attachmentTypes.link;
|
|
18804
18737
|
});
|
|
18805
18738
|
if (!(mediaAttachments && mediaAttachments.length)) {
|
|
18806
|
-
_context3.n =
|
|
18739
|
+
_context3.n = 18;
|
|
18807
18740
|
break;
|
|
18808
18741
|
}
|
|
18809
18742
|
_loop = /*#__PURE__*/_regenerator().m(function _callee() {
|
|
@@ -18844,7 +18777,9 @@ function sendMessage(action) {
|
|
|
18844
18777
|
}
|
|
18845
18778
|
};
|
|
18846
18779
|
} else if (customUploader && attachment) {
|
|
18847
|
-
attachment
|
|
18780
|
+
attachment = _extends({}, attachment, {
|
|
18781
|
+
url: attachment.data
|
|
18782
|
+
});
|
|
18848
18783
|
}
|
|
18849
18784
|
messageAttachment.tid = attachment.tid;
|
|
18850
18785
|
messageAttachment.attachmentUrl = attachment.attachmentUrl;
|
|
@@ -18852,7 +18787,7 @@ function sendMessage(action) {
|
|
|
18852
18787
|
messageAttachment.url = attachment.data;
|
|
18853
18788
|
}
|
|
18854
18789
|
if (!sendAttachmentsAsSeparateMessage) {
|
|
18855
|
-
_context.n =
|
|
18790
|
+
_context.n = 4;
|
|
18856
18791
|
break;
|
|
18857
18792
|
}
|
|
18858
18793
|
_messageBuilder = channel.createMessageBuilder();
|
|
@@ -18872,22 +18807,34 @@ function sendMessage(action) {
|
|
|
18872
18807
|
attachments: [messageAttachment]
|
|
18873
18808
|
});
|
|
18874
18809
|
messagesToSend.push(messageForSend);
|
|
18875
|
-
messageForSendCopy =
|
|
18810
|
+
messageForSendCopy = messageForSend;
|
|
18811
|
+
if (!isAddToPendingMessagesMap) {
|
|
18812
|
+
_context.n = 2;
|
|
18813
|
+
break;
|
|
18814
|
+
}
|
|
18876
18815
|
_context.n = 1;
|
|
18877
|
-
return effects.call(addPendingMessage, message, messageForSendCopy,
|
|
18816
|
+
return effects.call(addPendingMessage, message, _extends({}, messageForSendCopy, {
|
|
18817
|
+
attachments: [attachment]
|
|
18818
|
+
}), channel);
|
|
18878
18819
|
case 1:
|
|
18879
18820
|
_context.n = 3;
|
|
18880
18821
|
break;
|
|
18881
18822
|
case 2:
|
|
18882
|
-
|
|
18823
|
+
_context.n = 3;
|
|
18824
|
+
return effects.call(updatePendingMessage$1, message, channel, messageForSendCopy);
|
|
18883
18825
|
case 3:
|
|
18826
|
+
_context.n = 5;
|
|
18827
|
+
break;
|
|
18828
|
+
case 4:
|
|
18829
|
+
attachmentsToSend.push(messageAttachment);
|
|
18830
|
+
case 5:
|
|
18884
18831
|
if (!(!messageAttachment.cachedUrl && customUploader)) {
|
|
18885
|
-
_context.n =
|
|
18832
|
+
_context.n = 6;
|
|
18886
18833
|
break;
|
|
18887
18834
|
}
|
|
18888
|
-
_context.n =
|
|
18835
|
+
_context.n = 6;
|
|
18889
18836
|
return effects.put(updateAttachmentUploadingStateAC(UPLOAD_STATE.UPLOADING, messageAttachment.tid));
|
|
18890
|
-
case
|
|
18837
|
+
case 6:
|
|
18891
18838
|
return _context.a(2);
|
|
18892
18839
|
}
|
|
18893
18840
|
}, _callee);
|
|
@@ -18905,7 +18852,7 @@ function sendMessage(action) {
|
|
|
18905
18852
|
break;
|
|
18906
18853
|
case 10:
|
|
18907
18854
|
if (sendAttachmentsAsSeparateMessage) {
|
|
18908
|
-
_context3.n =
|
|
18855
|
+
_context3.n = 18;
|
|
18909
18856
|
break;
|
|
18910
18857
|
}
|
|
18911
18858
|
messageBuilder = channel.createMessageBuilder();
|
|
@@ -18917,27 +18864,53 @@ function sendMessage(action) {
|
|
|
18917
18864
|
messageBuilder.setReplyInThread();
|
|
18918
18865
|
}
|
|
18919
18866
|
messageToSend = messageBuilder.create();
|
|
18920
|
-
messageCopy =
|
|
18867
|
+
messageCopy = messageToSend;
|
|
18921
18868
|
if (!customUploader) {
|
|
18922
|
-
_context3.n =
|
|
18869
|
+
_context3.n = 14;
|
|
18923
18870
|
break;
|
|
18924
18871
|
}
|
|
18925
18872
|
if (sendAttachmentsAsSeparateMessage) {
|
|
18926
|
-
_context3.n =
|
|
18873
|
+
_context3.n = 13;
|
|
18874
|
+
break;
|
|
18875
|
+
}
|
|
18876
|
+
if (!isAddToPendingMessagesMap) {
|
|
18877
|
+
_context3.n = 12;
|
|
18927
18878
|
break;
|
|
18928
18879
|
}
|
|
18929
18880
|
_context3.n = 11;
|
|
18930
|
-
return effects.call(addPendingMessage, message, messageCopy,
|
|
18881
|
+
return effects.call(addPendingMessage, message, _extends({}, messageCopy, {
|
|
18882
|
+
attachments: message.attachments
|
|
18883
|
+
}), channel);
|
|
18931
18884
|
case 11:
|
|
18932
18885
|
_context3.n = 13;
|
|
18933
18886
|
break;
|
|
18934
18887
|
case 12:
|
|
18935
|
-
|
|
18936
|
-
return effects.call(addPendingMessage, message, messageCopy, channel);
|
|
18888
|
+
updatePendingMessage$1(message, channel, messageCopy);
|
|
18937
18889
|
case 13:
|
|
18890
|
+
_context3.n = 17;
|
|
18891
|
+
break;
|
|
18892
|
+
case 14:
|
|
18893
|
+
if (!isAddToPendingMessagesMap) {
|
|
18894
|
+
_context3.n = 16;
|
|
18895
|
+
break;
|
|
18896
|
+
}
|
|
18897
|
+
_context3.n = 15;
|
|
18898
|
+
return effects.call(addPendingMessage, message, messageCopy, channel);
|
|
18899
|
+
case 15:
|
|
18900
|
+
_context3.n = 17;
|
|
18901
|
+
break;
|
|
18902
|
+
case 16:
|
|
18903
|
+
updatePendingMessage$1(message, channel, messageCopy);
|
|
18904
|
+
case 17:
|
|
18938
18905
|
messageToSend.attachments = attachmentsToSend;
|
|
18939
18906
|
messagesToSend.push(messageToSend);
|
|
18940
|
-
case
|
|
18907
|
+
case 18:
|
|
18908
|
+
if (!(connectionState !== CONNECTION_STATUS.CONNECTED)) {
|
|
18909
|
+
_context3.n = 19;
|
|
18910
|
+
break;
|
|
18911
|
+
}
|
|
18912
|
+
throw new Error('Connection is required to send message');
|
|
18913
|
+
case 19:
|
|
18941
18914
|
_loop2 = /*#__PURE__*/_regenerator().m(function _callee2() {
|
|
18942
18915
|
var messageAttachment, messageToSend, _messageCopy, _attachmentsToSend, linkAttachmentToSend, linkAttachmentBuilder, messageResponse, k, pendingAttachment, attachmentsToUpdate, currentAttachmentsMap, messageUpdateData, messageToUpdate, channelUpdateParam, _t;
|
|
18943
18916
|
return _regenerator().w(function (_context2) {
|
|
@@ -19005,6 +18978,9 @@ function sendMessage(action) {
|
|
|
19005
18978
|
_context2.n = 5;
|
|
19006
18979
|
break;
|
|
19007
18980
|
case 8:
|
|
18981
|
+
if (!isAddToPendingMessagesMap) {
|
|
18982
|
+
store.dispatch(removePendingMessageAC(channel.id, messageToSend.tid));
|
|
18983
|
+
}
|
|
19008
18984
|
attachmentsToUpdate = [];
|
|
19009
18985
|
if (messageResponse.attachments && messageResponse.attachments.length > 0) {
|
|
19010
18986
|
currentAttachmentsMap = {};
|
|
@@ -19099,35 +19075,35 @@ function sendMessage(action) {
|
|
|
19099
19075
|
}, _callee2, null, [[1, 14]]);
|
|
19100
19076
|
});
|
|
19101
19077
|
_i = 0;
|
|
19102
|
-
case
|
|
19078
|
+
case 20:
|
|
19103
19079
|
if (!(_i < messagesToSend.length)) {
|
|
19104
|
-
_context3.n =
|
|
19080
|
+
_context3.n = 22;
|
|
19105
19081
|
break;
|
|
19106
19082
|
}
|
|
19107
|
-
return _context3.d(_regeneratorValues(_loop2()),
|
|
19108
|
-
case
|
|
19083
|
+
return _context3.d(_regeneratorValues(_loop2()), 21);
|
|
19084
|
+
case 21:
|
|
19109
19085
|
_i++;
|
|
19110
|
-
_context3.n =
|
|
19086
|
+
_context3.n = 20;
|
|
19111
19087
|
break;
|
|
19112
|
-
case
|
|
19113
|
-
_context3.n =
|
|
19088
|
+
case 22:
|
|
19089
|
+
_context3.n = 24;
|
|
19114
19090
|
break;
|
|
19115
|
-
case
|
|
19116
|
-
_context3.p =
|
|
19091
|
+
case 23:
|
|
19092
|
+
_context3.p = 23;
|
|
19117
19093
|
_t2 = _context3.v;
|
|
19118
19094
|
log.error('error on send message ... ', _t2);
|
|
19119
|
-
case
|
|
19095
|
+
case 24:
|
|
19120
19096
|
return _context3.a(2);
|
|
19121
19097
|
}
|
|
19122
|
-
}, _marked$3, null, [[1,
|
|
19098
|
+
}, _marked$3, null, [[1, 23]]);
|
|
19123
19099
|
}
|
|
19124
19100
|
function sendTextMessage(action) {
|
|
19125
|
-
var payload, message, connectionState, channelId, channel, sendMessageTid, activeChannelId, SceytChatClient, createChannelData, mentionedUserIds, attachments, attachmentBuilder, att, messageBuilder, messageToSend, pendingMessage, _messageResponse, messageResponse, messageUpdateData, messageToUpdate, channelUpdateParam, _t3;
|
|
19101
|
+
var payload, message, connectionState, channelId, isAddToPendingMessagesMap, channel, sendMessageTid, activeChannelId, SceytChatClient, createChannelData, mentionedUserIds, attachments, attachmentBuilder, att, messageBuilder, messageToSend, pendingMessage, _messageResponse, messageResponse, messageUpdateData, messageToUpdate, channelUpdateParam, _t3;
|
|
19126
19102
|
return _regenerator().w(function (_context4) {
|
|
19127
19103
|
while (1) switch (_context4.p = _context4.n) {
|
|
19128
19104
|
case 0:
|
|
19129
19105
|
payload = action.payload;
|
|
19130
|
-
message = payload.message, connectionState = payload.connectionState, channelId = payload.channelId;
|
|
19106
|
+
message = payload.message, connectionState = payload.connectionState, channelId = payload.channelId, isAddToPendingMessagesMap = payload.isAddToPendingMessagesMap;
|
|
19131
19107
|
_context4.n = 1;
|
|
19132
19108
|
return effects.put(setMessagesLoadingStateAC(LOADING_STATE.LOADING));
|
|
19133
19109
|
case 1:
|
|
@@ -19195,32 +19171,41 @@ function sendTextMessage(action) {
|
|
|
19195
19171
|
pendingMessage.metadata = JSON.parse(pendingMessage.metadata);
|
|
19196
19172
|
}
|
|
19197
19173
|
if (!(activeChannelId === channel.id)) {
|
|
19198
|
-
_context4.n =
|
|
19174
|
+
_context4.n = 10;
|
|
19175
|
+
break;
|
|
19176
|
+
}
|
|
19177
|
+
if (!isAddToPendingMessagesMap) {
|
|
19178
|
+
_context4.n = 9;
|
|
19199
19179
|
break;
|
|
19200
19180
|
}
|
|
19201
19181
|
_context4.n = 8;
|
|
19202
19182
|
return effects.call(addPendingMessage, message, pendingMessage, channel);
|
|
19203
19183
|
case 8:
|
|
19184
|
+
_context4.n = 10;
|
|
19185
|
+
break;
|
|
19186
|
+
case 9:
|
|
19187
|
+
updatePendingMessage$1(message, channel, pendingMessage);
|
|
19188
|
+
case 10:
|
|
19204
19189
|
if (!(connectionState === CONNECTION_STATUS.CONNECTED)) {
|
|
19205
|
-
_context4.n =
|
|
19190
|
+
_context4.n = 18;
|
|
19206
19191
|
break;
|
|
19207
19192
|
}
|
|
19208
19193
|
if (!sendMessageHandler) {
|
|
19209
|
-
_context4.n =
|
|
19194
|
+
_context4.n = 12;
|
|
19210
19195
|
break;
|
|
19211
19196
|
}
|
|
19212
|
-
_context4.n =
|
|
19197
|
+
_context4.n = 11;
|
|
19213
19198
|
return effects.call(sendMessageHandler, messageToSend, channel.id);
|
|
19214
|
-
case
|
|
19199
|
+
case 11:
|
|
19215
19200
|
messageResponse = _context4.v;
|
|
19216
|
-
_context4.n =
|
|
19201
|
+
_context4.n = 14;
|
|
19217
19202
|
break;
|
|
19218
|
-
case
|
|
19219
|
-
_context4.n =
|
|
19203
|
+
case 12:
|
|
19204
|
+
_context4.n = 13;
|
|
19220
19205
|
return effects.call(channel.sendMessage, messageToSend);
|
|
19221
|
-
case
|
|
19206
|
+
case 13:
|
|
19222
19207
|
messageResponse = _context4.v;
|
|
19223
|
-
case
|
|
19208
|
+
case 14:
|
|
19224
19209
|
messageUpdateData = {
|
|
19225
19210
|
id: messageResponse.id,
|
|
19226
19211
|
body: messageResponse.body,
|
|
@@ -19239,12 +19224,12 @@ function sendTextMessage(action) {
|
|
|
19239
19224
|
channelId: channel.id
|
|
19240
19225
|
};
|
|
19241
19226
|
if (!(activeChannelId === channel.id)) {
|
|
19242
|
-
_context4.n =
|
|
19227
|
+
_context4.n = 15;
|
|
19243
19228
|
break;
|
|
19244
19229
|
}
|
|
19245
|
-
_context4.n =
|
|
19230
|
+
_context4.n = 15;
|
|
19246
19231
|
return effects.put(updateMessageAC(messageToSend.tid, messageUpdateData));
|
|
19247
|
-
case
|
|
19232
|
+
case 15:
|
|
19248
19233
|
updateMessageOnMap(channel.id, {
|
|
19249
19234
|
messageId: messageToSend.tid,
|
|
19250
19235
|
params: messageUpdateData
|
|
@@ -19258,30 +19243,33 @@ function sendTextMessage(action) {
|
|
|
19258
19243
|
lastMessage: messageToUpdate,
|
|
19259
19244
|
lastReactedMessage: null
|
|
19260
19245
|
};
|
|
19261
|
-
_context4.n =
|
|
19246
|
+
_context4.n = 16;
|
|
19262
19247
|
return effects.put(updateChannelDataAC(channel.id, channelUpdateParam, true));
|
|
19263
|
-
case
|
|
19248
|
+
case 16:
|
|
19264
19249
|
updateChannelOnAllChannels(channel.id, channelUpdateParam);
|
|
19265
19250
|
if (!channel.unread) {
|
|
19266
|
-
_context4.n =
|
|
19251
|
+
_context4.n = 17;
|
|
19267
19252
|
break;
|
|
19268
19253
|
}
|
|
19269
|
-
_context4.n =
|
|
19254
|
+
_context4.n = 17;
|
|
19270
19255
|
return effects.put(markChannelAsReadAC(channel.id));
|
|
19271
|
-
case
|
|
19256
|
+
case 17:
|
|
19272
19257
|
channel.lastMessage = messageToUpdate;
|
|
19273
|
-
|
|
19258
|
+
if (!isAddToPendingMessagesMap) {
|
|
19259
|
+
store.dispatch(removePendingMessageAC(channel.id, messageToSend.tid));
|
|
19260
|
+
}
|
|
19261
|
+
_context4.n = 19;
|
|
19274
19262
|
break;
|
|
19275
|
-
case
|
|
19263
|
+
case 18:
|
|
19276
19264
|
throw new Error('Connection required to send message');
|
|
19277
|
-
case
|
|
19278
|
-
_context4.n =
|
|
19265
|
+
case 19:
|
|
19266
|
+
_context4.n = 20;
|
|
19279
19267
|
return effects.put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
19280
|
-
case
|
|
19281
|
-
_context4.n =
|
|
19268
|
+
case 20:
|
|
19269
|
+
_context4.n = 23;
|
|
19282
19270
|
break;
|
|
19283
|
-
case
|
|
19284
|
-
_context4.p =
|
|
19271
|
+
case 21:
|
|
19272
|
+
_context4.p = 21;
|
|
19285
19273
|
_t3 = _context4.v;
|
|
19286
19274
|
log.error('error on send text message ... ', _t3);
|
|
19287
19275
|
updateMessageOnMap(channel.id, {
|
|
@@ -19291,32 +19279,32 @@ function sendTextMessage(action) {
|
|
|
19291
19279
|
}
|
|
19292
19280
|
});
|
|
19293
19281
|
if (!(activeChannelId === channel.id)) {
|
|
19294
|
-
_context4.n =
|
|
19282
|
+
_context4.n = 22;
|
|
19295
19283
|
break;
|
|
19296
19284
|
}
|
|
19297
19285
|
updateMessageOnAllMessages(sendMessageTid, {
|
|
19298
19286
|
state: MESSAGE_STATUS.FAILED
|
|
19299
19287
|
});
|
|
19300
|
-
_context4.n =
|
|
19288
|
+
_context4.n = 22;
|
|
19301
19289
|
return effects.put(updateMessageAC(sendMessageTid, {
|
|
19302
19290
|
state: MESSAGE_STATUS.FAILED
|
|
19303
19291
|
}));
|
|
19304
|
-
case
|
|
19305
|
-
_context4.n =
|
|
19292
|
+
case 22:
|
|
19293
|
+
_context4.n = 23;
|
|
19306
19294
|
return effects.put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
19307
|
-
case
|
|
19295
|
+
case 23:
|
|
19308
19296
|
return _context4.a(2);
|
|
19309
19297
|
}
|
|
19310
|
-
}, _marked2$2, null, [[3,
|
|
19298
|
+
}, _marked2$2, null, [[3, 21]]);
|
|
19311
19299
|
}
|
|
19312
19300
|
function forwardMessage(action) {
|
|
19313
|
-
var payload, message, channelId, connectionState, isForward, channel, SceytChatClient, mentionedUserIds, attachments, attachmentBuilder, att, messageBuilder, pollDetails, messageToSend, pendingMessage, activeChannelId,
|
|
19301
|
+
var payload, message, channelId, connectionState, isForward, isAddToPendingMessagesMap, channel, SceytChatClient, mentionedUserIds, attachments, attachmentBuilder, att, messageBuilder, pollDetails, messageToSend, pendingMessage, activeChannelId, hasNextMessages, messageResponse, messageUpdateData, messageToUpdate, channelUpdateParam, _t4;
|
|
19314
19302
|
return _regenerator().w(function (_context5) {
|
|
19315
19303
|
while (1) switch (_context5.p = _context5.n) {
|
|
19316
19304
|
case 0:
|
|
19317
19305
|
_context5.p = 0;
|
|
19318
19306
|
payload = action.payload;
|
|
19319
|
-
message = payload.message, channelId = payload.channelId, connectionState = payload.connectionState, isForward = payload.isForward;
|
|
19307
|
+
message = payload.message, channelId = payload.channelId, connectionState = payload.connectionState, isForward = payload.isForward, isAddToPendingMessagesMap = payload.isAddToPendingMessagesMap;
|
|
19320
19308
|
_context5.n = 1;
|
|
19321
19309
|
return effects.put(setMessagesLoadingStateAC(LOADING_STATE.LOADING));
|
|
19322
19310
|
case 1:
|
|
@@ -19351,7 +19339,7 @@ function forwardMessage(action) {
|
|
|
19351
19339
|
}) : [];
|
|
19352
19340
|
attachments = message.attachments;
|
|
19353
19341
|
if ((channel.type === DEFAULT_CHANNEL_TYPE.BROADCAST || channel.type === DEFAULT_CHANNEL_TYPE.PUBLIC) && !(channel.userRole === 'admin' || channel.userRole === 'owner')) {
|
|
19354
|
-
_context5.n =
|
|
19342
|
+
_context5.n = 16;
|
|
19355
19343
|
break;
|
|
19356
19344
|
}
|
|
19357
19345
|
if (message.attachments && message.attachments.length) {
|
|
@@ -19379,9 +19367,9 @@ function forwardMessage(action) {
|
|
|
19379
19367
|
}
|
|
19380
19368
|
messageBuilder.setBody(message.body).setBodyAttributes(message.bodyAttributes).setAttachments(attachments).setMentionUserIds(mentionedUserIds).setType(message.type).setDisableMentionsCount(getDisableFrowardMentionsCount()).setMetadata(message.metadata ? JSON.stringify(message.metadata) : '').setForwardingMessageId(message.forwardingDetails ? message.forwardingDetails.messageId : message.id).setPollDetails(pollDetails);
|
|
19381
19369
|
messageToSend = messageBuilder.create();
|
|
19382
|
-
pendingMessage =
|
|
19370
|
+
pendingMessage = _extends({}, messageToSend, {
|
|
19383
19371
|
createdAt: new Date(Date.now())
|
|
19384
|
-
})
|
|
19372
|
+
});
|
|
19385
19373
|
if (isForward) {
|
|
19386
19374
|
if (message.forwardingDetails) {
|
|
19387
19375
|
pendingMessage.forwardingDetails.user = message.forwardingDetails.user;
|
|
@@ -19393,50 +19381,42 @@ function forwardMessage(action) {
|
|
|
19393
19381
|
pendingMessage.forwardingDetails.hops = message.forwardingDetails ? message.forwardingDetails.hops : 1;
|
|
19394
19382
|
}
|
|
19395
19383
|
activeChannelId = getActiveChannelId();
|
|
19396
|
-
isCachedChannel = checkChannelExistsOnMessagesMap(channelId);
|
|
19397
19384
|
if (!(channelId === activeChannelId)) {
|
|
19398
|
-
_context5.n =
|
|
19385
|
+
_context5.n = 7;
|
|
19399
19386
|
break;
|
|
19400
19387
|
}
|
|
19401
19388
|
hasNextMessages = store.getState().MessageReducer.messagesHasNext;
|
|
19402
19389
|
if (getHasNextCached()) {
|
|
19403
|
-
_context5.n =
|
|
19390
|
+
_context5.n = 7;
|
|
19404
19391
|
break;
|
|
19405
19392
|
}
|
|
19406
19393
|
if (!hasNextMessages) {
|
|
19407
|
-
_context5.n =
|
|
19394
|
+
_context5.n = 7;
|
|
19408
19395
|
break;
|
|
19409
19396
|
}
|
|
19410
19397
|
_context5.n = 7;
|
|
19411
19398
|
return effects.put(getMessagesAC(channel));
|
|
19412
19399
|
case 7:
|
|
19413
|
-
|
|
19414
|
-
|
|
19400
|
+
if (!isAddToPendingMessagesMap) {
|
|
19401
|
+
_context5.n = 9;
|
|
19402
|
+
break;
|
|
19403
|
+
}
|
|
19404
|
+
_context5.n = 8;
|
|
19405
|
+
return effects.call(addPendingMessage, message, pendingMessage, channel);
|
|
19415
19406
|
case 8:
|
|
19416
|
-
_context5.n =
|
|
19417
|
-
|
|
19407
|
+
_context5.n = 10;
|
|
19408
|
+
break;
|
|
19418
19409
|
case 9:
|
|
19419
|
-
addMessageToMap(channelId, pendingMessage);
|
|
19420
|
-
addAllMessages([pendingMessage], MESSAGE_LOAD_DIRECTION.NEXT);
|
|
19421
19410
|
_context5.n = 10;
|
|
19422
|
-
return effects.
|
|
19411
|
+
return effects.call(updatePendingMessage$1, message, channel, pendingMessage);
|
|
19423
19412
|
case 10:
|
|
19424
|
-
_context5.n = 12;
|
|
19425
|
-
break;
|
|
19426
|
-
case 11:
|
|
19427
|
-
if (isCachedChannel) {
|
|
19428
|
-
addMessageToMap(channelId, pendingMessage);
|
|
19429
|
-
} else {
|
|
19430
|
-
setPendingMessage(channelId, pendingMessage);
|
|
19431
|
-
}
|
|
19432
|
-
case 12:
|
|
19433
19413
|
if (!(connectionState === CONNECTION_STATUS.CONNECTED)) {
|
|
19434
|
-
_context5.n =
|
|
19414
|
+
_context5.n = 16;
|
|
19435
19415
|
break;
|
|
19436
19416
|
}
|
|
19437
|
-
_context5.n =
|
|
19417
|
+
_context5.n = 11;
|
|
19438
19418
|
return effects.call(channel.sendMessage, messageToSend);
|
|
19439
|
-
case
|
|
19419
|
+
case 11:
|
|
19440
19420
|
messageResponse = _context5.v;
|
|
19441
19421
|
messageUpdateData = {
|
|
19442
19422
|
id: messageResponse.id,
|
|
@@ -19453,409 +19433,75 @@ function forwardMessage(action) {
|
|
|
19453
19433
|
channelId: channel.id
|
|
19454
19434
|
};
|
|
19455
19435
|
if (!(channelId === activeChannelId)) {
|
|
19456
|
-
_context5.n =
|
|
19436
|
+
_context5.n = 13;
|
|
19457
19437
|
break;
|
|
19458
19438
|
}
|
|
19459
|
-
_context5.n =
|
|
19439
|
+
_context5.n = 12;
|
|
19460
19440
|
return effects.put(updateMessageAC(messageToSend.tid, JSON.parse(JSON.stringify(messageUpdateData))));
|
|
19461
|
-
case
|
|
19462
|
-
updateMessageOnMap(channel.id, {
|
|
19463
|
-
messageId: messageToSend.tid,
|
|
19464
|
-
params: messageUpdateData
|
|
19465
|
-
});
|
|
19441
|
+
case 12:
|
|
19466
19442
|
updateMessageOnAllMessages(messageToSend.tid, messageUpdateData);
|
|
19467
|
-
|
|
19468
|
-
|
|
19469
|
-
|
|
19470
|
-
|
|
19471
|
-
_context5.n = 16;
|
|
19472
|
-
break;
|
|
19473
|
-
}
|
|
19443
|
+
case 13:
|
|
19444
|
+
_context5.n = 14;
|
|
19445
|
+
return effects.put(removePendingMessageAC(channel.id, messageToSend.tid || messageToSend.id));
|
|
19446
|
+
case 14:
|
|
19474
19447
|
updateMessageOnMap(channel.id, {
|
|
19475
19448
|
messageId: messageToSend.tid,
|
|
19476
19449
|
params: messageUpdateData
|
|
19477
19450
|
});
|
|
19478
|
-
_context5.n = 17;
|
|
19479
|
-
break;
|
|
19480
|
-
case 16:
|
|
19481
|
-
_context5.n = 17;
|
|
19482
|
-
return effects.put(removePendingMessageAC(channelId, messageToSend.tid || messageToSend.id));
|
|
19483
|
-
case 17:
|
|
19484
19451
|
messageToUpdate = JSON.parse(JSON.stringify(messageResponse));
|
|
19485
19452
|
updateChannelLastMessageOnAllChannels(channel.id, messageToUpdate);
|
|
19486
19453
|
channelUpdateParam = {
|
|
19487
19454
|
lastMessage: messageToUpdate,
|
|
19488
19455
|
lastReactedMessage: null
|
|
19489
19456
|
};
|
|
19490
|
-
_context5.n =
|
|
19457
|
+
_context5.n = 15;
|
|
19491
19458
|
return effects.put(updateChannelDataAC(channel.id, channelUpdateParam, true));
|
|
19492
|
-
case
|
|
19459
|
+
case 15:
|
|
19493
19460
|
updateChannelOnAllChannels(channel.id, channelUpdateParam);
|
|
19494
19461
|
if (!channel.unread) {
|
|
19495
|
-
_context5.n =
|
|
19462
|
+
_context5.n = 16;
|
|
19496
19463
|
break;
|
|
19497
19464
|
}
|
|
19498
|
-
_context5.n =
|
|
19465
|
+
_context5.n = 16;
|
|
19499
19466
|
return effects.put(markChannelAsReadAC(channel.id));
|
|
19500
|
-
case
|
|
19501
|
-
_context5.n =
|
|
19467
|
+
case 16:
|
|
19468
|
+
_context5.n = 18;
|
|
19502
19469
|
break;
|
|
19503
|
-
case
|
|
19504
|
-
_context5.p =
|
|
19470
|
+
case 17:
|
|
19471
|
+
_context5.p = 17;
|
|
19505
19472
|
_t4 = _context5.v;
|
|
19506
19473
|
log.error('error on forward message ... ', _t4);
|
|
19507
|
-
case
|
|
19508
|
-
_context5.n =
|
|
19474
|
+
case 18:
|
|
19475
|
+
_context5.n = 19;
|
|
19509
19476
|
return effects.put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
19510
|
-
case
|
|
19477
|
+
case 19:
|
|
19511
19478
|
return _context5.a(2);
|
|
19512
19479
|
}
|
|
19513
|
-
}, _marked3$1, null, [[0,
|
|
19480
|
+
}, _marked3$1, null, [[0, 17]]);
|
|
19514
19481
|
}
|
|
19515
19482
|
function resendMessage(action) {
|
|
19516
|
-
var payload, message, connectionState, channelId,
|
|
19483
|
+
var payload, message, connectionState, channelId, sendAttachmentsAsSeparateMessage, isVoiceMessage;
|
|
19517
19484
|
return _regenerator().w(function (_context6) {
|
|
19518
|
-
while (1) switch (_context6.
|
|
19485
|
+
while (1) switch (_context6.n) {
|
|
19519
19486
|
case 0:
|
|
19520
19487
|
payload = action.payload;
|
|
19521
19488
|
message = payload.message, connectionState = payload.connectionState, channelId = payload.channelId;
|
|
19522
|
-
|
|
19523
|
-
|
|
19524
|
-
|
|
19525
|
-
|
|
19526
|
-
|
|
19527
|
-
|
|
19528
|
-
channel = _context6.v;
|
|
19529
|
-
_context6.p = 3;
|
|
19530
|
-
if (!channel) {
|
|
19531
|
-
channel = getChannelFromAllChannels(channelId);
|
|
19532
|
-
if (channel) {
|
|
19533
|
-
setChannelInMap(channel);
|
|
19534
|
-
}
|
|
19535
|
-
}
|
|
19536
|
-
_context6.n = 4;
|
|
19537
|
-
return effects.put(addChannelAC(JSON.parse(JSON.stringify(channel))));
|
|
19538
|
-
case 4:
|
|
19539
|
-
customUploader = getCustomUploader();
|
|
19540
|
-
_context6.n = 5;
|
|
19541
|
-
return effects.put(updateMessageAC(message.tid, {
|
|
19542
|
-
state: MESSAGE_STATUS.UNMODIFIED
|
|
19543
|
-
}));
|
|
19544
|
-
case 5:
|
|
19545
|
-
updateMessageOnMap(channel.id, {
|
|
19546
|
-
messageId: message.tid,
|
|
19547
|
-
params: {
|
|
19548
|
-
state: MESSAGE_STATUS.UNMODIFIED
|
|
19549
|
-
}
|
|
19550
|
-
});
|
|
19551
|
-
updateMessageOnAllMessages(message.tid, {
|
|
19552
|
-
state: MESSAGE_STATUS.UNMODIFIED
|
|
19553
|
-
});
|
|
19554
|
-
if (!(message.attachments && message.attachments.length && message.state === MESSAGE_STATUS.FAILED)) {
|
|
19555
|
-
_context6.n = 26;
|
|
19556
|
-
break;
|
|
19557
|
-
}
|
|
19558
|
-
_context6.n = 6;
|
|
19559
|
-
return effects.select(attachmentCompilationStateSelector);
|
|
19560
|
-
case 6:
|
|
19561
|
-
attachmentCompilation = _context6.v;
|
|
19562
|
-
messageAttachment = _extends({}, message.attachments[0]);
|
|
19563
|
-
messageCopy = _extends({}, message, {
|
|
19564
|
-
attachments: [messageAttachment]
|
|
19565
|
-
});
|
|
19566
|
-
log.info('attachmentCompilation. .. . .', attachmentCompilation);
|
|
19567
|
-
if (!(connectionState === CONNECTION_STATUS.CONNECTED && attachmentCompilation[messageAttachment.tid] && attachmentCompilation[messageAttachment.tid] === UPLOAD_STATE.FAIL)) {
|
|
19568
|
-
_context6.n = 25;
|
|
19569
|
-
break;
|
|
19570
|
-
}
|
|
19571
|
-
_context6.n = 7;
|
|
19572
|
-
return effects.put(updateAttachmentUploadingStateAC(UPLOAD_STATE.UPLOADING, messageAttachment.tid));
|
|
19573
|
-
case 7:
|
|
19574
|
-
if (!customUploader) {
|
|
19575
|
-
_context6.n = 25;
|
|
19576
|
-
break;
|
|
19577
|
-
}
|
|
19578
|
-
handleUploadProgress = function handleUploadProgress(_ref2) {
|
|
19579
|
-
var loaded = _ref2.loaded,
|
|
19580
|
-
total = _ref2.total;
|
|
19581
|
-
log.info('progress ... ', loaded / total);
|
|
19582
|
-
};
|
|
19583
|
-
_context6.p = 8;
|
|
19584
|
-
handleUpdateLocalPath = function handleUpdateLocalPath(updatedLink) {
|
|
19585
|
-
filePath = updatedLink;
|
|
19586
|
-
thumbnailMetas = getVideoThumb(messageAttachment.tid);
|
|
19587
|
-
messageCopy.attachments[0] = _extends({}, messageCopy.attachments[0], {
|
|
19588
|
-
attachmentUrl: updatedLink
|
|
19589
|
-
});
|
|
19590
|
-
var updateAttachmentPath = {
|
|
19591
|
-
attachments: [_extends({}, messageCopy.attachments[0], {
|
|
19592
|
-
attachmentUrl: updatedLink
|
|
19593
|
-
})]
|
|
19594
|
-
};
|
|
19595
|
-
store.dispatch(updateMessageAC(message.tid, updateAttachmentPath));
|
|
19596
|
-
};
|
|
19597
|
-
pendingAttachment = getPendingAttachment(message.attachments[0].tid);
|
|
19598
|
-
log.info('pendingAttachment ... ', pendingAttachment);
|
|
19599
|
-
if (!messageAttachment.cachedUrl) {
|
|
19600
|
-
_context6.n = 9;
|
|
19601
|
-
break;
|
|
19602
|
-
}
|
|
19603
|
-
uri = pendingAttachment.file;
|
|
19604
|
-
_context6.n = 11;
|
|
19605
|
-
break;
|
|
19606
|
-
case 9:
|
|
19607
|
-
messageAttachment.data = pendingAttachment.file;
|
|
19608
|
-
messageAttachment.url = pendingAttachment.file;
|
|
19609
|
-
_context6.n = 10;
|
|
19610
|
-
return effects.call(customUpload, messageAttachment, handleUploadProgress, message.type, handleUpdateLocalPath);
|
|
19611
|
-
case 10:
|
|
19612
|
-
uri = _context6.v;
|
|
19613
|
-
case 11:
|
|
19614
|
-
log.info('messageAttachment ... ', messageAttachment);
|
|
19615
|
-
_context6.n = 12;
|
|
19616
|
-
return effects.put(updateAttachmentUploadingStateAC(UPLOAD_STATE.SUCCESS, messageAttachment.tid));
|
|
19617
|
-
case 12:
|
|
19618
|
-
delete messageCopy.createdAt;
|
|
19619
|
-
thumbnailMetas = {};
|
|
19620
|
-
fileSize = messageAttachment.cachedUrl ? messageAttachment.size : pendingAttachment.file.size;
|
|
19621
|
-
log.info('uri ... ', uri);
|
|
19622
|
-
if (!(!messageAttachment.cachedUrl && messageAttachment.url.type.split('/')[0] === 'image')) {
|
|
19623
|
-
_context6.n = 15;
|
|
19624
|
-
break;
|
|
19625
|
-
}
|
|
19626
|
-
_context6.n = 13;
|
|
19627
|
-
return effects.call(getImageSize, filePath);
|
|
19628
|
-
case 13:
|
|
19629
|
-
fileSize = _context6.v;
|
|
19630
|
-
_context6.n = 14;
|
|
19631
|
-
return effects.call(createImageThumbnail, null, filePath, messageAttachment.type === 'file' ? 50 : undefined, messageAttachment.type === 'file' ? 50 : undefined);
|
|
19632
|
-
case 14:
|
|
19633
|
-
thumbnailMetas = _context6.v;
|
|
19634
|
-
_context6.n = 17;
|
|
19635
|
-
break;
|
|
19636
|
-
case 15:
|
|
19637
|
-
if (!(!messageAttachment.cachedUrl && messageAttachment.url.type.split('/')[0] === 'video')) {
|
|
19638
|
-
_context6.n = 17;
|
|
19639
|
-
break;
|
|
19640
|
-
}
|
|
19641
|
-
if (!filePath) {
|
|
19642
|
-
_context6.n = 17;
|
|
19643
|
-
break;
|
|
19644
|
-
}
|
|
19645
|
-
_context6.n = 16;
|
|
19646
|
-
return effects.call(getFrame, filePath);
|
|
19647
|
-
case 16:
|
|
19648
|
-
meta = _context6.v;
|
|
19649
|
-
thumbnailMetas = {
|
|
19650
|
-
thumbnail: meta.thumb,
|
|
19651
|
-
imageWidth: meta.width,
|
|
19652
|
-
imageHeight: meta.height,
|
|
19653
|
-
duration: meta.duration
|
|
19654
|
-
};
|
|
19655
|
-
case 17:
|
|
19656
|
-
if (messageAttachment.cachedUrl) {
|
|
19657
|
-
attachmentMeta = messageAttachment.metadata;
|
|
19489
|
+
if (message.forwardingDetails) {
|
|
19490
|
+
store.dispatch(forwardMessageAC(message, channelId, connectionState, false, false));
|
|
19491
|
+
} else if (message.attachments && message.attachments.length) {
|
|
19492
|
+
sendAttachmentsAsSeparateMessage = getSendAttachmentsAsSeparateMessages();
|
|
19493
|
+
isVoiceMessage = message.attachments[0].type === attachmentTypes.voice;
|
|
19494
|
+
store.dispatch(sendMessageAC(message, channelId, connectionState, isVoiceMessage ? false : sendAttachmentsAsSeparateMessage, false, false));
|
|
19658
19495
|
} else {
|
|
19659
|
-
|
|
19660
|
-
tmb: thumbnailMetas.thumbnail,
|
|
19661
|
-
szw: thumbnailMetas.imageWidth,
|
|
19662
|
-
szh: thumbnailMetas.imageHeight
|
|
19663
|
-
}, thumbnailMetas.duration ? {
|
|
19664
|
-
dur: thumbnailMetas.duration
|
|
19665
|
-
} : {})));
|
|
19666
|
-
}
|
|
19667
|
-
log.info('attachmentMeta ... ', attachmentMeta);
|
|
19668
|
-
attachmentBuilder = channel.createAttachmentBuilder(uri, messageAttachment.type);
|
|
19669
|
-
attachmentToSend = attachmentBuilder.setName(messageAttachment.name).setMetadata(attachmentMeta).setFileSize(fileSize).setUpload(false).create();
|
|
19670
|
-
log.info('attachmentToSend ... ', attachmentToSend);
|
|
19671
|
-
attachmentToSend.tid = messageAttachment.tid;
|
|
19672
|
-
attachmentToSend.attachmentUrl = messageAttachment.attachmentUrl;
|
|
19673
|
-
_context6.n = 18;
|
|
19674
|
-
return effects.put(updateMessageAC(messageCopy.tid, JSON.parse(JSON.stringify(_extends({}, messageCopy, {
|
|
19675
|
-
attachments: [attachmentToSend]
|
|
19676
|
-
})))));
|
|
19677
|
-
case 18:
|
|
19678
|
-
messageCopy.attachments = [attachmentToSend];
|
|
19679
|
-
if (!(connectionState === CONNECTION_STATUS.CONNECTED)) {
|
|
19680
|
-
_context6.n = 22;
|
|
19681
|
-
break;
|
|
19682
|
-
}
|
|
19683
|
-
_context6.n = 19;
|
|
19684
|
-
return effects.call(channel.sendMessage, messageCopy);
|
|
19685
|
-
case 19:
|
|
19686
|
-
messageResponse = _context6.v;
|
|
19687
|
-
deletePendingAttachment(messageAttachment.tid);
|
|
19688
|
-
messageUpdateData = {
|
|
19689
|
-
id: messageResponse.id,
|
|
19690
|
-
body: messageResponse.body,
|
|
19691
|
-
type: messageResponse.type,
|
|
19692
|
-
state: messageResponse.state,
|
|
19693
|
-
displayCount: messageResponse.displayCount,
|
|
19694
|
-
deliveryStatus: messageResponse.deliveryStatus,
|
|
19695
|
-
attachments: [_extends({}, messageResponse.attachments[0], {
|
|
19696
|
-
attachmentUrl: attachmentToSend.attachmentUrl,
|
|
19697
|
-
tid: attachmentToSend.tid
|
|
19698
|
-
})],
|
|
19699
|
-
mentionedUsers: messageResponse.mentionedUsers,
|
|
19700
|
-
metadata: messageResponse.metadata,
|
|
19701
|
-
parentMessage: messageResponse.parentMessage,
|
|
19702
|
-
repliedInThread: messageResponse.repliedInThread,
|
|
19703
|
-
bodyAttributes: messageResponse.bodyAttributes,
|
|
19704
|
-
createdAt: messageResponse.createdAt,
|
|
19705
|
-
channelId: channel.id
|
|
19706
|
-
};
|
|
19707
|
-
_context6.n = 20;
|
|
19708
|
-
return effects.put(removePendingMessageAC(channel.id, messageCopy.tid || messageCopy.id));
|
|
19709
|
-
case 20:
|
|
19710
|
-
_context6.n = 21;
|
|
19711
|
-
return effects.put(updateMessageAC(messageCopy.tid, JSON.parse(JSON.stringify(messageUpdateData))));
|
|
19712
|
-
case 21:
|
|
19713
|
-
fileType = messageAttachment.data && messageAttachment.data.type ? messageAttachment.data.type.split('/')[0] : messageAttachment.type;
|
|
19714
|
-
if (fileType === 'video') {
|
|
19715
|
-
deleteVideoThumb(messageAttachment.tid);
|
|
19716
|
-
}
|
|
19717
|
-
updateMessageOnMap(channel.id, {
|
|
19718
|
-
messageId: messageCopy.tid,
|
|
19719
|
-
params: messageUpdateData
|
|
19720
|
-
});
|
|
19721
|
-
updateMessageOnAllMessages(messageCopy.tid, messageUpdateData);
|
|
19722
|
-
messageToUpdate = JSON.parse(JSON.stringify(messageResponse));
|
|
19723
|
-
updateChannelLastMessageOnAllChannels(channel.id, messageToUpdate);
|
|
19724
|
-
_context6.n = 22;
|
|
19725
|
-
return effects.put(updateChannelLastMessageAC(messageToUpdate, {
|
|
19726
|
-
id: channel.id
|
|
19727
|
-
}));
|
|
19728
|
-
case 22:
|
|
19729
|
-
_context6.n = 25;
|
|
19730
|
-
break;
|
|
19731
|
-
case 23:
|
|
19732
|
-
_context6.p = 23;
|
|
19733
|
-
_t5 = _context6.v;
|
|
19734
|
-
log.error('fail upload attachment on resend message ... ', _t5);
|
|
19735
|
-
_context6.n = 24;
|
|
19736
|
-
return effects.put(updateAttachmentUploadingStateAC(UPLOAD_STATE.FAIL, messageAttachment.tid));
|
|
19737
|
-
case 24:
|
|
19738
|
-
updateMessageOnMap(channel.id, {
|
|
19739
|
-
messageId: messageCopy.tid,
|
|
19740
|
-
params: {
|
|
19741
|
-
state: MESSAGE_STATUS.FAILED
|
|
19742
|
-
}
|
|
19743
|
-
});
|
|
19744
|
-
updateMessageOnAllMessages(messageCopy.tid, {
|
|
19745
|
-
state: MESSAGE_STATUS.FAILED
|
|
19746
|
-
});
|
|
19747
|
-
_context6.n = 25;
|
|
19748
|
-
return effects.put(updateMessageAC(messageCopy.tid, {
|
|
19749
|
-
state: MESSAGE_STATUS.FAILED
|
|
19750
|
-
}));
|
|
19751
|
-
case 25:
|
|
19752
|
-
_context6.n = 33;
|
|
19753
|
-
break;
|
|
19754
|
-
case 26:
|
|
19755
|
-
if (!(message.state === MESSAGE_STATUS.FAILED)) {
|
|
19756
|
-
_context6.n = 33;
|
|
19757
|
-
break;
|
|
19758
|
-
}
|
|
19759
|
-
log.info('send failed message ...');
|
|
19760
|
-
_messageCopy2 = _extends({}, message);
|
|
19761
|
-
delete _messageCopy2.createdAt;
|
|
19762
|
-
if (!(connectionState === CONNECTION_STATUS.CONNECTED)) {
|
|
19763
|
-
_context6.n = 33;
|
|
19764
|
-
break;
|
|
19765
|
-
}
|
|
19766
|
-
_context6.n = 27;
|
|
19767
|
-
return effects.call(channel.sendMessage, _messageCopy2);
|
|
19768
|
-
case 27:
|
|
19769
|
-
_messageResponse2 = _context6.v;
|
|
19770
|
-
_context6.n = 28;
|
|
19771
|
-
return effects.put(removePendingMessageAC(channel.id, _messageCopy2.tid || _messageCopy2.id));
|
|
19772
|
-
case 28:
|
|
19773
|
-
_messageUpdateData = {
|
|
19774
|
-
id: _messageResponse2.id,
|
|
19775
|
-
body: _messageResponse2.body,
|
|
19776
|
-
type: _messageResponse2.type,
|
|
19777
|
-
state: _messageResponse2.state,
|
|
19778
|
-
displayCount: _messageResponse2.displayCount,
|
|
19779
|
-
deliveryStatus: _messageResponse2.deliveryStatus,
|
|
19780
|
-
attachments: [],
|
|
19781
|
-
mentionedUsers: _messageResponse2.mentionedUsers,
|
|
19782
|
-
metadata: _messageResponse2.metadata,
|
|
19783
|
-
parentMessage: _messageResponse2.parentMessage,
|
|
19784
|
-
repliedInThread: _messageResponse2.repliedInThread,
|
|
19785
|
-
bodyAttributes: _messageResponse2.bodyAttributes,
|
|
19786
|
-
createdAt: _messageResponse2.createdAt,
|
|
19787
|
-
channelId: channel.id
|
|
19788
|
-
};
|
|
19789
|
-
isInActiveChannel = getMessagesFromMap(channelId)[_messageCopy2.tid];
|
|
19790
|
-
if (!isInActiveChannel) {
|
|
19791
|
-
_context6.n = 29;
|
|
19792
|
-
break;
|
|
19496
|
+
store.dispatch(sendTextMessageAC(message, channelId, connectionState, false));
|
|
19793
19497
|
}
|
|
19794
|
-
|
|
19795
|
-
return effects.put(removePendingMessageAC(channel.id, _messageCopy2.tid || _messageCopy2.id));
|
|
19796
|
-
case 29:
|
|
19797
|
-
_context6.n = 30;
|
|
19798
|
-
return effects.put(updateMessageAC(_messageCopy2.tid, _messageUpdateData));
|
|
19799
|
-
case 30:
|
|
19800
|
-
updateMessageOnMap(channel.id, {
|
|
19801
|
-
messageId: _messageCopy2.tid,
|
|
19802
|
-
params: _messageUpdateData
|
|
19803
|
-
});
|
|
19804
|
-
activeChannelId = getActiveChannelId();
|
|
19805
|
-
if (!(channelId === activeChannelId)) {
|
|
19806
|
-
_context6.n = 32;
|
|
19807
|
-
break;
|
|
19808
|
-
}
|
|
19809
|
-
_context6.n = 31;
|
|
19810
|
-
return effects.put(updateMessageAC(_messageCopy2.tid, JSON.parse(JSON.stringify(_messageResponse2))));
|
|
19811
|
-
case 31:
|
|
19812
|
-
updateMessageOnMap(channel.id, {
|
|
19813
|
-
messageId: _messageCopy2.tid,
|
|
19814
|
-
params: _messageUpdateData
|
|
19815
|
-
});
|
|
19816
|
-
updateMessageOnAllMessages(_messageCopy2.tid, _messageUpdateData);
|
|
19817
|
-
case 32:
|
|
19818
|
-
updateChannelOnAllChannels(channel.id, channel);
|
|
19819
|
-
_messageToUpdate = JSON.parse(JSON.stringify(_messageResponse2));
|
|
19820
|
-
updateChannelLastMessageOnAllChannels(channel.id, _messageToUpdate);
|
|
19821
|
-
_context6.n = 33;
|
|
19822
|
-
return effects.put(updateChannelLastMessageAC(_messageToUpdate, {
|
|
19823
|
-
id: channel.id
|
|
19824
|
-
}));
|
|
19825
|
-
case 33:
|
|
19826
|
-
_context6.n = 34;
|
|
19827
|
-
return effects.put(scrollToNewMessageAC(true));
|
|
19828
|
-
case 34:
|
|
19829
|
-
_context6.n = 37;
|
|
19830
|
-
break;
|
|
19831
|
-
case 35:
|
|
19832
|
-
_context6.p = 35;
|
|
19833
|
-
_t6 = _context6.v;
|
|
19834
|
-
log.error('ERROR in resend message', _t6.message, 'channel.. . ', channel);
|
|
19835
|
-
_context6.n = 36;
|
|
19836
|
-
return effects.put(updateMessageAC(message.tid, {
|
|
19837
|
-
state: MESSAGE_STATUS.FAILED
|
|
19838
|
-
}));
|
|
19839
|
-
case 36:
|
|
19840
|
-
updateMessageOnMap(channel.id, {
|
|
19841
|
-
messageId: message.tid,
|
|
19842
|
-
params: {
|
|
19843
|
-
state: MESSAGE_STATUS.FAILED
|
|
19844
|
-
}
|
|
19845
|
-
});
|
|
19846
|
-
updateMessageOnAllMessages(message.tid, {
|
|
19847
|
-
state: MESSAGE_STATUS.FAILED
|
|
19848
|
-
});
|
|
19849
|
-
case 37:
|
|
19850
|
-
_context6.n = 38;
|
|
19851
|
-
return effects.put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
19852
|
-
case 38:
|
|
19498
|
+
case 1:
|
|
19853
19499
|
return _context6.a(2);
|
|
19854
19500
|
}
|
|
19855
|
-
}, _marked4$1
|
|
19501
|
+
}, _marked4$1);
|
|
19856
19502
|
}
|
|
19857
19503
|
function deleteMessage(action) {
|
|
19858
|
-
var payload, messageId, channelId, deleteOption, channel, deletedMessage, messageToUpdate,
|
|
19504
|
+
var payload, messageId, channelId, deleteOption, channel, deletedMessage, messageToUpdate, _t5;
|
|
19859
19505
|
return _regenerator().w(function (_context7) {
|
|
19860
19506
|
while (1) switch (_context7.p = _context7.n) {
|
|
19861
19507
|
case 0:
|
|
@@ -19897,21 +19543,21 @@ function deleteMessage(action) {
|
|
|
19897
19543
|
break;
|
|
19898
19544
|
case 5:
|
|
19899
19545
|
_context7.p = 5;
|
|
19900
|
-
|
|
19901
|
-
log.error('ERROR in delete message',
|
|
19546
|
+
_t5 = _context7.v;
|
|
19547
|
+
log.error('ERROR in delete message', _t5.message);
|
|
19902
19548
|
case 6:
|
|
19903
19549
|
return _context7.a(2);
|
|
19904
19550
|
}
|
|
19905
19551
|
}, _marked5$1, null, [[0, 5]]);
|
|
19906
19552
|
}
|
|
19907
19553
|
function editMessage(action) {
|
|
19908
|
-
var payload,
|
|
19554
|
+
var payload, message, channelId, channel, linkAttachments, anotherAttachments, linkAttachmentsToSend, editedMessage, messageToUpdate, _t6;
|
|
19909
19555
|
return _regenerator().w(function (_context8) {
|
|
19910
19556
|
while (1) switch (_context8.p = _context8.n) {
|
|
19911
19557
|
case 0:
|
|
19912
19558
|
_context8.p = 0;
|
|
19913
19559
|
payload = action.payload;
|
|
19914
|
-
|
|
19560
|
+
message = payload.message, channelId = payload.channelId;
|
|
19915
19561
|
_context8.n = 1;
|
|
19916
19562
|
return effects.call(getChannelFromMap, channelId);
|
|
19917
19563
|
case 1:
|
|
@@ -19922,11 +19568,11 @@ function editMessage(action) {
|
|
|
19922
19568
|
setChannelInMap(channel);
|
|
19923
19569
|
}
|
|
19924
19570
|
}
|
|
19925
|
-
if (
|
|
19926
|
-
linkAttachments =
|
|
19571
|
+
if (message.attachments.length > 0) {
|
|
19572
|
+
linkAttachments = message.attachments.filter(function (att) {
|
|
19927
19573
|
return att.type === attachmentTypes.link;
|
|
19928
19574
|
});
|
|
19929
|
-
anotherAttachments =
|
|
19575
|
+
anotherAttachments = message.attachments.filter(function (att) {
|
|
19930
19576
|
return att.type !== attachmentTypes.link;
|
|
19931
19577
|
});
|
|
19932
19578
|
linkAttachmentsToSend = [];
|
|
@@ -19935,12 +19581,12 @@ function editMessage(action) {
|
|
|
19935
19581
|
var linkAttachmentToSend = linkAttachmentBuilder.setName(linkAttachment.name).setUpload(linkAttachment.upload).create();
|
|
19936
19582
|
linkAttachmentsToSend.push(linkAttachmentToSend);
|
|
19937
19583
|
});
|
|
19938
|
-
|
|
19584
|
+
message.attachments = [].concat(anotherAttachments, linkAttachmentsToSend);
|
|
19939
19585
|
}
|
|
19940
19586
|
_context8.n = 2;
|
|
19941
|
-
return effects.call(channel.editMessage, _extends({},
|
|
19942
|
-
metadata: isJSON(
|
|
19943
|
-
attachments:
|
|
19587
|
+
return effects.call(channel.editMessage, _extends({}, message, {
|
|
19588
|
+
metadata: isJSON(message.metadata) ? message.metadata : JSON.stringify(message.metadata),
|
|
19589
|
+
attachments: message.attachments.map(function (att) {
|
|
19944
19590
|
return _extends({}, att, {
|
|
19945
19591
|
metadata: isJSON(att.metadata) ? att.metadata : JSON.stringify(att.metadata)
|
|
19946
19592
|
});
|
|
@@ -19955,8 +19601,8 @@ function editMessage(action) {
|
|
|
19955
19601
|
messageId: editedMessage.id,
|
|
19956
19602
|
params: editedMessage
|
|
19957
19603
|
});
|
|
19958
|
-
updateMessageOnAllMessages(
|
|
19959
|
-
if (!(channel.lastMessage.id ===
|
|
19604
|
+
updateMessageOnAllMessages(message.id, editedMessage);
|
|
19605
|
+
if (!(channel.lastMessage.id === message.id)) {
|
|
19960
19606
|
_context8.n = 4;
|
|
19961
19607
|
break;
|
|
19962
19608
|
}
|
|
@@ -19969,15 +19615,15 @@ function editMessage(action) {
|
|
|
19969
19615
|
break;
|
|
19970
19616
|
case 5:
|
|
19971
19617
|
_context8.p = 5;
|
|
19972
|
-
|
|
19973
|
-
log.error('ERROR in edit message',
|
|
19618
|
+
_t6 = _context8.v;
|
|
19619
|
+
log.error('ERROR in edit message', _t6.message);
|
|
19974
19620
|
case 6:
|
|
19975
19621
|
return _context8.a(2);
|
|
19976
19622
|
}
|
|
19977
19623
|
}, _marked6$1, null, [[0, 5]]);
|
|
19978
19624
|
}
|
|
19979
19625
|
function getMessagesQuery(action) {
|
|
19980
|
-
var _action$payload, channel, loadWithLastMessage, messageId, limit, withDeliveredMessages, highlight, behavior, SceytChatClient, messageQueryBuilder, messageQuery, cachedMessages, result, allMessages, havLastMessage, secondResult, sentMessages, messagesMap, filteredSentMessages, _allMessages, messageIndex, maxLengthPart, _secondResult, thirdResult, _secondResult2, _thirdResult, _secondResult3, _Object$values, previousAllMessages, _secondResult4, updatedMessages, lastMessageId, _allMessages2, setMappedAllMessages, allMessagesAfterLastMessage, pendingMessages, _messagesMap, filteredPendingMessages,
|
|
19626
|
+
var _action$payload, channel, loadWithLastMessage, messageId, limit, withDeliveredMessages, highlight, behavior, SceytChatClient, messageQueryBuilder, messageQuery, cachedMessages, result, allMessages, havLastMessage, secondResult, sentMessages, messagesMap, filteredSentMessages, _allMessages, messageIndex, maxLengthPart, _secondResult, thirdResult, _secondResult2, _thirdResult, _secondResult3, _Object$values, previousAllMessages, _secondResult4, updatedMessages, lastMessageId, _allMessages2, setMappedAllMessages, allMessagesAfterLastMessage, pendingMessages, _messagesMap, filteredPendingMessages, _t7;
|
|
19981
19627
|
return _regenerator().w(function (_context9) {
|
|
19982
19628
|
while (1) switch (_context9.p = _context9.n) {
|
|
19983
19629
|
case 0:
|
|
@@ -20318,8 +19964,8 @@ function getMessagesQuery(action) {
|
|
|
20318
19964
|
break;
|
|
20319
19965
|
case 50:
|
|
20320
19966
|
_context9.p = 50;
|
|
20321
|
-
|
|
20322
|
-
log.error('error in message query',
|
|
19967
|
+
_t7 = _context9.v;
|
|
19968
|
+
log.error('error in message query', _t7);
|
|
20323
19969
|
case 51:
|
|
20324
19970
|
_context9.p = 51;
|
|
20325
19971
|
_context9.n = 52;
|
|
@@ -20332,7 +19978,7 @@ function getMessagesQuery(action) {
|
|
|
20332
19978
|
}, _marked7$1, null, [[0, 50, 51, 53]]);
|
|
20333
19979
|
}
|
|
20334
19980
|
function getMessageQuery(action) {
|
|
20335
|
-
var payload, channelId, messageId, channel, messages, fetchedMessage,
|
|
19981
|
+
var payload, channelId, messageId, channel, messages, fetchedMessage, _t8;
|
|
20336
19982
|
return _regenerator().w(function (_context0) {
|
|
20337
19983
|
while (1) switch (_context0.p = _context0.n) {
|
|
20338
19984
|
case 0:
|
|
@@ -20381,15 +20027,15 @@ function getMessageQuery(action) {
|
|
|
20381
20027
|
break;
|
|
20382
20028
|
case 7:
|
|
20383
20029
|
_context0.p = 7;
|
|
20384
|
-
|
|
20385
|
-
log.error('error in message query',
|
|
20030
|
+
_t8 = _context0.v;
|
|
20031
|
+
log.error('error in message query', _t8);
|
|
20386
20032
|
case 8:
|
|
20387
20033
|
return _context0.a(2);
|
|
20388
20034
|
}
|
|
20389
20035
|
}, _marked8$1, null, [[0, 7]]);
|
|
20390
20036
|
}
|
|
20391
20037
|
function loadMoreMessages(action) {
|
|
20392
|
-
var payload, limit, direction, channelId, messageId, hasNext, SceytChatClient, messageQueryBuilder, messageQuery, result,
|
|
20038
|
+
var payload, limit, direction, channelId, messageId, hasNext, SceytChatClient, messageQueryBuilder, messageQuery, result, _t9;
|
|
20393
20039
|
return _regenerator().w(function (_context1) {
|
|
20394
20040
|
while (1) switch (_context1.p = _context1.n) {
|
|
20395
20041
|
case 0:
|
|
@@ -20502,15 +20148,15 @@ function loadMoreMessages(action) {
|
|
|
20502
20148
|
break;
|
|
20503
20149
|
case 18:
|
|
20504
20150
|
_context1.p = 18;
|
|
20505
|
-
|
|
20506
|
-
log.error('error in load more messages',
|
|
20151
|
+
_t9 = _context1.v;
|
|
20152
|
+
log.error('error in load more messages', _t9);
|
|
20507
20153
|
case 19:
|
|
20508
20154
|
return _context1.a(2);
|
|
20509
20155
|
}
|
|
20510
20156
|
}, _marked9$1, null, [[0, 18]]);
|
|
20511
20157
|
}
|
|
20512
20158
|
function addReaction(action) {
|
|
20513
|
-
var payload, channelId, messageId, key, score, reason, enforceUnique, user, channel, _yield$call,
|
|
20159
|
+
var payload, channelId, messageId, key, score, reason, enforceUnique, user, channel, _yield$call, message, reaction, channelUpdateParam, _t0;
|
|
20514
20160
|
return _regenerator().w(function (_context10) {
|
|
20515
20161
|
while (1) switch (_context10.p = _context10.n) {
|
|
20516
20162
|
case 0:
|
|
@@ -20532,15 +20178,15 @@ function addReaction(action) {
|
|
|
20532
20178
|
return effects.call(channel.addReaction, messageId, key, score, reason, enforceUnique);
|
|
20533
20179
|
case 2:
|
|
20534
20180
|
_yield$call = _context10.v;
|
|
20535
|
-
|
|
20181
|
+
message = _yield$call.message;
|
|
20536
20182
|
reaction = _yield$call.reaction;
|
|
20537
|
-
if (!(user.id ===
|
|
20183
|
+
if (!(user.id === message.user.id)) {
|
|
20538
20184
|
_context10.n = 4;
|
|
20539
20185
|
break;
|
|
20540
20186
|
}
|
|
20541
20187
|
channelUpdateParam = {
|
|
20542
20188
|
userMessageReactions: [reaction],
|
|
20543
|
-
lastReactedMessage:
|
|
20189
|
+
lastReactedMessage: message,
|
|
20544
20190
|
newReactions: [reaction]
|
|
20545
20191
|
};
|
|
20546
20192
|
_context10.n = 3;
|
|
@@ -20555,23 +20201,23 @@ function addReaction(action) {
|
|
|
20555
20201
|
return effects.put(addReactionToListAC(reaction));
|
|
20556
20202
|
case 6:
|
|
20557
20203
|
_context10.n = 7;
|
|
20558
|
-
return effects.put(addReactionToMessageAC(
|
|
20204
|
+
return effects.put(addReactionToMessageAC(message, reaction, true));
|
|
20559
20205
|
case 7:
|
|
20560
|
-
addReactionToMessageOnMap(channelId,
|
|
20561
|
-
addReactionOnAllMessages(
|
|
20206
|
+
addReactionToMessageOnMap(channelId, message, reaction, true);
|
|
20207
|
+
addReactionOnAllMessages(message, reaction, true);
|
|
20562
20208
|
_context10.n = 9;
|
|
20563
20209
|
break;
|
|
20564
20210
|
case 8:
|
|
20565
20211
|
_context10.p = 8;
|
|
20566
|
-
|
|
20567
|
-
log.error('ERROR in add reaction',
|
|
20212
|
+
_t0 = _context10.v;
|
|
20213
|
+
log.error('ERROR in add reaction', _t0.message);
|
|
20568
20214
|
case 9:
|
|
20569
20215
|
return _context10.a(2);
|
|
20570
20216
|
}
|
|
20571
20217
|
}, _marked0$1, null, [[0, 8]]);
|
|
20572
20218
|
}
|
|
20573
20219
|
function deleteReaction(action) {
|
|
20574
|
-
var payload, channelId, messageId, key, isLastReaction, channel, _yield$call2,
|
|
20220
|
+
var payload, channelId, messageId, key, isLastReaction, channel, _yield$call2, message, reaction, channelUpdateParam, _t1;
|
|
20575
20221
|
return _regenerator().w(function (_context11) {
|
|
20576
20222
|
while (1) switch (_context11.p = _context11.n) {
|
|
20577
20223
|
case 0:
|
|
@@ -20592,7 +20238,7 @@ function deleteReaction(action) {
|
|
|
20592
20238
|
return effects.call(channel.deleteReaction, messageId, key);
|
|
20593
20239
|
case 2:
|
|
20594
20240
|
_yield$call2 = _context11.v;
|
|
20595
|
-
|
|
20241
|
+
message = _yield$call2.message;
|
|
20596
20242
|
reaction = _yield$call2.reaction;
|
|
20597
20243
|
if (!isLastReaction) {
|
|
20598
20244
|
_context11.n = 4;
|
|
@@ -20611,23 +20257,23 @@ function deleteReaction(action) {
|
|
|
20611
20257
|
return effects.put(deleteReactionFromListAC(reaction));
|
|
20612
20258
|
case 5:
|
|
20613
20259
|
_context11.n = 6;
|
|
20614
|
-
return effects.put(deleteReactionFromMessageAC(
|
|
20260
|
+
return effects.put(deleteReactionFromMessageAC(message, reaction, true));
|
|
20615
20261
|
case 6:
|
|
20616
|
-
removeReactionToMessageOnMap(channelId,
|
|
20617
|
-
removeReactionOnAllMessages(
|
|
20262
|
+
removeReactionToMessageOnMap(channelId, message, reaction, true);
|
|
20263
|
+
removeReactionOnAllMessages(message, reaction, true);
|
|
20618
20264
|
_context11.n = 8;
|
|
20619
20265
|
break;
|
|
20620
20266
|
case 7:
|
|
20621
20267
|
_context11.p = 7;
|
|
20622
|
-
|
|
20623
|
-
log.error('ERROR in delete reaction',
|
|
20268
|
+
_t1 = _context11.v;
|
|
20269
|
+
log.error('ERROR in delete reaction', _t1.message);
|
|
20624
20270
|
case 8:
|
|
20625
20271
|
return _context11.a(2);
|
|
20626
20272
|
}
|
|
20627
20273
|
}, _marked1$1, null, [[0, 7]]);
|
|
20628
20274
|
}
|
|
20629
20275
|
function getReactions(action) {
|
|
20630
|
-
var payload, messageId, key, limit, SceytChatClient, reactionQueryBuilder, reactionQuery, result,
|
|
20276
|
+
var payload, messageId, key, limit, SceytChatClient, reactionQueryBuilder, reactionQuery, result, _t10;
|
|
20631
20277
|
return _regenerator().w(function (_context12) {
|
|
20632
20278
|
while (1) switch (_context12.p = _context12.n) {
|
|
20633
20279
|
case 0:
|
|
@@ -20662,15 +20308,15 @@ function getReactions(action) {
|
|
|
20662
20308
|
break;
|
|
20663
20309
|
case 6:
|
|
20664
20310
|
_context12.p = 6;
|
|
20665
|
-
|
|
20666
|
-
log.error('ERROR in get reactions',
|
|
20311
|
+
_t10 = _context12.v;
|
|
20312
|
+
log.error('ERROR in get reactions', _t10.message);
|
|
20667
20313
|
case 7:
|
|
20668
20314
|
return _context12.a(2);
|
|
20669
20315
|
}
|
|
20670
20316
|
}, _marked10$1, null, [[0, 6]]);
|
|
20671
20317
|
}
|
|
20672
20318
|
function loadMoreReactions(action) {
|
|
20673
|
-
var payload, limit, ReactionQuery, result,
|
|
20319
|
+
var payload, limit, ReactionQuery, result, _t11;
|
|
20674
20320
|
return _regenerator().w(function (_context13) {
|
|
20675
20321
|
while (1) switch (_context13.p = _context13.n) {
|
|
20676
20322
|
case 0:
|
|
@@ -20698,15 +20344,15 @@ function loadMoreReactions(action) {
|
|
|
20698
20344
|
break;
|
|
20699
20345
|
case 5:
|
|
20700
20346
|
_context13.p = 5;
|
|
20701
|
-
|
|
20702
|
-
log.error('ERROR in load more reactions',
|
|
20347
|
+
_t11 = _context13.v;
|
|
20348
|
+
log.error('ERROR in load more reactions', _t11.message);
|
|
20703
20349
|
case 6:
|
|
20704
20350
|
return _context13.a(2);
|
|
20705
20351
|
}
|
|
20706
20352
|
}, _marked11$1, null, [[0, 5]]);
|
|
20707
20353
|
}
|
|
20708
20354
|
function getMessageAttachments(action) {
|
|
20709
|
-
var _action$payload2, channelId, attachmentType, limit, direction, attachmentId, forPopup, SceytChatClient, typeList, AttachmentByTypeQueryBuilder, AttachmentByTypeQuery, result,
|
|
20355
|
+
var _action$payload2, channelId, attachmentType, limit, direction, attachmentId, forPopup, SceytChatClient, typeList, AttachmentByTypeQueryBuilder, AttachmentByTypeQuery, result, _t12;
|
|
20710
20356
|
return _regenerator().w(function (_context14) {
|
|
20711
20357
|
while (1) switch (_context14.p = _context14.n) {
|
|
20712
20358
|
case 0:
|
|
@@ -20784,15 +20430,15 @@ function getMessageAttachments(action) {
|
|
|
20784
20430
|
break;
|
|
20785
20431
|
case 13:
|
|
20786
20432
|
_context14.p = 13;
|
|
20787
|
-
|
|
20788
|
-
log.error('error in message attachment query',
|
|
20433
|
+
_t12 = _context14.v;
|
|
20434
|
+
log.error('error in message attachment query', _t12);
|
|
20789
20435
|
case 14:
|
|
20790
20436
|
return _context14.a(2);
|
|
20791
20437
|
}
|
|
20792
20438
|
}, _marked12$1, null, [[0, 13]]);
|
|
20793
20439
|
}
|
|
20794
20440
|
function loadMoreMessageAttachments(action) {
|
|
20795
|
-
var _action$payload3, limit, direction, forPopup, AttachmentQuery, _yield$call3, attachments, hasNext,
|
|
20441
|
+
var _action$payload3, limit, direction, forPopup, AttachmentQuery, _yield$call3, attachments, hasNext, _t13;
|
|
20796
20442
|
return _regenerator().w(function (_context15) {
|
|
20797
20443
|
while (1) switch (_context15.p = _context15.n) {
|
|
20798
20444
|
case 0:
|
|
@@ -20836,15 +20482,15 @@ function loadMoreMessageAttachments(action) {
|
|
|
20836
20482
|
break;
|
|
20837
20483
|
case 8:
|
|
20838
20484
|
_context15.p = 8;
|
|
20839
|
-
|
|
20840
|
-
log.error('error in message attachment query',
|
|
20485
|
+
_t13 = _context15.v;
|
|
20486
|
+
log.error('error in message attachment query', _t13);
|
|
20841
20487
|
case 9:
|
|
20842
20488
|
return _context15.a(2);
|
|
20843
20489
|
}
|
|
20844
20490
|
}, _marked13$1, null, [[0, 8]]);
|
|
20845
20491
|
}
|
|
20846
20492
|
function pauseAttachmentUploading(action) {
|
|
20847
|
-
var attachmentId, isPaused,
|
|
20493
|
+
var attachmentId, isPaused, _t14;
|
|
20848
20494
|
return _regenerator().w(function (_context16) {
|
|
20849
20495
|
while (1) switch (_context16.p = _context16.n) {
|
|
20850
20496
|
case 0:
|
|
@@ -20866,15 +20512,15 @@ function pauseAttachmentUploading(action) {
|
|
|
20866
20512
|
break;
|
|
20867
20513
|
case 2:
|
|
20868
20514
|
_context16.p = 2;
|
|
20869
|
-
|
|
20870
|
-
log.error('error in pause attachment uploading',
|
|
20515
|
+
_t14 = _context16.v;
|
|
20516
|
+
log.error('error in pause attachment uploading', _t14);
|
|
20871
20517
|
case 3:
|
|
20872
20518
|
return _context16.a(2);
|
|
20873
20519
|
}
|
|
20874
20520
|
}, _marked14$1, null, [[0, 2]]);
|
|
20875
20521
|
}
|
|
20876
20522
|
function resumeAttachmentUploading(action) {
|
|
20877
|
-
var attachmentId, isResumed,
|
|
20523
|
+
var attachmentId, isResumed, _t15;
|
|
20878
20524
|
return _regenerator().w(function (_context17) {
|
|
20879
20525
|
while (1) switch (_context17.p = _context17.n) {
|
|
20880
20526
|
case 0:
|
|
@@ -20897,15 +20543,15 @@ function resumeAttachmentUploading(action) {
|
|
|
20897
20543
|
break;
|
|
20898
20544
|
case 2:
|
|
20899
20545
|
_context17.p = 2;
|
|
20900
|
-
|
|
20901
|
-
log.error('error in resume attachment uploading',
|
|
20546
|
+
_t15 = _context17.v;
|
|
20547
|
+
log.error('error in resume attachment uploading', _t15);
|
|
20902
20548
|
case 3:
|
|
20903
20549
|
return _context17.a(2);
|
|
20904
20550
|
}
|
|
20905
20551
|
}, _marked15$1, null, [[0, 2]]);
|
|
20906
20552
|
}
|
|
20907
20553
|
function getMessageMarkers(action) {
|
|
20908
|
-
var _action$payload4, messageId, channelId, deliveryStatus, sceytChatClient, messageMarkerListQueryBuilder, messageMarkerListQuery, messageMarkers,
|
|
20554
|
+
var _action$payload4, messageId, channelId, deliveryStatus, sceytChatClient, messageMarkerListQueryBuilder, messageMarkerListQuery, messageMarkers, _t16;
|
|
20909
20555
|
return _regenerator().w(function (_context18) {
|
|
20910
20556
|
while (1) switch (_context18.p = _context18.n) {
|
|
20911
20557
|
case 0:
|
|
@@ -20935,8 +20581,8 @@ function getMessageMarkers(action) {
|
|
|
20935
20581
|
break;
|
|
20936
20582
|
case 5:
|
|
20937
20583
|
_context18.p = 5;
|
|
20938
|
-
|
|
20939
|
-
log.error('error in get message markers',
|
|
20584
|
+
_t16 = _context18.v;
|
|
20585
|
+
log.error('error in get message markers', _t16);
|
|
20940
20586
|
case 6:
|
|
20941
20587
|
_context18.p = 6;
|
|
20942
20588
|
_context18.n = 7;
|
|
@@ -21074,13 +20720,13 @@ function updateMessageOptimisticallyForAddPollVote(channelId, message, vote) {
|
|
|
21074
20720
|
}, _marked18$1);
|
|
21075
20721
|
}
|
|
21076
20722
|
function addPollVote(action) {
|
|
21077
|
-
var payload, channelId, pollId, optionId,
|
|
20723
|
+
var payload, channelId, pollId, optionId, message, isResend, sceytChatClient, _user$presence2, connectionState, user, vote, pendingAction, conflictCheck, channel, _Object$values2, _store$getState$Messa, _currentMessage$pollD, _currentMessage$pollD2, _currentMessage$pollD3, currentMessage, hasNext, obj, _t17;
|
|
21078
20724
|
return _regenerator().w(function (_context21) {
|
|
21079
20725
|
while (1) switch (_context21.p = _context21.n) {
|
|
21080
20726
|
case 0:
|
|
21081
20727
|
_context21.p = 0;
|
|
21082
20728
|
payload = action.payload;
|
|
21083
|
-
channelId = payload.channelId, pollId = payload.pollId, optionId = payload.optionId,
|
|
20729
|
+
channelId = payload.channelId, pollId = payload.pollId, optionId = payload.optionId, message = payload.message, isResend = payload.isResend;
|
|
21084
20730
|
sceytChatClient = getClient();
|
|
21085
20731
|
if (!sceytChatClient) {
|
|
21086
20732
|
_context21.n = 7;
|
|
@@ -21118,7 +20764,7 @@ function addPollVote(action) {
|
|
|
21118
20764
|
channelId: channelId,
|
|
21119
20765
|
pollId: pollId,
|
|
21120
20766
|
optionId: optionId,
|
|
21121
|
-
message:
|
|
20767
|
+
message: message
|
|
21122
20768
|
};
|
|
21123
20769
|
conflictCheck = checkPendingPollActionConflict(pendingAction);
|
|
21124
20770
|
if (!(conflictCheck.hasConflict && !conflictCheck.shouldSkip)) {
|
|
@@ -21134,11 +20780,11 @@ function addPollVote(action) {
|
|
|
21134
20780
|
break;
|
|
21135
20781
|
}
|
|
21136
20782
|
currentMessage = ((_Object$values2 = Object.values(getMessagesFromMap(channelId) || {})) === null || _Object$values2 === void 0 ? void 0 : _Object$values2.find(function (msg) {
|
|
21137
|
-
return msg.id ===
|
|
21138
|
-
})) ||
|
|
20783
|
+
return msg.id === message.id || msg.tid === message.id;
|
|
20784
|
+
})) || message;
|
|
21139
20785
|
hasNext = ((_store$getState$Messa = store.getState().MessageReducer.pollVotesHasMore) === null || _store$getState$Messa === void 0 ? void 0 : _store$getState$Messa[pollId]) || false;
|
|
21140
20786
|
_context21.n = 2;
|
|
21141
|
-
return effects.put(addPollVotesToListAC(pollId, optionId, [(_currentMessage$pollD = currentMessage.pollDetails) === null || _currentMessage$pollD === void 0 ? void 0 : (_currentMessage$pollD2 = _currentMessage$pollD.voteDetails) === null || _currentMessage$pollD2 === void 0 ? void 0 : (_currentMessage$pollD3 = _currentMessage$pollD2.ownVotes) === null || _currentMessage$pollD3 === void 0 ? void 0 : _currentMessage$pollD3[0]], hasNext,
|
|
20787
|
+
return effects.put(addPollVotesToListAC(pollId, optionId, [(_currentMessage$pollD = currentMessage.pollDetails) === null || _currentMessage$pollD === void 0 ? void 0 : (_currentMessage$pollD2 = _currentMessage$pollD.voteDetails) === null || _currentMessage$pollD2 === void 0 ? void 0 : (_currentMessage$pollD3 = _currentMessage$pollD2.ownVotes) === null || _currentMessage$pollD3 === void 0 ? void 0 : _currentMessage$pollD3[0]], hasNext, message.id));
|
|
21142
20788
|
case 2:
|
|
21143
20789
|
obj = {
|
|
21144
20790
|
type: 'addOwn',
|
|
@@ -21146,12 +20792,12 @@ function addPollVote(action) {
|
|
|
21146
20792
|
incrementVotesPerOptionCount: 1
|
|
21147
20793
|
};
|
|
21148
20794
|
updateMessageOnMap(channel.id, {
|
|
21149
|
-
messageId:
|
|
20795
|
+
messageId: message.id,
|
|
21150
20796
|
params: {}
|
|
21151
20797
|
}, obj);
|
|
21152
|
-
updateMessageOnAllMessages(
|
|
20798
|
+
updateMessageOnAllMessages(message.id, {}, obj);
|
|
21153
20799
|
_context21.n = 3;
|
|
21154
|
-
return effects.put(updateMessageAC(
|
|
20800
|
+
return effects.put(updateMessageAC(message.id, {}, undefined, obj));
|
|
21155
20801
|
case 3:
|
|
21156
20802
|
_context21.n = 5;
|
|
21157
20803
|
break;
|
|
@@ -21160,21 +20806,21 @@ function addPollVote(action) {
|
|
|
21160
20806
|
_context21.n = 5;
|
|
21161
20807
|
break;
|
|
21162
20808
|
}
|
|
21163
|
-
return _context21.d(_regeneratorValues(updateMessageOptimisticallyForAddPollVote(channelId,
|
|
20809
|
+
return _context21.d(_regeneratorValues(updateMessageOptimisticallyForAddPollVote(channelId, message, vote)), 5);
|
|
21164
20810
|
case 5:
|
|
21165
20811
|
if (!conflictCheck.shouldSkip) {
|
|
21166
20812
|
setPendingPollAction(pendingAction);
|
|
21167
20813
|
}
|
|
21168
20814
|
return _context21.a(2);
|
|
21169
20815
|
case 6:
|
|
21170
|
-
return _context21.d(_regeneratorValues(executeAddPollVote(channelId, pollId, optionId,
|
|
20816
|
+
return _context21.d(_regeneratorValues(executeAddPollVote(channelId, pollId, optionId, message, isResend)), 7);
|
|
21171
20817
|
case 7:
|
|
21172
20818
|
_context21.n = 9;
|
|
21173
20819
|
break;
|
|
21174
20820
|
case 8:
|
|
21175
20821
|
_context21.p = 8;
|
|
21176
|
-
|
|
21177
|
-
log.error('error in add poll vote',
|
|
20822
|
+
_t17 = _context21.v;
|
|
20823
|
+
log.error('error in add poll vote', _t17);
|
|
21178
20824
|
case 9:
|
|
21179
20825
|
return _context21.a(2);
|
|
21180
20826
|
}
|
|
@@ -21275,20 +20921,20 @@ function updateMessageOptimisticallyForDeletePollVote(channelId, message, vote)
|
|
|
21275
20921
|
}, _marked21$1);
|
|
21276
20922
|
}
|
|
21277
20923
|
function deletePollVote(action) {
|
|
21278
|
-
var payload, channelId, pollId, optionId,
|
|
20924
|
+
var payload, channelId, pollId, optionId, message, isResend, sceytChatClient, _message$pollDetails1, _message$pollDetails10, _message$pollDetails11, connectionState, vote, pendingAction, conflictCheck, channel, _Object$values3, _currentMessage$pollD4, _currentMessage$pollD5, _currentMessage$pollD6, currentMessage, obj, _t18;
|
|
21279
20925
|
return _regenerator().w(function (_context24) {
|
|
21280
20926
|
while (1) switch (_context24.p = _context24.n) {
|
|
21281
20927
|
case 0:
|
|
21282
20928
|
_context24.p = 0;
|
|
21283
20929
|
payload = action.payload;
|
|
21284
|
-
channelId = payload.channelId, pollId = payload.pollId, optionId = payload.optionId,
|
|
20930
|
+
channelId = payload.channelId, pollId = payload.pollId, optionId = payload.optionId, message = payload.message, isResend = payload.isResend;
|
|
21285
20931
|
sceytChatClient = getClient();
|
|
21286
20932
|
if (!sceytChatClient) {
|
|
21287
20933
|
_context24.n = 8;
|
|
21288
20934
|
break;
|
|
21289
20935
|
}
|
|
21290
20936
|
connectionState = sceytChatClient.connectionState;
|
|
21291
|
-
vote = (
|
|
20937
|
+
vote = (_message$pollDetails1 = message.pollDetails) === null || _message$pollDetails1 === void 0 ? void 0 : (_message$pollDetails10 = _message$pollDetails1.voteDetails) === null || _message$pollDetails10 === void 0 ? void 0 : (_message$pollDetails11 = _message$pollDetails10.ownVotes) === null || _message$pollDetails11 === void 0 ? void 0 : _message$pollDetails11.find(function (vote) {
|
|
21292
20938
|
return vote.optionId === optionId;
|
|
21293
20939
|
});
|
|
21294
20940
|
if (vote) {
|
|
@@ -21306,7 +20952,7 @@ function deletePollVote(action) {
|
|
|
21306
20952
|
channelId: channelId,
|
|
21307
20953
|
pollId: pollId,
|
|
21308
20954
|
optionId: optionId,
|
|
21309
|
-
message:
|
|
20955
|
+
message: message
|
|
21310
20956
|
};
|
|
21311
20957
|
conflictCheck = checkPendingPollActionConflict(pendingAction);
|
|
21312
20958
|
if (!(conflictCheck.hasConflict && conflictCheck.shouldSkip)) {
|
|
@@ -21322,10 +20968,10 @@ function deletePollVote(action) {
|
|
|
21322
20968
|
break;
|
|
21323
20969
|
}
|
|
21324
20970
|
currentMessage = ((_Object$values3 = Object.values(getMessagesFromMap(channelId) || {})) === null || _Object$values3 === void 0 ? void 0 : _Object$values3.find(function (msg) {
|
|
21325
|
-
return msg.id ===
|
|
21326
|
-
})) ||
|
|
20971
|
+
return msg.id === message.id || msg.tid === message.id;
|
|
20972
|
+
})) || message;
|
|
21327
20973
|
_context24.n = 3;
|
|
21328
|
-
return effects.put(deletePollVotesFromListAC(pollId, optionId, [(_currentMessage$pollD4 = currentMessage.pollDetails) === null || _currentMessage$pollD4 === void 0 ? void 0 : (_currentMessage$pollD5 = _currentMessage$pollD4.voteDetails) === null || _currentMessage$pollD5 === void 0 ? void 0 : (_currentMessage$pollD6 = _currentMessage$pollD5.ownVotes) === null || _currentMessage$pollD6 === void 0 ? void 0 : _currentMessage$pollD6[0]],
|
|
20974
|
+
return effects.put(deletePollVotesFromListAC(pollId, optionId, [(_currentMessage$pollD4 = currentMessage.pollDetails) === null || _currentMessage$pollD4 === void 0 ? void 0 : (_currentMessage$pollD5 = _currentMessage$pollD4.voteDetails) === null || _currentMessage$pollD5 === void 0 ? void 0 : (_currentMessage$pollD6 = _currentMessage$pollD5.ownVotes) === null || _currentMessage$pollD6 === void 0 ? void 0 : _currentMessage$pollD6[0]], message.id));
|
|
21329
20975
|
case 3:
|
|
21330
20976
|
obj = {
|
|
21331
20977
|
type: 'deleteOwn',
|
|
@@ -21333,12 +20979,12 @@ function deletePollVote(action) {
|
|
|
21333
20979
|
incrementVotesPerOptionCount: -1
|
|
21334
20980
|
};
|
|
21335
20981
|
updateMessageOnMap(channel.id, {
|
|
21336
|
-
messageId:
|
|
20982
|
+
messageId: message.id,
|
|
21337
20983
|
params: {}
|
|
21338
20984
|
}, obj);
|
|
21339
|
-
updateMessageOnAllMessages(
|
|
20985
|
+
updateMessageOnAllMessages(message.id, {}, obj);
|
|
21340
20986
|
_context24.n = 4;
|
|
21341
|
-
return effects.put(updateMessageAC(
|
|
20987
|
+
return effects.put(updateMessageAC(message.id, {}, undefined, obj));
|
|
21342
20988
|
case 4:
|
|
21343
20989
|
_context24.n = 6;
|
|
21344
20990
|
break;
|
|
@@ -21347,21 +20993,21 @@ function deletePollVote(action) {
|
|
|
21347
20993
|
_context24.n = 6;
|
|
21348
20994
|
break;
|
|
21349
20995
|
}
|
|
21350
|
-
return _context24.d(_regeneratorValues(updateMessageOptimisticallyForDeletePollVote(channelId,
|
|
20996
|
+
return _context24.d(_regeneratorValues(updateMessageOptimisticallyForDeletePollVote(channelId, message, vote)), 6);
|
|
21351
20997
|
case 6:
|
|
21352
20998
|
if (!conflictCheck.shouldSkip) {
|
|
21353
20999
|
setPendingPollAction(pendingAction);
|
|
21354
21000
|
}
|
|
21355
21001
|
return _context24.a(2);
|
|
21356
21002
|
case 7:
|
|
21357
|
-
return _context24.d(_regeneratorValues(executeDeletePollVote(channelId, pollId, optionId,
|
|
21003
|
+
return _context24.d(_regeneratorValues(executeDeletePollVote(channelId, pollId, optionId, message, isResend)), 8);
|
|
21358
21004
|
case 8:
|
|
21359
21005
|
_context24.n = 10;
|
|
21360
21006
|
break;
|
|
21361
21007
|
case 9:
|
|
21362
21008
|
_context24.p = 9;
|
|
21363
|
-
|
|
21364
|
-
log.error('error in delete poll vote',
|
|
21009
|
+
_t18 = _context24.v;
|
|
21010
|
+
log.error('error in delete poll vote', _t18);
|
|
21365
21011
|
case 10:
|
|
21366
21012
|
return _context24.a(2);
|
|
21367
21013
|
}
|
|
@@ -21439,13 +21085,13 @@ function updateMessageOptimisticallyForClosePoll(channelId, message) {
|
|
|
21439
21085
|
}, _marked24$1);
|
|
21440
21086
|
}
|
|
21441
21087
|
function closePoll(action) {
|
|
21442
|
-
var payload, channelId, pollId,
|
|
21088
|
+
var payload, channelId, pollId, message, sceytChatClient, connectionState, _t19;
|
|
21443
21089
|
return _regenerator().w(function (_context27) {
|
|
21444
21090
|
while (1) switch (_context27.p = _context27.n) {
|
|
21445
21091
|
case 0:
|
|
21446
21092
|
_context27.p = 0;
|
|
21447
21093
|
payload = action.payload;
|
|
21448
|
-
channelId = payload.channelId, pollId = payload.pollId,
|
|
21094
|
+
channelId = payload.channelId, pollId = payload.pollId, message = payload.message;
|
|
21449
21095
|
sceytChatClient = getClient();
|
|
21450
21096
|
if (!sceytChatClient) {
|
|
21451
21097
|
_context27.n = 3;
|
|
@@ -21456,24 +21102,24 @@ function closePoll(action) {
|
|
|
21456
21102
|
_context27.n = 2;
|
|
21457
21103
|
break;
|
|
21458
21104
|
}
|
|
21459
|
-
return _context27.d(_regeneratorValues(updateMessageOptimisticallyForClosePoll(channelId,
|
|
21105
|
+
return _context27.d(_regeneratorValues(updateMessageOptimisticallyForClosePoll(channelId, message)), 1);
|
|
21460
21106
|
case 1:
|
|
21461
21107
|
setPendingPollAction({
|
|
21462
21108
|
type: 'CLOSE_POLL',
|
|
21463
21109
|
channelId: channelId,
|
|
21464
21110
|
pollId: pollId,
|
|
21465
|
-
message:
|
|
21111
|
+
message: message
|
|
21466
21112
|
});
|
|
21467
21113
|
return _context27.a(2);
|
|
21468
21114
|
case 2:
|
|
21469
|
-
return _context27.d(_regeneratorValues(executeClosePoll(channelId, pollId,
|
|
21115
|
+
return _context27.d(_regeneratorValues(executeClosePoll(channelId, pollId, message)), 3);
|
|
21470
21116
|
case 3:
|
|
21471
21117
|
_context27.n = 5;
|
|
21472
21118
|
break;
|
|
21473
21119
|
case 4:
|
|
21474
21120
|
_context27.p = 4;
|
|
21475
|
-
|
|
21476
|
-
log.error('error in close poll',
|
|
21121
|
+
_t19 = _context27.v;
|
|
21122
|
+
log.error('error in close poll', _t19);
|
|
21477
21123
|
case 5:
|
|
21478
21124
|
return _context27.a(2);
|
|
21479
21125
|
}
|
|
@@ -21562,13 +21208,13 @@ function updateMessageOptimisticallyForRetractPollVote(channelId, message, objs)
|
|
|
21562
21208
|
}, _marked27$1);
|
|
21563
21209
|
}
|
|
21564
21210
|
function retractPollVote(action) {
|
|
21565
|
-
var payload, channelId, pollId,
|
|
21211
|
+
var payload, channelId, pollId, message, isResend, sceytChatClient, connectionState, objs, _iterator4, _step4, _message$pollDetails12, _message$pollDetails13, vote, _t20;
|
|
21566
21212
|
return _regenerator().w(function (_context30) {
|
|
21567
21213
|
while (1) switch (_context30.p = _context30.n) {
|
|
21568
21214
|
case 0:
|
|
21569
21215
|
_context30.p = 0;
|
|
21570
21216
|
payload = action.payload;
|
|
21571
|
-
channelId = payload.channelId, pollId = payload.pollId,
|
|
21217
|
+
channelId = payload.channelId, pollId = payload.pollId, message = payload.message, isResend = payload.isResend;
|
|
21572
21218
|
sceytChatClient = getClient();
|
|
21573
21219
|
if (!sceytChatClient) {
|
|
21574
21220
|
_context30.n = 3;
|
|
@@ -21576,7 +21222,7 @@ function retractPollVote(action) {
|
|
|
21576
21222
|
}
|
|
21577
21223
|
connectionState = sceytChatClient.connectionState;
|
|
21578
21224
|
objs = [];
|
|
21579
|
-
for (_iterator4 = _createForOfIteratorHelperLoose(((
|
|
21225
|
+
for (_iterator4 = _createForOfIteratorHelperLoose(((_message$pollDetails12 = message.pollDetails) === null || _message$pollDetails12 === void 0 ? void 0 : (_message$pollDetails13 = _message$pollDetails12.voteDetails) === null || _message$pollDetails13 === void 0 ? void 0 : _message$pollDetails13.ownVotes) || []); !(_step4 = _iterator4()).done;) {
|
|
21580
21226
|
vote = _step4.value;
|
|
21581
21227
|
objs.push({
|
|
21582
21228
|
type: 'deleteOwn',
|
|
@@ -21588,31 +21234,31 @@ function retractPollVote(action) {
|
|
|
21588
21234
|
_context30.n = 2;
|
|
21589
21235
|
break;
|
|
21590
21236
|
}
|
|
21591
|
-
return _context30.d(_regeneratorValues(updateMessageOptimisticallyForRetractPollVote(channelId,
|
|
21237
|
+
return _context30.d(_regeneratorValues(updateMessageOptimisticallyForRetractPollVote(channelId, message, objs)), 1);
|
|
21592
21238
|
case 1:
|
|
21593
21239
|
setPendingPollAction({
|
|
21594
21240
|
type: 'RETRACT_POLL_VOTE',
|
|
21595
21241
|
channelId: channelId,
|
|
21596
21242
|
pollId: pollId,
|
|
21597
|
-
message:
|
|
21243
|
+
message: message
|
|
21598
21244
|
});
|
|
21599
21245
|
return _context30.a(2);
|
|
21600
21246
|
case 2:
|
|
21601
|
-
return _context30.d(_regeneratorValues(executeRetractPollVote(channelId, pollId,
|
|
21247
|
+
return _context30.d(_regeneratorValues(executeRetractPollVote(channelId, pollId, message, objs, isResend)), 3);
|
|
21602
21248
|
case 3:
|
|
21603
21249
|
_context30.n = 5;
|
|
21604
21250
|
break;
|
|
21605
21251
|
case 4:
|
|
21606
21252
|
_context30.p = 4;
|
|
21607
|
-
|
|
21608
|
-
log.error('error in retract poll vote',
|
|
21253
|
+
_t20 = _context30.v;
|
|
21254
|
+
log.error('error in retract poll vote', _t20);
|
|
21609
21255
|
case 5:
|
|
21610
21256
|
return _context30.a(2);
|
|
21611
21257
|
}
|
|
21612
21258
|
}, _marked28$1, null, [[0, 4]]);
|
|
21613
21259
|
}
|
|
21614
21260
|
function resendPendingPollActions(action) {
|
|
21615
|
-
var payload, connectionState, sceytChatClient, pendingPollActionsMap, pendingPollActionsMapCopy,
|
|
21261
|
+
var payload, connectionState, sceytChatClient, pendingPollActionsMap, pendingPollActionsMapCopy, _t21;
|
|
21616
21262
|
return _regenerator().w(function (_context31) {
|
|
21617
21263
|
while (1) switch (_context31.p = _context31.n) {
|
|
21618
21264
|
case 0:
|
|
@@ -21668,15 +21314,15 @@ function resendPendingPollActions(action) {
|
|
|
21668
21314
|
break;
|
|
21669
21315
|
case 3:
|
|
21670
21316
|
_context31.p = 3;
|
|
21671
|
-
|
|
21672
|
-
log.error('error in resend pending poll actions',
|
|
21317
|
+
_t21 = _context31.v;
|
|
21318
|
+
log.error('error in resend pending poll actions', _t21);
|
|
21673
21319
|
case 4:
|
|
21674
21320
|
return _context31.a(2);
|
|
21675
21321
|
}
|
|
21676
21322
|
}, _marked29$1, null, [[0, 3]]);
|
|
21677
21323
|
}
|
|
21678
21324
|
function getPollVotes(action) {
|
|
21679
|
-
var payload, messageId, pollId, optionId, limit, key, SceytChatClient, queryBuilder, pollVotesQuery, result, formattedVotes,
|
|
21325
|
+
var payload, messageId, pollId, optionId, limit, key, SceytChatClient, queryBuilder, pollVotesQuery, result, formattedVotes, _t22;
|
|
21680
21326
|
return _regenerator().w(function (_context32) {
|
|
21681
21327
|
while (1) switch (_context32.p = _context32.n) {
|
|
21682
21328
|
case 0:
|
|
@@ -21742,8 +21388,8 @@ function getPollVotes(action) {
|
|
|
21742
21388
|
break;
|
|
21743
21389
|
case 7:
|
|
21744
21390
|
_context32.p = 7;
|
|
21745
|
-
|
|
21746
|
-
log.error('ERROR in get poll votes',
|
|
21391
|
+
_t22 = _context32.v;
|
|
21392
|
+
log.error('ERROR in get poll votes', _t22);
|
|
21747
21393
|
_context32.n = 8;
|
|
21748
21394
|
return effects.put(setPollVotesLoadingStateAC(action.payload.pollId, action.payload.optionId, LOADING_STATE.LOADED));
|
|
21749
21395
|
case 8:
|
|
@@ -21752,7 +21398,7 @@ function getPollVotes(action) {
|
|
|
21752
21398
|
}, _marked30$1, null, [[0, 7]]);
|
|
21753
21399
|
}
|
|
21754
21400
|
function loadMorePollVotes(action) {
|
|
21755
|
-
var payload, pollId, optionId, limit, key, pollVotesQuery, result, formattedVotes,
|
|
21401
|
+
var payload, pollId, optionId, limit, key, pollVotesQuery, result, formattedVotes, _t23;
|
|
21756
21402
|
return _regenerator().w(function (_context33) {
|
|
21757
21403
|
while (1) switch (_context33.p = _context33.n) {
|
|
21758
21404
|
case 0:
|
|
@@ -21810,8 +21456,8 @@ function loadMorePollVotes(action) {
|
|
|
21810
21456
|
break;
|
|
21811
21457
|
case 6:
|
|
21812
21458
|
_context33.p = 6;
|
|
21813
|
-
|
|
21814
|
-
log.error('ERROR in load more poll votes',
|
|
21459
|
+
_t23 = _context33.v;
|
|
21460
|
+
log.error('ERROR in load more poll votes', _t23);
|
|
21815
21461
|
_context33.n = 7;
|
|
21816
21462
|
return effects.put(setPollVotesLoadingStateAC(action.payload.pollId, action.payload.optionId, LOADING_STATE.LOADED));
|
|
21817
21463
|
case 7:
|
|
@@ -27246,6 +26892,106 @@ var MobileBackButtonWrapper = styled__default.span(_templateObject8$6 || (_templ
|
|
|
27246
26892
|
var DefaultInfoIcon = styled__default(SvgInfo)(_templateObject9$5 || (_templateObject9$5 = _taggedTemplateLiteralLoose([""])));
|
|
27247
26893
|
var WrapArrowLeftIcon = styled__default(SvgArrowLeft)(_templateObject0$4 || (_templateObject0$4 = _taggedTemplateLiteralLoose([""])));
|
|
27248
26894
|
|
|
26895
|
+
var activeChannelMessagesSelector = function activeChannelMessagesSelector(store) {
|
|
26896
|
+
return store.MessageReducer.activeChannelMessages;
|
|
26897
|
+
};
|
|
26898
|
+
var messagesLoadingState = function messagesLoadingState(store) {
|
|
26899
|
+
return store.MessageReducer.messagesLoadingState;
|
|
26900
|
+
};
|
|
26901
|
+
var messagesHasNextSelector = function messagesHasNextSelector(store) {
|
|
26902
|
+
return store.MessageReducer.messagesHasNext;
|
|
26903
|
+
};
|
|
26904
|
+
var messagesHasPrevSelector = function messagesHasPrevSelector(store) {
|
|
26905
|
+
return store.MessageReducer.messagesHasPrev;
|
|
26906
|
+
};
|
|
26907
|
+
var attachmentCompilationStateSelector = function attachmentCompilationStateSelector(store) {
|
|
26908
|
+
return store.MessageReducer.attachmentsUploadingState;
|
|
26909
|
+
};
|
|
26910
|
+
var attachmentsUploadProgressSelector = function attachmentsUploadProgressSelector(store) {
|
|
26911
|
+
return store.MessageReducer.attachmentsUploadingProgress;
|
|
26912
|
+
};
|
|
26913
|
+
var activeTabAttachmentsSelector = function activeTabAttachmentsSelector(store) {
|
|
26914
|
+
return store.MessageReducer.activeTabAttachments;
|
|
26915
|
+
};
|
|
26916
|
+
var activeTabAttachmentsHasNextSelector = function activeTabAttachmentsHasNextSelector(store) {
|
|
26917
|
+
return store.MessageReducer.attachmentHasNext;
|
|
26918
|
+
};
|
|
26919
|
+
var attachmentsForPopupSelector = function attachmentsForPopupSelector(store) {
|
|
26920
|
+
return store.MessageReducer.attachmentsForPopup;
|
|
26921
|
+
};
|
|
26922
|
+
var messageForReplySelector = function messageForReplySelector(store) {
|
|
26923
|
+
return store.MessageReducer.messageForReply;
|
|
26924
|
+
};
|
|
26925
|
+
var messageToEditSelector = function messageToEditSelector(store) {
|
|
26926
|
+
return store.MessageReducer.messageToEdit;
|
|
26927
|
+
};
|
|
26928
|
+
var scrollToNewMessageSelector = function scrollToNewMessageSelector(store) {
|
|
26929
|
+
return store.MessageReducer.scrollToNewMessage;
|
|
26930
|
+
};
|
|
26931
|
+
var scrollToMentionedMessageSelector = function scrollToMentionedMessageSelector(store) {
|
|
26932
|
+
return store.MessageReducer.scrollToMentionedMessage;
|
|
26933
|
+
};
|
|
26934
|
+
var showScrollToNewMessageButtonSelector = function showScrollToNewMessageButtonSelector(store) {
|
|
26935
|
+
return store.MessageReducer.showScrollToNewMessageButton;
|
|
26936
|
+
};
|
|
26937
|
+
var sendMessageInputHeightSelector = function sendMessageInputHeightSelector(store) {
|
|
26938
|
+
return store.MessageReducer.sendMessageInputHeight;
|
|
26939
|
+
};
|
|
26940
|
+
var scrollToMessageSelector = function scrollToMessageSelector(store) {
|
|
26941
|
+
return store.MessageReducer.scrollToMessage;
|
|
26942
|
+
};
|
|
26943
|
+
var scrollToMessageHighlightSelector = function scrollToMessageHighlightSelector(store) {
|
|
26944
|
+
return store.MessageReducer.scrollToMessageHighlight;
|
|
26945
|
+
};
|
|
26946
|
+
var scrollToMessageBehaviorSelector = function scrollToMessageBehaviorSelector(store) {
|
|
26947
|
+
return store.MessageReducer.scrollToMessageBehavior;
|
|
26948
|
+
};
|
|
26949
|
+
var reactionsListSelector = function reactionsListSelector(store) {
|
|
26950
|
+
return store.MessageReducer.reactionsList;
|
|
26951
|
+
};
|
|
26952
|
+
var reactionsHasNextSelector = function reactionsHasNextSelector(store) {
|
|
26953
|
+
return store.MessageReducer.reactionsHasNext;
|
|
26954
|
+
};
|
|
26955
|
+
var reactionsLoadingStateSelector = function reactionsLoadingStateSelector(store) {
|
|
26956
|
+
return store.MessageReducer.reactionsLoadingState;
|
|
26957
|
+
};
|
|
26958
|
+
var openedMessageMenuSelector = function openedMessageMenuSelector(store) {
|
|
26959
|
+
return store.MessageReducer.openedMessageMenu;
|
|
26960
|
+
};
|
|
26961
|
+
var playingAudioIdSelector = function playingAudioIdSelector(store) {
|
|
26962
|
+
return store.MessageReducer.playingAudioId;
|
|
26963
|
+
};
|
|
26964
|
+
var selectedMessagesMapSelector = function selectedMessagesMapSelector(store) {
|
|
26965
|
+
return store.MessageReducer.selectedMessagesMap;
|
|
26966
|
+
};
|
|
26967
|
+
var attachmentUpdatedMapSelector = function attachmentUpdatedMapSelector(store) {
|
|
26968
|
+
return store.MessageReducer.attachmentUpdatedMap;
|
|
26969
|
+
};
|
|
26970
|
+
var messageMarkersSelector = function messageMarkersSelector(store) {
|
|
26971
|
+
return store.MessageReducer.messageMarkers;
|
|
26972
|
+
};
|
|
26973
|
+
var messagesMarkersLoadingStateSelector = function messagesMarkersLoadingStateSelector(store) {
|
|
26974
|
+
return store.MessageReducer.messagesMarkersLoadingState;
|
|
26975
|
+
};
|
|
26976
|
+
var pollVotesListSelector = function pollVotesListSelector(store) {
|
|
26977
|
+
return store.MessageReducer.pollVotesList;
|
|
26978
|
+
};
|
|
26979
|
+
var pollVotesHasMoreSelector = function pollVotesHasMoreSelector(store) {
|
|
26980
|
+
return store.MessageReducer.pollVotesHasMore;
|
|
26981
|
+
};
|
|
26982
|
+
var pollVotesLoadingStateSelector = function pollVotesLoadingStateSelector(store) {
|
|
26983
|
+
return store.MessageReducer.pollVotesLoadingState;
|
|
26984
|
+
};
|
|
26985
|
+
var pendingPollActionsSelector = function pendingPollActionsSelector(store) {
|
|
26986
|
+
return store.MessageReducer.pendingPollActions;
|
|
26987
|
+
};
|
|
26988
|
+
var pendingMessagesMapSelector = function pendingMessagesMapSelector(store) {
|
|
26989
|
+
return store.MessageReducer.pendingMessagesMap;
|
|
26990
|
+
};
|
|
26991
|
+
var unreadScrollToSelector = function unreadScrollToSelector(store) {
|
|
26992
|
+
return store.MessageReducer.unreadScrollTo;
|
|
26993
|
+
};
|
|
26994
|
+
|
|
27249
26995
|
var _path$u;
|
|
27250
26996
|
function _extends$v() {
|
|
27251
26997
|
return _extends$v = Object.assign ? Object.assign.bind() : function (n) {
|
|
@@ -30172,7 +29918,7 @@ var VideoPreview = /*#__PURE__*/React.memo(function VideoPreview(_ref) {
|
|
|
30172
29918
|
var withPrefix = true;
|
|
30173
29919
|
if (file.metadata && file.metadata.tmb) {
|
|
30174
29920
|
if (file.metadata.tmb.length < 70) {
|
|
30175
|
-
attachmentThumb =
|
|
29921
|
+
attachmentThumb = base64ToDataURL(file.metadata.tmb);
|
|
30176
29922
|
withPrefix = false;
|
|
30177
29923
|
} else {
|
|
30178
29924
|
attachmentThumb = file.metadata && file.metadata.tmb;
|
|
@@ -32430,7 +32176,6 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
32430
32176
|
return clearInterval(recordingInterval);
|
|
32431
32177
|
};
|
|
32432
32178
|
}, [recording.initRecording]);
|
|
32433
|
-
console.log('file', file === null || file === void 0 ? void 0 : file.metadata);
|
|
32434
32179
|
React.useEffect(function () {
|
|
32435
32180
|
if (url) {
|
|
32436
32181
|
if (url !== '_' && !isRendered && wavesurfer && wavesurfer.current) {
|
|
@@ -32664,7 +32409,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
32664
32409
|
if (attachment.type !== attachmentTypes.voice && attachment.type !== attachmentTypes.link && attachmentMetadata && attachmentMetadata.tmb) {
|
|
32665
32410
|
try {
|
|
32666
32411
|
if (attachmentMetadata.tmb.length < 70) {
|
|
32667
|
-
attachmentThumb =
|
|
32412
|
+
attachmentThumb = base64ToDataURL(attachmentMetadata.tmb);
|
|
32668
32413
|
withPrefix = false;
|
|
32669
32414
|
} else {
|
|
32670
32415
|
attachmentThumb = attachmentMetadata && attachmentMetadata.tmb;
|
|
@@ -34901,8 +34646,12 @@ var validateUrl = function validateUrl(url) {
|
|
|
34901
34646
|
return false;
|
|
34902
34647
|
}
|
|
34903
34648
|
};
|
|
34649
|
+
var isDescriptionOnlySymbol = function isDescriptionOnlySymbol(description) {
|
|
34650
|
+
var trimmed = description === null || description === void 0 ? void 0 : description.trim();
|
|
34651
|
+
return !!trimmed && !/[a-zA-Z0-9]/.test(trimmed);
|
|
34652
|
+
};
|
|
34904
34653
|
var OGMetadata = function OGMetadata(_ref) {
|
|
34905
|
-
var _metadata$og0, _metadata$og0$image, _metadata$og0$image$, _metadata$og10, _metadata$og10$favico, _metadata$
|
|
34654
|
+
var _metadata$og0, _metadata$og0$image, _metadata$og0$image$, _metadata$og10, _metadata$og10$favico, _metadata$og18, _metadata$og19, _metadata$og20;
|
|
34906
34655
|
var attachments = _ref.attachments,
|
|
34907
34656
|
state = _ref.state,
|
|
34908
34657
|
incoming = _ref.incoming,
|
|
@@ -35146,7 +34895,7 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
35146
34895
|
}
|
|
35147
34896
|
}, [metadataLoaded, oGMetadata, attachment === null || attachment === void 0 ? void 0 : attachment.url, metadata]);
|
|
35148
34897
|
var elements = React.useMemo(function () {
|
|
35149
|
-
var _resolvedOrder$image, _metadata$og11, _metadata$og11$image, _metadata$og11$image$, _resolvedOrder$title, _metadata$og12, _metadata$og13, _metadata$
|
|
34898
|
+
var _resolvedOrder$image, _metadata$og11, _metadata$og11$image, _metadata$og11$image$, _resolvedOrder$title, _metadata$og12, _metadata$og13, _metadata$og14, _metadata$og14$title, _resolvedOrder$descri, _metadata$og15, _metadata$og16, _metadata$og17, _metadata$og17$descri, _resolvedOrder$link;
|
|
35150
34899
|
return [showImage ? {
|
|
35151
34900
|
key: 'image',
|
|
35152
34901
|
order: (_resolvedOrder$image = resolvedOrder === null || resolvedOrder === void 0 ? void 0 : resolvedOrder.image) != null ? _resolvedOrder$image : 1,
|
|
@@ -35165,21 +34914,21 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
35165
34914
|
} : null, {
|
|
35166
34915
|
key: 'title',
|
|
35167
34916
|
order: (_resolvedOrder$title = resolvedOrder === null || resolvedOrder === void 0 ? void 0 : resolvedOrder.title) != null ? _resolvedOrder$title : 2,
|
|
35168
|
-
render: ogShowTitle && (metadata === null || metadata === void 0 ? void 0 : (_metadata$og12 = metadata.og) === null || _metadata$og12 === void 0 ? void 0 : _metadata$og12.title) && (/*#__PURE__*/React__default.createElement(Title$3, {
|
|
34917
|
+
render: ogShowTitle && (metadata === null || metadata === void 0 ? void 0 : (_metadata$og12 = metadata.og) === null || _metadata$og12 === void 0 ? void 0 : _metadata$og12.title) && !isDescriptionOnlySymbol(metadata === null || metadata === void 0 ? void 0 : (_metadata$og13 = metadata.og) === null || _metadata$og13 === void 0 ? void 0 : _metadata$og13.description) && (/*#__PURE__*/React__default.createElement(Title$3, {
|
|
35169
34918
|
maxWidth: maxWidth,
|
|
35170
34919
|
shouldAnimate: shouldAnimate,
|
|
35171
34920
|
padding: infoPadding,
|
|
35172
34921
|
color: textPrimary
|
|
35173
|
-
}, /*#__PURE__*/React__default.createElement("span", null, metadata === null || metadata === void 0 ? void 0 : (_metadata$
|
|
34922
|
+
}, /*#__PURE__*/React__default.createElement("span", null, metadata === null || metadata === void 0 ? void 0 : (_metadata$og14 = metadata.og) === null || _metadata$og14 === void 0 ? void 0 : (_metadata$og14$title = _metadata$og14.title) === null || _metadata$og14$title === void 0 ? void 0 : _metadata$og14$title.trim())))
|
|
35174
34923
|
}, {
|
|
35175
34924
|
key: 'description',
|
|
35176
34925
|
order: (_resolvedOrder$descri = resolvedOrder === null || resolvedOrder === void 0 ? void 0 : resolvedOrder.description) != null ? _resolvedOrder$descri : 3,
|
|
35177
|
-
render: ogShowDescription && (metadata === null || metadata === void 0 ? void 0 : (_metadata$
|
|
34926
|
+
render: ogShowDescription && (metadata === null || metadata === void 0 ? void 0 : (_metadata$og15 = metadata.og) === null || _metadata$og15 === void 0 ? void 0 : _metadata$og15.description) && !isDescriptionOnlySymbol(metadata === null || metadata === void 0 ? void 0 : (_metadata$og16 = metadata.og) === null || _metadata$og16 === void 0 ? void 0 : _metadata$og16.description) && (/*#__PURE__*/React__default.createElement(Desc, {
|
|
35178
34927
|
maxWidth: maxWidth,
|
|
35179
34928
|
shouldAnimate: shouldAnimate,
|
|
35180
34929
|
color: textSecondary,
|
|
35181
34930
|
padding: infoPadding
|
|
35182
|
-
}, metadata === null || metadata === void 0 ? void 0 : (_metadata$
|
|
34931
|
+
}, metadata === null || metadata === void 0 ? void 0 : (_metadata$og17 = metadata.og) === null || _metadata$og17 === void 0 ? void 0 : (_metadata$og17$descri = _metadata$og17.description) === null || _metadata$og17$descri === void 0 ? void 0 : _metadata$og17$descri.trim()))
|
|
35183
34932
|
}, {
|
|
35184
34933
|
key: 'link',
|
|
35185
34934
|
order: (_resolvedOrder$link = resolvedOrder === null || resolvedOrder === void 0 ? void 0 : resolvedOrder.link) != null ? _resolvedOrder$link : 4,
|
|
@@ -35194,7 +34943,7 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
35194
34943
|
var _a$order, _b$order;
|
|
35195
34944
|
return ((_a$order = a.order) != null ? _a$order : 0) - ((_b$order = b.order) != null ? _b$order : 0);
|
|
35196
34945
|
});
|
|
35197
|
-
}, [hasImage, resolvedOrder, showOGMetadata, maxWidth, calculatedImageHeight, maxHeight, metadata === null || metadata === void 0 ? void 0 : (_metadata$
|
|
34946
|
+
}, [hasImage, resolvedOrder, showOGMetadata, maxWidth, calculatedImageHeight, maxHeight, metadata === null || metadata === void 0 ? void 0 : (_metadata$og18 = metadata.og) === null || _metadata$og18 === void 0 ? void 0 : _metadata$og18.image, shouldAnimate, ogShowTitle, metadata === null || metadata === void 0 ? void 0 : (_metadata$og19 = metadata.og) === null || _metadata$og19 === void 0 ? void 0 : _metadata$og19.title, infoPadding, ogShowDescription, metadata === null || metadata === void 0 ? void 0 : (_metadata$og20 = metadata.og) === null || _metadata$og20 === void 0 ? void 0 : _metadata$og20.description, textSecondary, ogShowUrl, ogUrl]);
|
|
35198
34947
|
var textContent = React.useMemo(function () {
|
|
35199
34948
|
return /*#__PURE__*/React__default.createElement(OGText, {
|
|
35200
34949
|
shouldAnimate: shouldAnimate,
|
|
@@ -35293,7 +35042,7 @@ var OGText = styled__default.div(_templateObject3$v || (_templateObject3$v = _ta
|
|
|
35293
35042
|
var margin = _ref10.margin;
|
|
35294
35043
|
return margin ? '12px' : '0';
|
|
35295
35044
|
});
|
|
35296
|
-
var Title$3 = styled__default.p(_templateObject4$q || (_templateObject4$q = _taggedTemplateLiteralLoose(["\n ", "\n
|
|
35045
|
+
var Title$3 = styled__default.p(_templateObject4$q || (_templateObject4$q = _taggedTemplateLiteralLoose(["\n ", "\n font-weight: bold;\n font-size: 14px;\n line-height: 18px;\n letter-spacing: 0px;\n color: ", ";\n margin: 4px 0 0 0;\n padding: ", ";\n box-sizing: border-box;\n ", "\n ", "\n"])), sharedKeyframes, function (_ref11) {
|
|
35297
35046
|
var color = _ref11.color;
|
|
35298
35047
|
return color;
|
|
35299
35048
|
}, function (_ref12) {
|
|
@@ -42052,7 +41801,6 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
42052
41801
|
var updatedAttachments = attachmentsUpdate.filter(function (item) {
|
|
42053
41802
|
return item.tid !== attachmentId;
|
|
42054
41803
|
});
|
|
42055
|
-
deleteVideoThumb(attachmentId);
|
|
42056
41804
|
setAttachments(updatedAttachments);
|
|
42057
41805
|
attachmentsUpdate = updatedAttachments;
|
|
42058
41806
|
} else {
|
|
@@ -45160,7 +44908,40 @@ var RoleBadge = styled__default.span(_templateObject9$m || (_templateObject9$m =
|
|
|
45160
44908
|
return props.backgroundColor;
|
|
45161
44909
|
});
|
|
45162
44910
|
|
|
45163
|
-
var _templateObject$W
|
|
44911
|
+
var _templateObject$W;
|
|
44912
|
+
var MonthHeader = function MonthHeader(_ref) {
|
|
44913
|
+
var currentCreatedAt = _ref.currentCreatedAt,
|
|
44914
|
+
previousCreatedAt = _ref.previousCreatedAt,
|
|
44915
|
+
isFirst = _ref.isFirst,
|
|
44916
|
+
padding = _ref.padding,
|
|
44917
|
+
fullWidth = _ref.fullWidth;
|
|
44918
|
+
var _useColor = useColors(),
|
|
44919
|
+
textSecondary = _useColor[THEME_COLORS.TEXT_SECONDARY];
|
|
44920
|
+
var monthComponent = React.useMemo(function () {
|
|
44921
|
+
var shouldShowHeader = isFirst || previousCreatedAt && new Date(currentCreatedAt).getMonth() !== new Date(previousCreatedAt).getMonth();
|
|
44922
|
+
if (!shouldShowHeader) {
|
|
44923
|
+
return null;
|
|
44924
|
+
}
|
|
44925
|
+
return /*#__PURE__*/React__default.createElement(MonthHeaderContainer, {
|
|
44926
|
+
color: textSecondary,
|
|
44927
|
+
padding: padding,
|
|
44928
|
+
fullWidth: fullWidth
|
|
44929
|
+
}, new Date(currentCreatedAt).toLocaleDateString('en-US', {
|
|
44930
|
+
month: 'long',
|
|
44931
|
+
year: 'numeric'
|
|
44932
|
+
}));
|
|
44933
|
+
}, [currentCreatedAt, previousCreatedAt, isFirst, textSecondary, padding, fullWidth]);
|
|
44934
|
+
return monthComponent;
|
|
44935
|
+
};
|
|
44936
|
+
var MonthHeaderContainer = styled__default.div(_templateObject$W || (_templateObject$W = _taggedTemplateLiteralLoose(["\n padding: ", ";\n width: ", ";\n font-style: normal;\n font-weight: 500;\n font-size: 13px;\n line-height: 16px;\n color: ", ";\n text-transform: uppercase;\n"])), function (props) {
|
|
44937
|
+
return props.padding || '9px 12px';
|
|
44938
|
+
}, function (props) {
|
|
44939
|
+
return props.fullWidth ? '100%' : 'auto';
|
|
44940
|
+
}, function (props) {
|
|
44941
|
+
return props.color;
|
|
44942
|
+
});
|
|
44943
|
+
|
|
44944
|
+
var _templateObject$X, _templateObject2$R;
|
|
45164
44945
|
var Media = function Media(_ref) {
|
|
45165
44946
|
var channel = _ref.channel;
|
|
45166
44947
|
var _useColor = useColors(),
|
|
@@ -45177,10 +44958,16 @@ var Media = function Media(_ref) {
|
|
|
45177
44958
|
dispatch(setAttachmentsAC([]));
|
|
45178
44959
|
dispatch(getAttachmentsAC(channel.id, channelDetailsTabs.media));
|
|
45179
44960
|
}, [channel.id]);
|
|
45180
|
-
return /*#__PURE__*/React__default.createElement(Container$p, null, attachments.map(function (file) {
|
|
45181
|
-
return /*#__PURE__*/React__default.createElement(
|
|
44961
|
+
return /*#__PURE__*/React__default.createElement(Container$p, null, attachments.map(function (file, index) {
|
|
44962
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
45182
44963
|
key: file.id
|
|
45183
|
-
},
|
|
44964
|
+
}, /*#__PURE__*/React__default.createElement(MonthHeader, {
|
|
44965
|
+
currentCreatedAt: file.createdAt,
|
|
44966
|
+
previousCreatedAt: index > 0 ? attachments[index - 1].createdAt : undefined,
|
|
44967
|
+
isFirst: index === 0,
|
|
44968
|
+
padding: '9px 6px',
|
|
44969
|
+
fullWidth: true
|
|
44970
|
+
}), /*#__PURE__*/React__default.createElement(MediaItem, null, file.type === 'image' ? (/*#__PURE__*/React__default.createElement(Attachment$1, {
|
|
45184
44971
|
attachment: _extends({}, file, {
|
|
45185
44972
|
metadata: isJSON(file.metadata) ? JSON.parse(file.metadata) : file.metadata
|
|
45186
44973
|
}),
|
|
@@ -45198,7 +44985,7 @@ var Media = function Media(_ref) {
|
|
|
45198
44985
|
backgroundColor: background,
|
|
45199
44986
|
borderRadius: '8px',
|
|
45200
44987
|
isDetailsView: true
|
|
45201
|
-
})));
|
|
44988
|
+
}))));
|
|
45202
44989
|
}), mediaFile && (/*#__PURE__*/React__default.createElement(SliderPopup, {
|
|
45203
44990
|
channel: channel,
|
|
45204
44991
|
setIsSliderOpen: setMediaFile,
|
|
@@ -45206,7 +44993,7 @@ var Media = function Media(_ref) {
|
|
|
45206
44993
|
currentMediaFile: mediaFile
|
|
45207
44994
|
})));
|
|
45208
44995
|
};
|
|
45209
|
-
var Container$p = styled__default.div(_templateObject$
|
|
44996
|
+
var Container$p = styled__default.div(_templateObject$X || (_templateObject$X = _taggedTemplateLiteralLoose(["\n padding: 6px 4px;\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n transition: all 0.2s;\n align-items: flex-start;\n display: flex;\n flex-wrap: wrap;\n"])));
|
|
45210
44997
|
var MediaItem = styled__default.div(_templateObject2$R || (_templateObject2$R = _taggedTemplateLiteralLoose(["\n width: calc(33.3333% - 4px);\n aspect-ratio: 1/1;\n box-sizing: border-box;\n //border: 1px solid #ccc;\n border: 0.5px solid rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n overflow: hidden;\n margin: 2px;\n"])));
|
|
45211
44998
|
|
|
45212
44999
|
var _rect$3, _path$1u;
|
|
@@ -45219,13 +45006,12 @@ function _extends$1y() {
|
|
|
45219
45006
|
return n;
|
|
45220
45007
|
}, _extends$1y.apply(null, arguments);
|
|
45221
45008
|
}
|
|
45222
|
-
function
|
|
45009
|
+
function SvgDocumentIcon(props) {
|
|
45223
45010
|
return /*#__PURE__*/React.createElement("svg", _extends$1y({
|
|
45224
45011
|
width: 40,
|
|
45225
45012
|
height: 40,
|
|
45226
45013
|
fill: "none",
|
|
45227
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
45228
|
-
color: "#5159f6"
|
|
45014
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
45229
45015
|
}, props), _rect$3 || (_rect$3 = /*#__PURE__*/React.createElement("rect", {
|
|
45230
45016
|
width: 40,
|
|
45231
45017
|
height: 40,
|
|
@@ -45235,7 +45021,7 @@ function SvgFileIcon$1(props) {
|
|
|
45235
45021
|
})), _path$1u || (_path$1u = /*#__PURE__*/React.createElement("path", {
|
|
45236
45022
|
fillRule: "evenodd",
|
|
45237
45023
|
clipRule: "evenodd",
|
|
45238
|
-
d: "
|
|
45024
|
+
d: "M17.593 9.5c-2.098 0-3.023.185-3.962.687a4.685 4.685 0 00-1.944 1.944c-.502.939-.687 1.864-.687 3.962v7.386c0 2.098.185 3.023.687 3.962a4.685 4.685 0 001.944 1.944c.939.502 1.864.686 3.962.686h3.957c2.098 0 3.023-.184 3.962-.687a4.685 4.685 0 001.944-1.944c.502-.938.687-1.863.687-3.961v-5.1c0-.683-.024-.99-.105-1.34a3.094 3.094 0 00-.399-.964c-.19-.305-.39-.54-.874-1.022l-4.175-4.175c-.483-.483-.717-.684-1.022-.874a3.096 3.096 0 00-.963-.4c-.294-.067-.556-.095-1.034-.102V9.5h-1.978zm0 1.714c-2.002 0-2.587.182-3.154.485a2.971 2.971 0 00-1.24 1.24c-.303.567-.485 1.152-.485 3.154v7.386c0 2.001.182 2.587.485 3.153a2.97 2.97 0 001.24 1.24c.567.304 1.152.485 3.154.485h3.957c2.001 0 2.587-.181 3.153-.484a2.97 2.97 0 001.241-1.241c.303-.566.485-1.152.485-3.153v-5.1c0-.118-.001-.22-.003-.308h-4.712a2.143 2.143 0 01-2.143-2.142l.002-4.713-.15-.001h-1.83zm3.785.876l-.092-.091v3.93c0 .21.151.385.351.421l.077.007 3.932.002-.093-.094-4.175-4.175zm-6.092 12.839c0-.474.383-.858.857-.858h3.428a.857.857 0 010 1.715h-3.428a.857.857 0 01-.857-.857zm.857-4.286a.857.857 0 100 1.714h6a.857.857 0 000-1.714h-6z",
|
|
45239
45025
|
fill: "currentColor"
|
|
45240
45026
|
})));
|
|
45241
45027
|
}
|
|
@@ -45263,7 +45049,7 @@ function SvgDownloadFile(props) {
|
|
|
45263
45049
|
})));
|
|
45264
45050
|
}
|
|
45265
45051
|
|
|
45266
|
-
var _templateObject$
|
|
45052
|
+
var _templateObject$Y, _templateObject2$S, _templateObject3$K, _templateObject4$D, _templateObject5$y, _templateObject6$u, _templateObject7$t, _templateObject8$q;
|
|
45267
45053
|
var Files = function Files(_ref) {
|
|
45268
45054
|
var channelId = _ref.channelId,
|
|
45269
45055
|
filePreviewIcon = _ref.filePreviewIcon,
|
|
@@ -45318,20 +45104,26 @@ var Files = function Files(_ref) {
|
|
|
45318
45104
|
React.useEffect(function () {
|
|
45319
45105
|
dispatch(getAttachmentsAC(channelId, channelDetailsTabs.file));
|
|
45320
45106
|
}, [channelId]);
|
|
45321
|
-
return /*#__PURE__*/React__default.createElement(Container$q, null, attachments.map(function (file) {
|
|
45107
|
+
return /*#__PURE__*/React__default.createElement(Container$q, null, attachments.map(function (file, index) {
|
|
45322
45108
|
var metas = file.metadata && isJSON(file.metadata) ? JSON.parse(file.metadata) : file.metadata;
|
|
45323
45109
|
var withPrefix = true;
|
|
45324
45110
|
var attachmentThumb = '';
|
|
45325
45111
|
if (metas && metas.tmb) {
|
|
45326
45112
|
if (metas.tmb.length < 70) {
|
|
45327
|
-
attachmentThumb =
|
|
45113
|
+
attachmentThumb = base64ToDataURL(metas.tmb);
|
|
45328
45114
|
withPrefix = false;
|
|
45329
45115
|
} else {
|
|
45330
45116
|
attachmentThumb = metas.tmb;
|
|
45331
45117
|
}
|
|
45332
45118
|
}
|
|
45333
|
-
return /*#__PURE__*/React__default.createElement(
|
|
45334
|
-
key: file.id
|
|
45119
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
45120
|
+
key: file.id
|
|
45121
|
+
}, /*#__PURE__*/React__default.createElement(MonthHeader, {
|
|
45122
|
+
currentCreatedAt: file.createdAt,
|
|
45123
|
+
previousCreatedAt: index > 0 ? attachments[index - 1].createdAt : undefined,
|
|
45124
|
+
isFirst: index === 0,
|
|
45125
|
+
padding: '14px 14px 0'
|
|
45126
|
+
}), /*#__PURE__*/React__default.createElement(FileItem, {
|
|
45335
45127
|
hoverBackgroundColor: filePreviewHoverBackgroundColor || backgroundHovered
|
|
45336
45128
|
}, metas && metas.tmb ? (/*#__PURE__*/React__default.createElement(FileThumb, {
|
|
45337
45129
|
draggable: false,
|
|
@@ -45339,10 +45131,10 @@ var Files = function Files(_ref) {
|
|
|
45339
45131
|
})) : (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(FileIconCont, {
|
|
45340
45132
|
iconColor: accentColor,
|
|
45341
45133
|
fillColor: surface1
|
|
45342
|
-
}, filePreviewIcon || /*#__PURE__*/React__default.createElement(
|
|
45134
|
+
}, filePreviewIcon || /*#__PURE__*/React__default.createElement(SvgDocumentIcon, null)), /*#__PURE__*/React__default.createElement(FileHoverIconCont, {
|
|
45343
45135
|
iconColor: accentColor,
|
|
45344
45136
|
fillColor: surface1
|
|
45345
|
-
}, filePreviewHoverIcon || /*#__PURE__*/React__default.createElement(
|
|
45137
|
+
}, filePreviewHoverIcon || /*#__PURE__*/React__default.createElement(SvgDocumentIcon, null)))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(AttachmentPreviewTitle, {
|
|
45346
45138
|
fontSize: fileNameFontSize,
|
|
45347
45139
|
lineHeight: fileNameLineHeight,
|
|
45348
45140
|
color: filePreviewTitleColor || textPrimary
|
|
@@ -45376,10 +45168,10 @@ var Files = function Files(_ref) {
|
|
|
45376
45168
|
transformOrigin: 'center center'
|
|
45377
45169
|
}
|
|
45378
45170
|
}
|
|
45379
|
-
}))) : filePreviewDownloadIcon || /*#__PURE__*/React__default.createElement(SvgDownloadFile, null)));
|
|
45171
|
+
}))) : filePreviewDownloadIcon || /*#__PURE__*/React__default.createElement(SvgDownloadFile, null))));
|
|
45380
45172
|
}));
|
|
45381
45173
|
};
|
|
45382
|
-
var Container$q = styled__default.ul(_templateObject$
|
|
45174
|
+
var Container$q = styled__default.ul(_templateObject$Y || (_templateObject$Y = _taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n transition: all 0.2s;\n"])));
|
|
45383
45175
|
var DownloadWrapper = styled__default.a(_templateObject2$S || (_templateObject2$S = _taggedTemplateLiteralLoose(["\n text-decoration: none;\n visibility: ", ";\n padding: 5px 6px;\n position: absolute;\n top: 25%;\n right: 16px;\n cursor: pointer;\n & > svg {\n & path {\n fill: ", ";\n }\n color: ", ";\n }\n"])), function (props) {
|
|
45384
45176
|
return props.visible ? 'visible' : 'hidden';
|
|
45385
45177
|
}, function (props) {
|
|
@@ -45388,12 +45180,12 @@ var DownloadWrapper = styled__default.a(_templateObject2$S || (_templateObject2$
|
|
|
45388
45180
|
return props.iconColor;
|
|
45389
45181
|
});
|
|
45390
45182
|
var ProgressWrapper$2 = styled__default.span(_templateObject3$K || (_templateObject3$K = _taggedTemplateLiteralLoose(["\n display: inline-block;\n width: 20px;\n height: 20px;\n animation: preloader 1.5s linear infinite;\n\n @keyframes preloader {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"])));
|
|
45391
|
-
var FileIconCont = styled__default.span(_templateObject4$D || (_templateObject4$D = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n
|
|
45183
|
+
var FileIconCont = styled__default.span(_templateObject4$D || (_templateObject4$D = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n & > svg {\n width: 40px;\n height: 40px;\n color: ", ";\n rect {\n fill: ", ";\n }\n }\n"])), function (props) {
|
|
45392
45184
|
return props.iconColor;
|
|
45393
45185
|
}, function (props) {
|
|
45394
45186
|
return props.fillColor;
|
|
45395
45187
|
});
|
|
45396
|
-
var FileHoverIconCont = styled__default.span(_templateObject5$y || (_templateObject5$y = _taggedTemplateLiteralLoose(["\n display: none;\n & > svg {\n
|
|
45188
|
+
var FileHoverIconCont = styled__default.span(_templateObject5$y || (_templateObject5$y = _taggedTemplateLiteralLoose(["\n display: none;\n & > svg {\n width: 40px;\n height: 40px;\n color: ", ";\n rect {\n fill: ", ";\n }\n }\n"])), function (props) {
|
|
45397
45189
|
return props.iconColor;
|
|
45398
45190
|
}, function (props) {
|
|
45399
45191
|
return props.fillColor;
|
|
@@ -45441,7 +45233,7 @@ function SvgLinkIcon(props) {
|
|
|
45441
45233
|
})));
|
|
45442
45234
|
}
|
|
45443
45235
|
|
|
45444
|
-
var _templateObject$
|
|
45236
|
+
var _templateObject$Z, _templateObject2$T, _templateObject3$L, _templateObject4$E, _templateObject5$z;
|
|
45445
45237
|
var LinkItem = function LinkItem(_ref) {
|
|
45446
45238
|
var link = _ref.link,
|
|
45447
45239
|
linkPreviewIcon = _ref.linkPreviewIcon,
|
|
@@ -45472,12 +45264,12 @@ var LinkItem = function LinkItem(_ref) {
|
|
|
45472
45264
|
color: linkPreviewColor || textPrimary
|
|
45473
45265
|
}, link))));
|
|
45474
45266
|
};
|
|
45475
|
-
var LinkIconCont = styled__default.span(_templateObject$
|
|
45267
|
+
var LinkIconCont = styled__default.span(_templateObject$Z || (_templateObject$Z = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n > svg {\n color: ", ";\n rect {\n fill: ", ";\n }\n }\n"])), function (props) {
|
|
45476
45268
|
return props.iconColor;
|
|
45477
45269
|
}, function (props) {
|
|
45478
45270
|
return props.fillColor;
|
|
45479
45271
|
});
|
|
45480
|
-
var LinkHoverIconCont = styled__default.span(_templateObject2$T || (_templateObject2$T = _taggedTemplateLiteralLoose(["\n display: none;\n > svg {\n color: ", ";\n fill: ", ";\n }\n"])), function (props) {
|
|
45272
|
+
var LinkHoverIconCont = styled__default.span(_templateObject2$T || (_templateObject2$T = _taggedTemplateLiteralLoose(["\n display: none;\n > svg {\n color: ", ";\n rect {\n fill: ", ";\n }\n }\n"])), function (props) {
|
|
45481
45273
|
return props.iconColor;
|
|
45482
45274
|
}, function (props) {
|
|
45483
45275
|
return props.fillColor;
|
|
@@ -45490,7 +45282,7 @@ var LinkUrl = styled__default.span(_templateObject5$z || (_templateObject5$z = _
|
|
|
45490
45282
|
return props.color;
|
|
45491
45283
|
});
|
|
45492
45284
|
|
|
45493
|
-
var _templateObject$
|
|
45285
|
+
var _templateObject$_;
|
|
45494
45286
|
var Links = function Links(_ref) {
|
|
45495
45287
|
var channelId = _ref.channelId,
|
|
45496
45288
|
linkPreviewIcon = _ref.linkPreviewIcon,
|
|
@@ -45503,19 +45295,25 @@ var Links = function Links(_ref) {
|
|
|
45503
45295
|
React.useEffect(function () {
|
|
45504
45296
|
dispatch(getAttachmentsAC(channelId, channelDetailsTabs.link));
|
|
45505
45297
|
}, [channelId]);
|
|
45506
|
-
return /*#__PURE__*/React__default.createElement(Container$r, null, attachments.map(function (file) {
|
|
45507
|
-
return /*#__PURE__*/React__default.createElement(
|
|
45508
|
-
key: file.id
|
|
45298
|
+
return /*#__PURE__*/React__default.createElement(Container$r, null, attachments.map(function (file, index) {
|
|
45299
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
45300
|
+
key: file.id
|
|
45301
|
+
}, /*#__PURE__*/React__default.createElement(MonthHeader, {
|
|
45302
|
+
currentCreatedAt: file.createdAt,
|
|
45303
|
+
previousCreatedAt: index > 0 ? attachments[index - 1].createdAt : undefined,
|
|
45304
|
+
isFirst: index === 0,
|
|
45305
|
+
padding: '6px 14px 0'
|
|
45306
|
+
}), /*#__PURE__*/React__default.createElement(LinkItem, {
|
|
45509
45307
|
link: file.url,
|
|
45510
45308
|
linkPreviewColor: linkPreviewColor,
|
|
45511
45309
|
linkPreviewHoverBackgroundColor: linkPreviewHoverBackgroundColor,
|
|
45512
45310
|
linkPreviewHoverIcon: linkPreviewHoverIcon,
|
|
45513
45311
|
linkPreviewTitleColor: linkPreviewTitleColor,
|
|
45514
45312
|
linkPreviewIcon: linkPreviewIcon
|
|
45515
|
-
});
|
|
45313
|
+
}));
|
|
45516
45314
|
}));
|
|
45517
45315
|
};
|
|
45518
|
-
var Container$r = styled__default.ul(_templateObject$
|
|
45316
|
+
var Container$r = styled__default.ul(_templateObject$_ || (_templateObject$_ = _taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 11px 0 0;\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n transition: all 0.2s;\n"])));
|
|
45519
45317
|
|
|
45520
45318
|
var _rect$5, _path$1x;
|
|
45521
45319
|
function _extends$1B() {
|
|
@@ -45571,7 +45369,7 @@ function SvgVoicePreviewPause(props) {
|
|
|
45571
45369
|
})));
|
|
45572
45370
|
}
|
|
45573
45371
|
|
|
45574
|
-
var _templateObject
|
|
45372
|
+
var _templateObject$$, _templateObject2$U, _templateObject3$M, _templateObject4$F, _templateObject5$A, _templateObject6$v, _templateObject7$u, _templateObject8$r;
|
|
45575
45373
|
var VoiceItem = function VoiceItem(_ref) {
|
|
45576
45374
|
var file = _ref.file,
|
|
45577
45375
|
voicePreviewPlayIcon = _ref.voicePreviewPlayIcon,
|
|
@@ -45696,7 +45494,7 @@ var VoiceItem = function VoiceItem(_ref) {
|
|
|
45696
45494
|
type: 'audio/mpeg'
|
|
45697
45495
|
})));
|
|
45698
45496
|
};
|
|
45699
|
-
var FileIconCont$1 = styled__default.span(_templateObject
|
|
45497
|
+
var FileIconCont$1 = styled__default.span(_templateObject$$ || (_templateObject$$ = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n display: inline-flex;\n fill: ", ";\n rect {\n fill: ", ";\n }\n"])), function (props) {
|
|
45700
45498
|
return props.fill || 'transparent';
|
|
45701
45499
|
}, function (props) {
|
|
45702
45500
|
return props.fill || 'transparent';
|
|
@@ -45721,7 +45519,7 @@ var AudioSendTime = styled__default.span(_templateObject7$u || (_templateObject7
|
|
|
45721
45519
|
});
|
|
45722
45520
|
var Audio = styled__default.audio(_templateObject8$r || (_templateObject8$r = _taggedTemplateLiteralLoose(["\n display: none;\n"])));
|
|
45723
45521
|
|
|
45724
|
-
var _templateObject
|
|
45522
|
+
var _templateObject$10;
|
|
45725
45523
|
var Voices = function Voices(_ref) {
|
|
45726
45524
|
var channelId = _ref.channelId,
|
|
45727
45525
|
voicePreviewPlayIcon = _ref.voicePreviewPlayIcon,
|
|
@@ -45736,9 +45534,15 @@ var Voices = function Voices(_ref) {
|
|
|
45736
45534
|
React.useEffect(function () {
|
|
45737
45535
|
dispatch(getAttachmentsAC(channelId, channelDetailsTabs.voice));
|
|
45738
45536
|
}, [channelId]);
|
|
45739
|
-
return /*#__PURE__*/React__default.createElement(Container$s, null, attachments.map(function (file) {
|
|
45740
|
-
return /*#__PURE__*/React__default.createElement(
|
|
45741
|
-
key: file.id
|
|
45537
|
+
return /*#__PURE__*/React__default.createElement(Container$s, null, attachments.map(function (file, index) {
|
|
45538
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
45539
|
+
key: file.id
|
|
45540
|
+
}, /*#__PURE__*/React__default.createElement(MonthHeader, {
|
|
45541
|
+
currentCreatedAt: file.createdAt,
|
|
45542
|
+
previousCreatedAt: index > 0 ? attachments[index - 1].createdAt : undefined,
|
|
45543
|
+
isFirst: index === 0,
|
|
45544
|
+
padding: '7px 14px 2px'
|
|
45545
|
+
}), /*#__PURE__*/React__default.createElement(VoiceItem, {
|
|
45742
45546
|
file: _extends({}, file, {
|
|
45743
45547
|
metadata: isJSON(file.metadata) ? JSON.parse(file.metadata) : file.metadata
|
|
45744
45548
|
}),
|
|
@@ -45749,12 +45553,12 @@ var Voices = function Voices(_ref) {
|
|
|
45749
45553
|
voicePreviewPauseIcon: voicePreviewPauseIcon,
|
|
45750
45554
|
voicePreviewPauseHoverIcon: voicePreviewPauseHoverIcon,
|
|
45751
45555
|
voicePreviewTitleColor: voicePreviewTitleColor
|
|
45752
|
-
});
|
|
45556
|
+
}));
|
|
45753
45557
|
}));
|
|
45754
45558
|
};
|
|
45755
|
-
var Container$s = styled__default.ul(_templateObject
|
|
45559
|
+
var Container$s = styled__default.ul(_templateObject$10 || (_templateObject$10 = _taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 11px 0 0;\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n transition: all 0.2s;\n"])));
|
|
45756
45560
|
|
|
45757
|
-
var _templateObject$
|
|
45561
|
+
var _templateObject$11, _templateObject2$V;
|
|
45758
45562
|
var DetailsTab = function DetailsTab(_ref) {
|
|
45759
45563
|
var channel = _ref.channel,
|
|
45760
45564
|
theme = _ref.theme,
|
|
@@ -45905,7 +45709,7 @@ var DetailsTab = function DetailsTab(_ref) {
|
|
|
45905
45709
|
voicePreviewHoverBackgroundColor: voicePreviewHoverBackgroundColor
|
|
45906
45710
|
})));
|
|
45907
45711
|
};
|
|
45908
|
-
var Container$t = styled__default.div(_templateObject$
|
|
45712
|
+
var Container$t = styled__default.div(_templateObject$11 || (_templateObject$11 = _taggedTemplateLiteralLoose(["\n min-height: calc(100vh - 64px);\n"])));
|
|
45909
45713
|
var DetailsTabHeader = styled__default.div(_templateObject2$V || (_templateObject2$V = _taggedTemplateLiteralLoose(["\n overflow-x: auto;\n overflow-y: hidden;\n border-bottom: 1px solid ", ";\n background-color: ", ";\n display: flex;\n justify-content: space-between;\n position: sticky;\n top: 0;\n z-index: 12;\n /* width */\n &::-webkit-scrollbar {\n width: 0;\n height: 0;\n }\n\n /* Track */\n &::-webkit-scrollbar-track {\n background: transparent;\n }\n\n /* Handle */\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n /* Handle on hover */\n &::-webkit-scrollbar-thumb:hover {\n background: transparent;\n }\n button {\n position: relative;\n border: none;\n background: transparent;\n outline: none;\n height: 44px;\n text-transform: capitalize;\n font-style: normal;\n font-weight: 500;\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n min-width: ", ";\n cursor: pointer;\n }\n\n & span {\n position: relative;\n display: inline-flex;\n align-items: center;\n height: 100%;\n }\n\n & .active span {\n color: ", ";\n\n &:after {\n content: '';\n width: 100%;\n border-radius: 2px;\n height: 2px;\n background-color: ", ";\n position: absolute;\n top: calc(100% - 1px);\n left: 0;\n }\n }\n"])), function (props) {
|
|
45910
45714
|
return props.borderColor;
|
|
45911
45715
|
}, function (props) {
|
|
@@ -45924,8 +45728,8 @@ var DetailsTabHeader = styled__default.div(_templateObject2$V || (_templateObjec
|
|
|
45924
45728
|
return props.activeTabColor;
|
|
45925
45729
|
});
|
|
45926
45730
|
|
|
45927
|
-
var _templateObject$
|
|
45928
|
-
var Container$u = styled__default.div(_templateObject$
|
|
45731
|
+
var _templateObject$12, _templateObject2$W, _templateObject3$N, _templateObject4$G;
|
|
45732
|
+
var Container$u = styled__default.div(_templateObject$12 || (_templateObject$12 = _taggedTemplateLiteralLoose(["\n ", ";\n height: ", ";\n position: absolute;\n padding: 24px 16px;\n background-color: ", ";\n z-index: 25;\n"])), function (props) {
|
|
45929
45733
|
return props.active ? 'display: block' : 'display: none';
|
|
45930
45734
|
}, function (props) {
|
|
45931
45735
|
return "calc(100vh - " + (props.heightOffset ? props.heightOffset + 48 : 48) + "px)";
|
|
@@ -46189,7 +45993,7 @@ var EditChannel = function EditChannel(_ref) {
|
|
|
46189
45993
|
})));
|
|
46190
45994
|
};
|
|
46191
45995
|
|
|
46192
|
-
var _templateObject$
|
|
45996
|
+
var _templateObject$13, _templateObject2$X, _templateObject3$O, _templateObject4$H, _templateObject5$B, _templateObject6$w, _templateObject7$v, _templateObject8$s, _templateObject9$n, _templateObject0$k, _templateObject1$h, _templateObject10$b, _templateObject11$9;
|
|
46193
45997
|
var Details = function Details(_ref) {
|
|
46194
45998
|
var _activeChannel$member;
|
|
46195
45999
|
var detailsTitleText = _ref.detailsTitleText,
|
|
@@ -46619,7 +46423,7 @@ var Details = function Details(_ref) {
|
|
|
46619
46423
|
QRCodeIcon: QRCodeIcon
|
|
46620
46424
|
}))));
|
|
46621
46425
|
};
|
|
46622
|
-
var Container$v = styled__default.div(_templateObject$
|
|
46426
|
+
var Container$v = styled__default.div(_templateObject$13 || (_templateObject$13 = _taggedTemplateLiteralLoose(["\n flex: 0 0 auto;\n width: 0;\n border-left: 1px solid ", ";\n //transition: all 0.1s;\n ", "\n background-color: ", ";\n}\n"])), function (props) {
|
|
46623
46427
|
return props.borderColor;
|
|
46624
46428
|
}, function (props) {
|
|
46625
46429
|
return props.mounted && " width: " + (props.size === 'small' ? '300px' : props.size === 'medium' ? '350px' : '400px') + ";";
|
|
@@ -46669,7 +46473,7 @@ var ChannelNameWrapper = styled__default.div(_templateObject1$h || (_templateObj
|
|
|
46669
46473
|
var EditButton = styled__default.span(_templateObject10$b || (_templateObject10$b = _taggedTemplateLiteralLoose(["\n margin-left: 6px;\n cursor: pointer;\n color: #b2b6be;\n"])));
|
|
46670
46474
|
var PhoneNumberContainer = styled__default.span(_templateObject11$9 || (_templateObject11$9 = _taggedTemplateLiteralLoose(["\n position: relative;\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n user-select: text;\n"])));
|
|
46671
46475
|
|
|
46672
|
-
var _templateObject$
|
|
46476
|
+
var _templateObject$14;
|
|
46673
46477
|
var ChannelDetailsContainer = function ChannelDetailsContainer(_ref) {
|
|
46674
46478
|
var _ref$size = _ref.size,
|
|
46675
46479
|
size = _ref$size === void 0 ? 'large' : _ref$size,
|
|
@@ -46900,7 +46704,7 @@ var ChannelDetailsContainer = function ChannelDetailsContainer(_ref) {
|
|
|
46900
46704
|
QRCodeIcon: QRCodeIcon
|
|
46901
46705
|
})));
|
|
46902
46706
|
};
|
|
46903
|
-
var DetailsWrapper = styled__default.div(_templateObject$
|
|
46707
|
+
var DetailsWrapper = styled__default.div(_templateObject$14 || (_templateObject$14 = _taggedTemplateLiteralLoose(["\n user-select: text;\n"])));
|
|
46904
46708
|
|
|
46905
46709
|
var _path$1z;
|
|
46906
46710
|
function _extends$1D() {
|
|
@@ -46924,7 +46728,7 @@ function SvgChevronDown(props) {
|
|
|
46924
46728
|
})));
|
|
46925
46729
|
}
|
|
46926
46730
|
|
|
46927
|
-
var _templateObject$
|
|
46731
|
+
var _templateObject$15, _templateObject2$Y;
|
|
46928
46732
|
var MessagesScrollToBottomButton = function MessagesScrollToBottomButton(_ref) {
|
|
46929
46733
|
var buttonIcon = _ref.buttonIcon,
|
|
46930
46734
|
buttonWidth = _ref.buttonWidth,
|
|
@@ -47007,7 +46811,7 @@ var MessagesScrollToBottomButton = function MessagesScrollToBottomButton(_ref) {
|
|
|
47007
46811
|
isMuted: channel.muted
|
|
47008
46812
|
}, channel.newMessageCount ? channel.newMessageCount > 99 ? '99+' : channel.newMessageCount : '')), buttonIcon || /*#__PURE__*/React__default.createElement(SvgChevronDown, null)));
|
|
47009
46813
|
};
|
|
47010
|
-
var BottomButton = styled__default.div(_templateObject$
|
|
46814
|
+
var BottomButton = styled__default.div(_templateObject$15 || (_templateObject$15 = _taggedTemplateLiteralLoose(["\n transition: all 0.3s ease-in-out;\n position: absolute;\n ", ";\n\n ", ";\n\n ", ";\n right: ", "px;\n\n margin-right: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n border: 0.5px solid rgba(0, 0, 0, 0.1);\n border-radius: 50px;\n width: 48px;\n height: 48px;\n cursor: pointer;\n z-index: 14;\n & > svg {\n color: rgba(129, 140, 153, 1);\n }\n\n & > span {\n bottom: 32px;\n right: 0;\n }\n"])), function (props) {
|
|
47011
46815
|
return props.animateFrom === 'bottom' && "bottom: " + (props.bottomOffset + (props.bottomPosition === undefined ? 45 : props.bottomPosition) - 130) + "px";
|
|
47012
46816
|
}, function (props) {
|
|
47013
46817
|
return props.animateFrom === 'right' && "right: " + (props.rightPosition === undefined ? 16 : props.rightPosition - 100) + "px";
|
|
@@ -47061,7 +46865,7 @@ function SvgMention(props) {
|
|
|
47061
46865
|
})));
|
|
47062
46866
|
}
|
|
47063
46867
|
|
|
47064
|
-
var _templateObject$
|
|
46868
|
+
var _templateObject$16, _templateObject2$Z;
|
|
47065
46869
|
var MessagesScrollToUnreadMentionsButton = function MessagesScrollToUnreadMentionsButton(_ref) {
|
|
47066
46870
|
var buttonIcon = _ref.buttonIcon,
|
|
47067
46871
|
buttonWidth = _ref.buttonWidth,
|
|
@@ -47204,7 +47008,7 @@ var MessagesScrollToUnreadMentionsButton = function MessagesScrollToUnreadMentio
|
|
|
47204
47008
|
isMuted: channel.muted
|
|
47205
47009
|
}, channel.newMentionCount ? channel.newMentionCount > 99 ? '99+' : channel.newMentionCount : '')), buttonIcon || /*#__PURE__*/React__default.createElement(SvgMention, null)));
|
|
47206
47010
|
};
|
|
47207
|
-
var BottomButton$1 = styled__default.div(_templateObject$
|
|
47011
|
+
var BottomButton$1 = styled__default.div(_templateObject$16 || (_templateObject$16 = _taggedTemplateLiteralLoose(["\n transition: all 0.3s ease-in-out;\n position: absolute;\n ", ";\n\n ", ";\n\n ", ";\n right: ", ";\n margin-right: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n border: 0.5px solid rgba(0, 0, 0, 0.1);\n border-radius: 50px;\n width: 48px;\n height: 48px;\n cursor: pointer;\n z-index: 14;\n\n & > svg {\n color: rgba(129, 140, 153, 1);\n }\n\n & > span {\n bottom: 32px;\n right: 0;\n }\n"])), function (props) {
|
|
47208
47012
|
return props.animateFrom === 'bottom' && "bottom: " + (props.bottomOffset + (props.bottomPosition === undefined ? 45 : props.bottomPosition) + (props.showsUnreadMentionsButton ? 60 : 0) - 180) + "px";
|
|
47209
47013
|
}, function (props) {
|
|
47210
47014
|
return props.animateFrom === 'right' && "right: " + (props.rightPosition === undefined ? 16 : props.rightPosition - 100) + "px";
|