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