sceyt-chat-react-uikit 1.7.6-beta.1 → 1.7.6-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ChatContainer/index.d.ts +2 -1
- package/components/Message/OGMetadata/index.d.ts +2 -2
- package/components/SceytChat/index.d.ts +1 -1
- package/index.js +1004 -820
- package/index.modern.js +1004 -820
- package/package.json +1 -1
package/index.modern.js
CHANGED
|
@@ -8955,7 +8955,7 @@ var EditorTheme = {
|
|
|
8955
8955
|
}
|
|
8956
8956
|
};
|
|
8957
8957
|
var isMessageUnsupported = function isMessageUnsupported(message) {
|
|
8958
|
-
return (message === null || message === void 0 ? void 0 : message.type) !== MESSAGE_TYPE.TEXT && (message === null || message === void 0 ? void 0 : message.type) !== MESSAGE_TYPE.MEDIA && (message === null || message === void 0 ? void 0 : message.type) !== MESSAGE_TYPE.FILE && (message === null || message === void 0 ? void 0 : message.type) !== MESSAGE_TYPE.LINK && (message === null || message === void 0 ? void 0 : message.type) !== MESSAGE_TYPE.POLL && (message === null || message === void 0 ? void 0 : message.type)
|
|
8958
|
+
return (message === null || message === void 0 ? void 0 : message.type) !== MESSAGE_TYPE.TEXT && (message === null || message === void 0 ? void 0 : message.type) !== MESSAGE_TYPE.MEDIA && (message === null || message === void 0 ? void 0 : message.type) !== MESSAGE_TYPE.FILE && (message === null || message === void 0 ? void 0 : message.type) !== MESSAGE_TYPE.LINK && (message === null || message === void 0 ? void 0 : message.type) !== MESSAGE_TYPE.POLL && !((message === null || message === void 0 ? void 0 : message.type) === MESSAGE_TYPE.DELETED && message.state === MESSAGE_STATUS.DELETE) && (message === null || message === void 0 ? void 0 : message.type) !== MESSAGE_TYPE.SYSTEM;
|
|
8959
8959
|
};
|
|
8960
8960
|
var deleteVoteFromPollDetails = function deleteVoteFromPollDetails(votes, deletedVote) {
|
|
8961
8961
|
var newVotes = [];
|
|
@@ -9101,15 +9101,6 @@ var query = {
|
|
|
9101
9101
|
ReactionsQuery: null,
|
|
9102
9102
|
PollVotesQueries: {}
|
|
9103
9103
|
};
|
|
9104
|
-
var unreadScrollTo = {
|
|
9105
|
-
isScrolled: true
|
|
9106
|
-
};
|
|
9107
|
-
function getUnreadScrollTo() {
|
|
9108
|
-
return unreadScrollTo.isScrolled;
|
|
9109
|
-
}
|
|
9110
|
-
function setUnreadScrollTo(state) {
|
|
9111
|
-
unreadScrollTo.isScrolled = state;
|
|
9112
|
-
}
|
|
9113
9104
|
function getUploadImageIcon() {
|
|
9114
9105
|
return UploadImageIcon;
|
|
9115
9106
|
}
|
|
@@ -10314,6 +10305,11 @@ function showScrollToNewMessageButtonAC(state) {
|
|
|
10314
10305
|
state: state
|
|
10315
10306
|
});
|
|
10316
10307
|
}
|
|
10308
|
+
function setUnreadScrollToAC(state) {
|
|
10309
|
+
return setUnreadScrollTo({
|
|
10310
|
+
state: state
|
|
10311
|
+
});
|
|
10312
|
+
}
|
|
10317
10313
|
function loadMoreMessagesAC(channelId, limit, direction, messageId, hasNext) {
|
|
10318
10314
|
return {
|
|
10319
10315
|
type: LOAD_MORE_MESSAGES,
|
|
@@ -10646,6 +10642,51 @@ var MESSAGE_LOAD_DIRECTION = {
|
|
|
10646
10642
|
PREV: 'prev',
|
|
10647
10643
|
NEXT: 'next'
|
|
10648
10644
|
};
|
|
10645
|
+
var shouldSkipDeliveryStatusUpdate = function shouldSkipDeliveryStatusUpdate(markerName, currentDeliveryStatus) {
|
|
10646
|
+
if (markerName === MESSAGE_DELIVERY_STATUS.SENT && (currentDeliveryStatus === MESSAGE_DELIVERY_STATUS.SENT || currentDeliveryStatus === MESSAGE_DELIVERY_STATUS.DELIVERED || currentDeliveryStatus === MESSAGE_DELIVERY_STATUS.READ || currentDeliveryStatus === MESSAGE_DELIVERY_STATUS.PLAYED)) {
|
|
10647
|
+
return true;
|
|
10648
|
+
}
|
|
10649
|
+
if (markerName === MESSAGE_DELIVERY_STATUS.DELIVERED && (currentDeliveryStatus === MESSAGE_DELIVERY_STATUS.DELIVERED || currentDeliveryStatus === MESSAGE_DELIVERY_STATUS.READ || currentDeliveryStatus === MESSAGE_DELIVERY_STATUS.PLAYED)) {
|
|
10650
|
+
return true;
|
|
10651
|
+
}
|
|
10652
|
+
if (markerName === MESSAGE_DELIVERY_STATUS.READ && (currentDeliveryStatus === MESSAGE_DELIVERY_STATUS.READ || currentDeliveryStatus === MESSAGE_DELIVERY_STATUS.PLAYED)) {
|
|
10653
|
+
return true;
|
|
10654
|
+
}
|
|
10655
|
+
if (markerName === MESSAGE_DELIVERY_STATUS.PLAYED && currentDeliveryStatus === MESSAGE_DELIVERY_STATUS.PLAYED) {
|
|
10656
|
+
return true;
|
|
10657
|
+
}
|
|
10658
|
+
return false;
|
|
10659
|
+
};
|
|
10660
|
+
var updateMessageDeliveryStatusAndMarkers = function updateMessageDeliveryStatusAndMarkers(message, markerName) {
|
|
10661
|
+
var _message$markerTotals;
|
|
10662
|
+
if (shouldSkipDeliveryStatusUpdate(markerName, message.deliveryStatus)) {
|
|
10663
|
+
return {
|
|
10664
|
+
markerTotals: message.markerTotals,
|
|
10665
|
+
deliveryStatus: message.deliveryStatus
|
|
10666
|
+
};
|
|
10667
|
+
}
|
|
10668
|
+
var markerInMarkersTotal = message === null || message === void 0 ? void 0 : (_message$markerTotals = message.markerTotals) === null || _message$markerTotals === void 0 ? void 0 : _message$markerTotals.find(function (marker) {
|
|
10669
|
+
return marker.name === markerName;
|
|
10670
|
+
});
|
|
10671
|
+
if (!markerInMarkersTotal) {
|
|
10672
|
+
return {
|
|
10673
|
+
markerTotals: [].concat(message.markerTotals || [], [{
|
|
10674
|
+
name: markerName,
|
|
10675
|
+
count: 1
|
|
10676
|
+
}]),
|
|
10677
|
+
deliveryStatus: markerName
|
|
10678
|
+
};
|
|
10679
|
+
} else {
|
|
10680
|
+
return {
|
|
10681
|
+
markerTotals: message.markerTotals.map(function (marker) {
|
|
10682
|
+
return marker.name === markerName ? _extends({}, marker, {
|
|
10683
|
+
count: marker.count + 1
|
|
10684
|
+
}) : marker;
|
|
10685
|
+
}),
|
|
10686
|
+
deliveryStatus: markerName
|
|
10687
|
+
};
|
|
10688
|
+
}
|
|
10689
|
+
};
|
|
10649
10690
|
var sendMessageHandler;
|
|
10650
10691
|
var setSendMessageHandler = function setSendMessageHandler(handler) {
|
|
10651
10692
|
sendMessageHandler = handler;
|
|
@@ -10677,7 +10718,8 @@ var updateMessageOnAllMessages = function updateMessageOnAllMessages(messageId,
|
|
|
10677
10718
|
if (updatedParams.state === MESSAGE_STATUS.DELETE) {
|
|
10678
10719
|
return _extends({}, updatedParams);
|
|
10679
10720
|
}
|
|
10680
|
-
var
|
|
10721
|
+
var statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(message, updatedParams.deliveryStatus);
|
|
10722
|
+
var updatedMessage = _extends({}, message, updatedParams, statusUpdatedMessage);
|
|
10681
10723
|
if (voteDetails) {
|
|
10682
10724
|
updatedMessage = _extends({}, updatedMessage, {
|
|
10683
10725
|
pollDetails: handleVoteDetails(voteDetails, updatedMessage)
|
|
@@ -10688,6 +10730,15 @@ var updateMessageOnAllMessages = function updateMessageOnAllMessages(messageId,
|
|
|
10688
10730
|
return message;
|
|
10689
10731
|
});
|
|
10690
10732
|
};
|
|
10733
|
+
var updateMessageStatusOnAllMessages = function updateMessageStatusOnAllMessages(name, markersMap) {
|
|
10734
|
+
activeChannelAllMessages = activeChannelAllMessages.map(function (message) {
|
|
10735
|
+
if (markersMap[message.id]) {
|
|
10736
|
+
var statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(message, name);
|
|
10737
|
+
return _extends({}, message, statusUpdatedMessage);
|
|
10738
|
+
}
|
|
10739
|
+
return message;
|
|
10740
|
+
});
|
|
10741
|
+
};
|
|
10691
10742
|
var removeMessageFromAllMessages = function removeMessageFromAllMessages(messageId) {
|
|
10692
10743
|
activeChannelAllMessages = [].concat(activeChannelAllMessages).filter(function (msg) {
|
|
10693
10744
|
return !(msg.id === messageId || msg.tid === messageId);
|
|
@@ -10695,12 +10746,11 @@ var removeMessageFromAllMessages = function removeMessageFromAllMessages(message
|
|
|
10695
10746
|
};
|
|
10696
10747
|
var updateMarkersOnAllMessages = function updateMarkersOnAllMessages(markersMap, name) {
|
|
10697
10748
|
activeChannelAllMessages = activeChannelAllMessages.map(function (message) {
|
|
10698
|
-
if (markersMap[message.id]
|
|
10699
|
-
return
|
|
10700
|
-
deliveryStatus: name
|
|
10701
|
-
});
|
|
10749
|
+
if (!markersMap[message.id]) {
|
|
10750
|
+
return message;
|
|
10702
10751
|
}
|
|
10703
|
-
|
|
10752
|
+
var statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(message, name);
|
|
10753
|
+
return _extends({}, message, statusUpdatedMessage);
|
|
10704
10754
|
});
|
|
10705
10755
|
};
|
|
10706
10756
|
var getAllMessages = function getAllMessages() {
|
|
@@ -10756,17 +10806,18 @@ var getFromAllMessagesByMessageId = function getFromAllMessagesByMessageId(messa
|
|
|
10756
10806
|
return messagesForAdd;
|
|
10757
10807
|
};
|
|
10758
10808
|
function setMessagesToMap(channelId, messages) {
|
|
10759
|
-
messagesMap[channelId]
|
|
10809
|
+
if (!messagesMap[channelId]) {
|
|
10810
|
+
messagesMap[channelId] = {};
|
|
10811
|
+
}
|
|
10812
|
+
messages.forEach(function (msg) {
|
|
10813
|
+
messagesMap[channelId][msg.id] = msg;
|
|
10814
|
+
});
|
|
10760
10815
|
}
|
|
10761
10816
|
function addMessageToMap(channelId, message) {
|
|
10762
|
-
if (messagesMap[channelId]
|
|
10763
|
-
messagesMap[channelId]
|
|
10764
|
-
}
|
|
10765
|
-
if (messagesMap[channelId]) {
|
|
10766
|
-
messagesMap[channelId].push(message);
|
|
10767
|
-
} else {
|
|
10768
|
-
messagesMap[channelId] = [message];
|
|
10817
|
+
if (!messagesMap[channelId]) {
|
|
10818
|
+
messagesMap[channelId] = {};
|
|
10769
10819
|
}
|
|
10820
|
+
messagesMap[channelId][message.id] = message;
|
|
10770
10821
|
if (message.deliveryStatus === MESSAGE_DELIVERY_STATUS.PENDING) {
|
|
10771
10822
|
setPendingMessage(channelId, message);
|
|
10772
10823
|
}
|
|
@@ -10778,7 +10829,8 @@ function updateMessageOnMap(channelId, updatedMessage, voteDetails) {
|
|
|
10778
10829
|
var _pendingMessagesMap$c;
|
|
10779
10830
|
var updatedPendingMessages = (_pendingMessagesMap$c = pendingMessagesMap[channelId]) === null || _pendingMessagesMap$c === void 0 ? void 0 : _pendingMessagesMap$c.map(function (msg) {
|
|
10780
10831
|
if (msg.tid === updatedMessage.messageId) {
|
|
10781
|
-
|
|
10832
|
+
var statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(msg, updatedMessage.params.deliveryStatus);
|
|
10833
|
+
return _extends({}, msg, updatedMessage.params, statusUpdatedMessage);
|
|
10782
10834
|
}
|
|
10783
10835
|
return msg;
|
|
10784
10836
|
});
|
|
@@ -10792,15 +10844,16 @@ function updateMessageOnMap(channelId, updatedMessage, voteDetails) {
|
|
|
10792
10844
|
var updatedMessageData = null;
|
|
10793
10845
|
if (messagesMap[channelId]) {
|
|
10794
10846
|
var messagesList = [];
|
|
10795
|
-
for (var
|
|
10796
|
-
var mes =
|
|
10847
|
+
for (var _i = 0, _Object$values = Object.values(messagesMap[channelId] || {}); _i < _Object$values.length; _i++) {
|
|
10848
|
+
var mes = _Object$values[_i];
|
|
10797
10849
|
if (mes.tid === updatedMessage.messageId || mes.id === updatedMessage.messageId) {
|
|
10798
10850
|
if (updatedMessage.params.state === MESSAGE_STATUS.DELETE) {
|
|
10799
10851
|
updatedMessageData = _extends({}, updatedMessage.params);
|
|
10800
10852
|
messagesList.push(_extends({}, mes, updatedMessageData));
|
|
10801
10853
|
continue;
|
|
10802
10854
|
} else {
|
|
10803
|
-
|
|
10855
|
+
var statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(mes, updatedMessage.params.deliveryStatus);
|
|
10856
|
+
updatedMessageData = _extends({}, mes, updatedMessage.params, statusUpdatedMessage);
|
|
10804
10857
|
var voteDetailsData = void 0;
|
|
10805
10858
|
if (voteDetails) {
|
|
10806
10859
|
voteDetailsData = handleVoteDetails(voteDetails, updatedMessageData);
|
|
@@ -10814,28 +10867,29 @@ function updateMessageOnMap(channelId, updatedMessage, voteDetails) {
|
|
|
10814
10867
|
}
|
|
10815
10868
|
messagesList.push(mes);
|
|
10816
10869
|
}
|
|
10817
|
-
|
|
10870
|
+
messagesList.forEach(function (msg) {
|
|
10871
|
+
if (!messagesMap[channelId]) {
|
|
10872
|
+
messagesMap[channelId] = {};
|
|
10873
|
+
}
|
|
10874
|
+
messagesMap[channelId][msg.id] = msg;
|
|
10875
|
+
});
|
|
10818
10876
|
}
|
|
10819
10877
|
return updatedMessageData;
|
|
10820
10878
|
}
|
|
10821
10879
|
function addReactionToMessageOnMap(channelId, message, reaction, isSelf) {
|
|
10822
10880
|
if (messagesMap[channelId]) {
|
|
10823
|
-
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
slfReactions = [reaction];
|
|
10831
|
-
}
|
|
10832
|
-
}
|
|
10833
|
-
return _extends({}, msg, {
|
|
10834
|
-
userReactions: slfReactions,
|
|
10835
|
-
reactionTotals: message.reactionTotals
|
|
10836
|
-
});
|
|
10881
|
+
var messageShouldBeUpdated = messagesMap[channelId][message.id];
|
|
10882
|
+
var slfReactions = [].concat(messageShouldBeUpdated.userReactions);
|
|
10883
|
+
if (isSelf) {
|
|
10884
|
+
if (slfReactions) {
|
|
10885
|
+
slfReactions.push(reaction);
|
|
10886
|
+
} else {
|
|
10887
|
+
slfReactions = [reaction];
|
|
10837
10888
|
}
|
|
10838
|
-
|
|
10889
|
+
}
|
|
10890
|
+
messagesMap[channelId][message.id] = _extends({}, messageShouldBeUpdated, {
|
|
10891
|
+
userReactions: slfReactions,
|
|
10892
|
+
reactionTotals: message.reactionTotals
|
|
10839
10893
|
});
|
|
10840
10894
|
}
|
|
10841
10895
|
}
|
|
@@ -10860,20 +10914,16 @@ var addReactionOnAllMessages = function addReactionOnAllMessages(message, reacti
|
|
|
10860
10914
|
};
|
|
10861
10915
|
function removeReactionToMessageOnMap(channelId, message, reaction, isSelf) {
|
|
10862
10916
|
if (messagesMap[channelId]) {
|
|
10863
|
-
|
|
10864
|
-
|
|
10865
|
-
|
|
10866
|
-
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
userReactions: userReactions
|
|
10874
|
-
});
|
|
10875
|
-
}
|
|
10876
|
-
return msg;
|
|
10917
|
+
var messageShouldBeUpdated = messagesMap[channelId][message.id];
|
|
10918
|
+
var userReactions = messageShouldBeUpdated.userReactions;
|
|
10919
|
+
if (isSelf) {
|
|
10920
|
+
userReactions = messageShouldBeUpdated.userReactions.filter(function (selfReaction) {
|
|
10921
|
+
return selfReaction.key !== reaction.key;
|
|
10922
|
+
});
|
|
10923
|
+
}
|
|
10924
|
+
messagesMap[channelId][message.id] = _extends({}, messageShouldBeUpdated, {
|
|
10925
|
+
reactionTotals: message.reactionTotals,
|
|
10926
|
+
userReactions: userReactions
|
|
10877
10927
|
});
|
|
10878
10928
|
}
|
|
10879
10929
|
}
|
|
@@ -10896,15 +10946,18 @@ var removeReactionOnAllMessages = function removeReactionOnAllMessages(message,
|
|
|
10896
10946
|
};
|
|
10897
10947
|
function updateMessageStatusOnMap(channelId, newMarkers) {
|
|
10898
10948
|
if (messagesMap[channelId] && newMarkers && newMarkers.markersMap) {
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
|
|
10905
|
-
|
|
10949
|
+
var messageIds = [];
|
|
10950
|
+
Object.keys(newMarkers.markersMap).forEach(function (messageId) {
|
|
10951
|
+
if (newMarkers.markersMap[messageId]) {
|
|
10952
|
+
messageIds.push(messageId);
|
|
10953
|
+
}
|
|
10954
|
+
});
|
|
10955
|
+
messageIds.forEach(function (messageId) {
|
|
10956
|
+
var messageShouldBeUpdated = messagesMap[channelId][messageId];
|
|
10957
|
+
if (messageShouldBeUpdated) {
|
|
10958
|
+
var statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(messageShouldBeUpdated, newMarkers.name);
|
|
10959
|
+
messagesMap[channelId][messageId] = _extends({}, messageShouldBeUpdated, statusUpdatedMessage);
|
|
10906
10960
|
}
|
|
10907
|
-
return mes;
|
|
10908
10961
|
});
|
|
10909
10962
|
}
|
|
10910
10963
|
}
|
|
@@ -10915,9 +10968,7 @@ function removeMessagesFromMap(channelId) {
|
|
|
10915
10968
|
delete messagesMap[channelId];
|
|
10916
10969
|
}
|
|
10917
10970
|
function removeMessageFromMap(channelId, messageId) {
|
|
10918
|
-
messagesMap[channelId]
|
|
10919
|
-
return !(msg.id === messageId || msg.tid === messageId);
|
|
10920
|
-
});
|
|
10971
|
+
delete messagesMap[channelId][messageId];
|
|
10921
10972
|
store.dispatch(removePendingMessageAC(channelId, messageId));
|
|
10922
10973
|
}
|
|
10923
10974
|
function updatePendingMessageOnMap(channelId, messageId, updatedMessage) {
|
|
@@ -11125,7 +11176,8 @@ var initialState$1 = {
|
|
|
11125
11176
|
pollVotesLoadingState: {},
|
|
11126
11177
|
pollVotesInitialCount: null,
|
|
11127
11178
|
pendingPollActions: {},
|
|
11128
|
-
pendingMessagesMap: {}
|
|
11179
|
+
pendingMessagesMap: {},
|
|
11180
|
+
unreadScrollTo: true
|
|
11129
11181
|
};
|
|
11130
11182
|
var messageSlice = createSlice({
|
|
11131
11183
|
name: 'messages',
|
|
@@ -11159,6 +11211,9 @@ var messageSlice = createSlice({
|
|
|
11159
11211
|
setShowScrollToNewMessageButton: function setShowScrollToNewMessageButton(state, action) {
|
|
11160
11212
|
state.showScrollToNewMessageButton = action.payload.state;
|
|
11161
11213
|
},
|
|
11214
|
+
setUnreadScrollTo: function setUnreadScrollTo(state, action) {
|
|
11215
|
+
state.unreadScrollTo = action.payload.state;
|
|
11216
|
+
},
|
|
11162
11217
|
setMessages: function setMessages(state, action) {
|
|
11163
11218
|
state.activeChannelMessages = action.payload.messages;
|
|
11164
11219
|
},
|
|
@@ -11219,8 +11274,18 @@ var messageSlice = createSlice({
|
|
|
11219
11274
|
markersMap = _action$payload2.markersMap;
|
|
11220
11275
|
var markerName = name;
|
|
11221
11276
|
for (var index = 0; index < state.activeChannelMessages.length; index++) {
|
|
11222
|
-
if (markersMap[state.activeChannelMessages[index].id]
|
|
11223
|
-
|
|
11277
|
+
if (!markersMap[state.activeChannelMessages[index].id]) {
|
|
11278
|
+
continue;
|
|
11279
|
+
}
|
|
11280
|
+
if (state.activeChannelMessages[index].state !== 'Deleted') {
|
|
11281
|
+
var message = state.activeChannelMessages[index];
|
|
11282
|
+
var _updateMessageDeliver = updateMessageDeliveryStatusAndMarkers(message, markerName),
|
|
11283
|
+
markerTotals = _updateMessageDeliver.markerTotals,
|
|
11284
|
+
deliveryStatus = _updateMessageDeliver.deliveryStatus;
|
|
11285
|
+
state.activeChannelMessages[index] = _extends({}, message, {
|
|
11286
|
+
markerTotals: markerTotals,
|
|
11287
|
+
deliveryStatus: deliveryStatus
|
|
11288
|
+
});
|
|
11224
11289
|
}
|
|
11225
11290
|
}
|
|
11226
11291
|
},
|
|
@@ -11237,10 +11302,15 @@ var messageSlice = createSlice({
|
|
|
11237
11302
|
if (params.state === MESSAGE_STATUS.DELETE) {
|
|
11238
11303
|
return _extends({}, params);
|
|
11239
11304
|
} else {
|
|
11240
|
-
var
|
|
11305
|
+
var statusUpdatedMessage = null;
|
|
11306
|
+
if (params !== null && params !== void 0 && params.deliveryStatus) {
|
|
11307
|
+
statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(message, params.deliveryStatus);
|
|
11308
|
+
}
|
|
11309
|
+
var messageOldData = _extends({}, message, params, statusUpdatedMessage);
|
|
11310
|
+
var messageData = _extends({}, messageOldData);
|
|
11241
11311
|
if (voteDetails) {
|
|
11242
|
-
messageData = _extends({},
|
|
11243
|
-
pollDetails: handleVoteDetails(voteDetails,
|
|
11312
|
+
messageData = _extends({}, messageOldData, {
|
|
11313
|
+
pollDetails: handleVoteDetails(voteDetails, messageOldData)
|
|
11244
11314
|
});
|
|
11245
11315
|
}
|
|
11246
11316
|
if (messageData.deliveryStatus !== MESSAGE_DELIVERY_STATUS.PENDING) {
|
|
@@ -11684,6 +11754,7 @@ var _messageSlice$actions = messageSlice.actions,
|
|
|
11684
11754
|
setScrollToMentionedMessage = _messageSlice$actions.setScrollToMentionedMessage,
|
|
11685
11755
|
setScrollToNewMessage = _messageSlice$actions.setScrollToNewMessage,
|
|
11686
11756
|
setShowScrollToNewMessageButton = _messageSlice$actions.setShowScrollToNewMessageButton,
|
|
11757
|
+
setUnreadScrollTo = _messageSlice$actions.setUnreadScrollTo,
|
|
11687
11758
|
setMessages = _messageSlice$actions.setMessages,
|
|
11688
11759
|
addMessages = _messageSlice$actions.addMessages,
|
|
11689
11760
|
updateMessagesStatus = _messageSlice$actions.updateMessagesStatus,
|
|
@@ -14008,8 +14079,8 @@ function updateActiveChannelMembersRemove(removedMembers) {
|
|
|
14008
14079
|
var _marked$1 = /*#__PURE__*/_regenerator().m(watchForEvents);
|
|
14009
14080
|
function watchForEvents() {
|
|
14010
14081
|
var SceytChatClient, channelListener, connectionListener, usersTimeout, chan, _loop;
|
|
14011
|
-
return _regenerator().w(function (
|
|
14012
|
-
while (1) switch (
|
|
14082
|
+
return _regenerator().w(function (_context2) {
|
|
14083
|
+
while (1) switch (_context2.n) {
|
|
14013
14084
|
case 0:
|
|
14014
14085
|
SceytChatClient = getClient();
|
|
14015
14086
|
channelListener = new SceytChatClient.ChannelListener();
|
|
@@ -14407,46 +14478,46 @@ function watchForEvents() {
|
|
|
14407
14478
|
SceytChatClient.removeConnectionListener('CONNECTION_EVENTS');
|
|
14408
14479
|
};
|
|
14409
14480
|
});
|
|
14410
|
-
_loop = /*#__PURE__*/_regenerator().m(function
|
|
14411
|
-
var _yield$take, type, args, createdChannel, channelFilterTypes, getFromContacts, channelExists, _chan, channel, _chan2, _channel, member, _channelExists, _activeChannelId, groupName, updateChannelData, _channel2, _channelExists2, _channel3, removedMembers, _activeChannelId2, _channelExists3, activeChannel, _updateChannelData, _groupName, _channel4, addedMembers, _activeChannelId3, _channelExists4, _updateChannelData2, _groupName2, updatedChannel, _channelExists5, subject, avatarUrl, muted, mutedTill, metadata, _activeChannelId4, _groupName3, _channel5, message, messageToHandle, _channelFilterTypes, _activeChannelId5, _channelExists6, channelForAdd, hasNextMessage, _groupName4, showNotifications, tabIsActive, _state$ThemeReducer$n, _state$ThemeReducer$n2, _state$ThemeReducer$n3, _state$ThemeReducer$n4, _state$ThemeReducer$n5, _state$ThemeReducer$n6, contactsMap, _getFromContacts, state, theme, accentColor, textSecondary, messageBody, channelId, markerList, _channel6, _activeChannelId6, updateLastMessage, markersMap, activeChannelMessages, lastMessage, _channelId, _channel7, _channel8, deletedMessage, _activeChannelId7, _channelExists7, _channel9, _message, _activeChannelId8, _channelExists8, _channel0, user, _message2, reaction, isSelf, _activeChannelId9, _state$ThemeReducer$n7, _state$ThemeReducer$n8, _state$ThemeReducer$n9, _state$ThemeReducer$n0, _state$ThemeReducer$n1, _state$ThemeReducer$n10, _contactsMap, _getFromContacts2, _state, _theme, _accentColor, _textSecondary, _messageBody, channelUpdateParams, _pollDetailsData$chan, _pollDetailsData$chan2, _channel1, pollDetails,
|
|
14412
|
-
return _regenerator().w(function (
|
|
14413
|
-
while (1) switch (
|
|
14481
|
+
_loop = /*#__PURE__*/_regenerator().m(function _callee() {
|
|
14482
|
+
var _yield$take, type, args, createdChannel, channelFilterTypes, getFromContacts, channelExists, _chan, channel, _chan2, _channel, member, _channelExists, _activeChannelId, groupName, updateChannelData, _channel2, _channelExists2, _channel3, removedMembers, _activeChannelId2, _channelExists3, activeChannel, _updateChannelData, _groupName, _channel4, addedMembers, _activeChannelId3, _channelExists4, _updateChannelData2, _groupName2, updatedChannel, _channelExists5, subject, avatarUrl, muted, mutedTill, metadata, _activeChannelId4, _groupName3, _channel5, message, messageToHandle, _channelFilterTypes, _activeChannelId5, _channelExists6, channelForAdd, hasNextMessage, _groupName4, showNotifications, tabIsActive, _state$ThemeReducer$n, _state$ThemeReducer$n2, _state$ThemeReducer$n3, _state$ThemeReducer$n4, _state$ThemeReducer$n5, _state$ThemeReducer$n6, contactsMap, _getFromContacts, state, theme, accentColor, textSecondary, messageBody, channelId, markerList, _channel6, _activeChannelId6, updateLastMessage, markersMap, activeChannelMessages, _iterator, _step, messageId, isPendingMessage, lastMessage, _channelId, _channel7, _channel8, deletedMessage, _activeChannelId7, _channelExists7, _channel9, _message, _activeChannelId8, _channelExists8, _channel0, user, _message2, reaction, isSelf, _activeChannelId9, _state$ThemeReducer$n7, _state$ThemeReducer$n8, _state$ThemeReducer$n9, _state$ThemeReducer$n0, _state$ThemeReducer$n1, _state$ThemeReducer$n10, _contactsMap, _getFromContacts2, _state, _theme, _accentColor, _textSecondary, _messageBody, channelUpdateParams, _pollDetailsData$chan, _pollDetailsData$chan2, _channel1, pollDetails, _messageId, pollDetailsData, _activeChannelId0, addedVotes, deletedVotes, objs, _iterator2, _step2, vote, _iterator3, _step3, _vote, _i, _objs, obj, _store$getState$Messa, key, hasNext, _i2, _objs2, _obj, _pollDetailsData$chan3, _channel10, _pollDetails, _messageId2, _pollDetailsData, _activeChannelId1, _deletedVotes, _objs3, _iterator4, _step4, _vote2, _i3, _objs4, _obj2, _i4, _objs5, _obj3, _pollDetailsData2$cha, _channel11, _pollDetails2, _messageId3, _activeChannelId10, _pollDetailsData2, retractedVotes, _objs6, _iterator5, _step5, _vote4, _i5, _objs7, _obj4, _iterator6, _step6, _vote3, _channel12, _messageId4, _activeChannelId11, _obj5, _channel13, _user, _message3, _reaction, channelFromMap, _isSelf, _activeChannelId12, _channelUpdateParams, _channel14, _updatedChannel, _channel15, _activeChannelId13, channelExist, _channel16, _channel17, _channel18, _channel19, _channel20, _channel21, _channel22, _groupName5, _channel23, _groupName6, _channel24, members, _activeChannelId14, i, _channel25, _channel26, _channelId2, from, name, status, _t, _t2;
|
|
14483
|
+
return _regenerator().w(function (_context) {
|
|
14484
|
+
while (1) switch (_context.p = _context.n) {
|
|
14414
14485
|
case 0:
|
|
14415
|
-
|
|
14416
|
-
|
|
14486
|
+
_context.p = 0;
|
|
14487
|
+
_context.n = 1;
|
|
14417
14488
|
return take(chan);
|
|
14418
14489
|
case 1:
|
|
14419
|
-
_yield$take =
|
|
14490
|
+
_yield$take = _context.v;
|
|
14420
14491
|
type = _yield$take.type;
|
|
14421
14492
|
args = _yield$take.args;
|
|
14422
14493
|
_t = type;
|
|
14423
|
-
|
|
14494
|
+
_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 ? 68 : _t === CHANNEL_EVENT_TYPES.DELETE ? 81 : _t === CHANNEL_EVENT_TYPES.DELETE_MESSAGE ? 83 : _t === CHANNEL_EVENT_TYPES.EDIT_MESSAGE ? 88 : _t === CHANNEL_EVENT_TYPES.REACTION_ADDED ? 93 : _t === CHANNEL_EVENT_TYPES.POLL_ADDED ? 101 : _t === CHANNEL_EVENT_TYPES.POLL_DELETED ? 111 : _t === CHANNEL_EVENT_TYPES.POLL_RETRACTED ? 119 : _t === CHANNEL_EVENT_TYPES.POLL_CLOSED ? 127 : _t === CHANNEL_EVENT_TYPES.REACTION_DELETED ? 131 : _t === CHANNEL_EVENT_TYPES.UNREAD_MESSAGES_INFO ? 136 : _t === CHANNEL_EVENT_TYPES.CLEAR_HISTORY ? 139 : _t === CHANNEL_EVENT_TYPES.MUTE ? 145 : _t === CHANNEL_EVENT_TYPES.UNMUTE ? 147 : _t === CHANNEL_EVENT_TYPES.PINED ? 149 : _t === CHANNEL_EVENT_TYPES.UNPINED ? 151 : _t === CHANNEL_EVENT_TYPES.HIDE ? 153 : _t === CHANNEL_EVENT_TYPES.UNHIDE ? 155 : _t === CHANNEL_EVENT_TYPES.CHANNEL_MARKED_AS_UNREAD ? 157 : _t === CHANNEL_EVENT_TYPES.CHANNEL_MARKED_AS_READ ? 160 : _t === CHANNEL_EVENT_TYPES.CHANGE_ROLE ? 163 : _t === CHANNEL_EVENT_TYPES.FROZEN ? 170 : _t === CHANNEL_EVENT_TYPES.UNFROZEN ? 171 : _t === CHANNEL_EVENT_TYPES.CHANNEL_EVENT ? 172 : _t === CONNECTION_EVENT_TYPES.CONNECTION_STATUS_CHANGED ? 181 : 184;
|
|
14424
14495
|
break;
|
|
14425
14496
|
case 2:
|
|
14426
14497
|
createdChannel = args.createdChannel;
|
|
14427
14498
|
log.info('CHANNEL_EVENT_CREATE ... ', createdChannel);
|
|
14428
14499
|
channelFilterTypes = getChannelTypesFilter();
|
|
14429
14500
|
if (!(channelFilterTypes !== null && channelFilterTypes !== void 0 && channelFilterTypes.length ? channelFilterTypes.includes(createdChannel.type) : true)) {
|
|
14430
|
-
|
|
14501
|
+
_context.n = 6;
|
|
14431
14502
|
break;
|
|
14432
14503
|
}
|
|
14433
14504
|
getFromContacts = getShowOnlyContactUsers();
|
|
14434
14505
|
channelExists = checkChannelExists(createdChannel.id);
|
|
14435
14506
|
if (channelExists) {
|
|
14436
|
-
|
|
14507
|
+
_context.n = 5;
|
|
14437
14508
|
break;
|
|
14438
14509
|
}
|
|
14439
14510
|
if (!getFromContacts) {
|
|
14440
|
-
|
|
14511
|
+
_context.n = 3;
|
|
14441
14512
|
break;
|
|
14442
14513
|
}
|
|
14443
|
-
|
|
14514
|
+
_context.n = 3;
|
|
14444
14515
|
return put(getContactsAC());
|
|
14445
14516
|
case 3:
|
|
14446
|
-
|
|
14517
|
+
_context.n = 4;
|
|
14447
14518
|
return call(setChannelInMap, createdChannel);
|
|
14448
14519
|
case 4:
|
|
14449
|
-
|
|
14520
|
+
_context.n = 5;
|
|
14450
14521
|
return put(setChannelToAddAC(JSON.parse(JSON.stringify(createdChannel))));
|
|
14451
14522
|
case 5:
|
|
14452
14523
|
_chan = getChannelFromAllChannels(createdChannel.id);
|
|
@@ -14454,73 +14525,73 @@ function watchForEvents() {
|
|
|
14454
14525
|
addChannelToAllChannels(createdChannel);
|
|
14455
14526
|
}
|
|
14456
14527
|
case 6:
|
|
14457
|
-
return
|
|
14528
|
+
return _context.a(3, 185);
|
|
14458
14529
|
case 7:
|
|
14459
14530
|
channel = args.channel;
|
|
14460
14531
|
log.info('channel JOIN ... . ', channel);
|
|
14461
|
-
|
|
14532
|
+
_context.n = 8;
|
|
14462
14533
|
return call(getActiveChannelId);
|
|
14463
14534
|
case 8:
|
|
14464
14535
|
_chan2 = getChannelFromAllChannels(channel.id);
|
|
14465
14536
|
if (!_chan2) {
|
|
14466
14537
|
addChannelToAllChannels(channel);
|
|
14467
14538
|
}
|
|
14468
|
-
return
|
|
14539
|
+
return _context.a(3, 185);
|
|
14469
14540
|
case 9:
|
|
14470
14541
|
_channel = args.channel, member = args.member;
|
|
14471
14542
|
log.info('channel LEAVE ... ', _channel, member);
|
|
14472
14543
|
_channelExists = checkChannelExists(_channel.id);
|
|
14473
|
-
|
|
14544
|
+
_context.n = 10;
|
|
14474
14545
|
return call(getActiveChannelId);
|
|
14475
14546
|
case 10:
|
|
14476
|
-
_activeChannelId =
|
|
14547
|
+
_activeChannelId = _context.v;
|
|
14477
14548
|
if (!(member.id === SceytChatClient.user.id)) {
|
|
14478
|
-
|
|
14549
|
+
_context.n = 15;
|
|
14479
14550
|
break;
|
|
14480
14551
|
}
|
|
14481
|
-
|
|
14552
|
+
_context.n = 11;
|
|
14482
14553
|
return put(switchChannelActionAC(null));
|
|
14483
14554
|
case 11:
|
|
14484
|
-
|
|
14555
|
+
_context.n = 12;
|
|
14485
14556
|
return put(removeChannelAC(_channel.id));
|
|
14486
14557
|
case 12:
|
|
14487
14558
|
removeChannelFromMap(_channel.id);
|
|
14488
14559
|
deleteChannelFromAllChannels(_channel.id);
|
|
14489
|
-
|
|
14560
|
+
_context.n = 13;
|
|
14490
14561
|
return put(setChannelToRemoveAC(_channel));
|
|
14491
14562
|
case 13:
|
|
14492
|
-
|
|
14563
|
+
_context.n = 14;
|
|
14493
14564
|
return put(removeChannelCachesAC(_channel.id));
|
|
14494
14565
|
case 14:
|
|
14495
|
-
|
|
14566
|
+
_context.n = 21;
|
|
14496
14567
|
break;
|
|
14497
14568
|
case 15:
|
|
14498
14569
|
groupName = getChannelGroupName(_channel);
|
|
14499
14570
|
if (!_channelExists) {
|
|
14500
|
-
|
|
14571
|
+
_context.n = 19;
|
|
14501
14572
|
break;
|
|
14502
14573
|
}
|
|
14503
14574
|
updateChannelData = {};
|
|
14504
14575
|
if (!(_activeChannelId === _channel.id)) {
|
|
14505
|
-
|
|
14576
|
+
_context.n = 18;
|
|
14506
14577
|
break;
|
|
14507
14578
|
}
|
|
14508
|
-
|
|
14579
|
+
_context.n = 16;
|
|
14509
14580
|
return put(removeMemberFromListAC([member]));
|
|
14510
14581
|
case 16:
|
|
14511
|
-
|
|
14582
|
+
_context.n = 17;
|
|
14512
14583
|
return call(updateActiveChannelMembersRemove, [member]) || {};
|
|
14513
14584
|
case 17:
|
|
14514
|
-
updateChannelData =
|
|
14585
|
+
updateChannelData = _context.v;
|
|
14515
14586
|
case 18:
|
|
14516
|
-
|
|
14587
|
+
_context.n = 19;
|
|
14517
14588
|
return put(updateChannelDataAC(_channel.id, _extends({
|
|
14518
14589
|
memberCount: _channel.memberCount,
|
|
14519
14590
|
muted: _channel.muted,
|
|
14520
14591
|
mutedTill: _channel.mutedTill
|
|
14521
14592
|
}, updateChannelData)));
|
|
14522
14593
|
case 19:
|
|
14523
|
-
|
|
14594
|
+
_context.n = 20;
|
|
14524
14595
|
return put(updateSearchedChannelDataAC(_channel.id, {
|
|
14525
14596
|
memberCount: _channel.memberCount,
|
|
14526
14597
|
muted: _channel.muted,
|
|
@@ -14533,80 +14604,80 @@ function watchForEvents() {
|
|
|
14533
14604
|
mutedTill: _channel.mutedTill
|
|
14534
14605
|
});
|
|
14535
14606
|
case 21:
|
|
14536
|
-
return
|
|
14607
|
+
return _context.a(3, 185);
|
|
14537
14608
|
case 22:
|
|
14538
14609
|
log.info('channel BLOCK ... ');
|
|
14539
14610
|
_channel2 = args.channel;
|
|
14540
14611
|
_channelExists2 = checkChannelExists(_channel2.id);
|
|
14541
14612
|
if (!_channelExists2) {
|
|
14542
|
-
|
|
14613
|
+
_context.n = 23;
|
|
14543
14614
|
break;
|
|
14544
14615
|
}
|
|
14545
|
-
|
|
14616
|
+
_context.n = 23;
|
|
14546
14617
|
return put(removeChannelAC(_channel2.id));
|
|
14547
14618
|
case 23:
|
|
14548
|
-
return
|
|
14619
|
+
return _context.a(3, 185);
|
|
14549
14620
|
case 24:
|
|
14550
14621
|
log.info('channel UNBLOCK ... ');
|
|
14551
|
-
return
|
|
14622
|
+
return _context.a(3, 185);
|
|
14552
14623
|
case 25:
|
|
14553
14624
|
_channel3 = args.channel, removedMembers = args.removedMembers;
|
|
14554
14625
|
log.info('channel KICK_MEMBERS ... ', removedMembers);
|
|
14555
|
-
|
|
14626
|
+
_context.n = 26;
|
|
14556
14627
|
return call(getActiveChannelId);
|
|
14557
14628
|
case 26:
|
|
14558
|
-
_activeChannelId2 =
|
|
14629
|
+
_activeChannelId2 = _context.v;
|
|
14559
14630
|
_channelExists3 = checkChannelExists(_channel3.id);
|
|
14560
14631
|
if (!_channelExists3) {
|
|
14561
|
-
|
|
14632
|
+
_context.n = 35;
|
|
14562
14633
|
break;
|
|
14563
14634
|
}
|
|
14564
14635
|
if (!removedMembers.find(function (mem) {
|
|
14565
14636
|
return mem.id === SceytChatClient.user.id;
|
|
14566
14637
|
})) {
|
|
14567
|
-
|
|
14638
|
+
_context.n = 30;
|
|
14568
14639
|
break;
|
|
14569
14640
|
}
|
|
14570
14641
|
removeChannelFromMap(_channel3.id);
|
|
14571
|
-
|
|
14642
|
+
_context.n = 27;
|
|
14572
14643
|
return put(removeChannelAC(_channel3.id));
|
|
14573
14644
|
case 27:
|
|
14574
|
-
|
|
14645
|
+
_context.n = 28;
|
|
14575
14646
|
return call(getLastChannelFromMap);
|
|
14576
14647
|
case 28:
|
|
14577
|
-
activeChannel =
|
|
14648
|
+
activeChannel = _context.v;
|
|
14578
14649
|
if (!activeChannel) {
|
|
14579
|
-
|
|
14650
|
+
_context.n = 29;
|
|
14580
14651
|
break;
|
|
14581
14652
|
}
|
|
14582
|
-
|
|
14653
|
+
_context.n = 29;
|
|
14583
14654
|
return put(switchChannelActionAC(JSON.parse(JSON.stringify(activeChannel))));
|
|
14584
14655
|
case 29:
|
|
14585
|
-
|
|
14656
|
+
_context.n = 35;
|
|
14586
14657
|
break;
|
|
14587
14658
|
case 30:
|
|
14588
14659
|
_updateChannelData = {};
|
|
14589
14660
|
if (!(_activeChannelId2 === _channel3.id)) {
|
|
14590
|
-
|
|
14661
|
+
_context.n = 33;
|
|
14591
14662
|
break;
|
|
14592
14663
|
}
|
|
14593
|
-
|
|
14664
|
+
_context.n = 31;
|
|
14594
14665
|
return put(removeMemberFromListAC(removedMembers));
|
|
14595
14666
|
case 31:
|
|
14596
|
-
|
|
14667
|
+
_context.n = 32;
|
|
14597
14668
|
return call(updateActiveChannelMembersRemove, removedMembers) || {};
|
|
14598
14669
|
case 32:
|
|
14599
|
-
_updateChannelData =
|
|
14670
|
+
_updateChannelData = _context.v;
|
|
14600
14671
|
case 33:
|
|
14601
14672
|
_groupName = getChannelGroupName(_channel3);
|
|
14602
|
-
|
|
14673
|
+
_context.n = 34;
|
|
14603
14674
|
return put(updateSearchedChannelDataAC(_channel3.id, {
|
|
14604
14675
|
memberCount: _channel3.memberCount,
|
|
14605
14676
|
muted: _channel3.muted,
|
|
14606
14677
|
mutedTill: _channel3.mutedTill
|
|
14607
14678
|
}, _groupName));
|
|
14608
14679
|
case 34:
|
|
14609
|
-
|
|
14680
|
+
_context.n = 35;
|
|
14610
14681
|
return put(updateChannelDataAC(_channel3.id, _extends({
|
|
14611
14682
|
memberCount: _channel3.memberCount,
|
|
14612
14683
|
muted: _channel3.muted,
|
|
@@ -14618,50 +14689,50 @@ function watchForEvents() {
|
|
|
14618
14689
|
muted: _channel3.muted,
|
|
14619
14690
|
mutedTill: _channel3.mutedTill
|
|
14620
14691
|
});
|
|
14621
|
-
return
|
|
14692
|
+
return _context.a(3, 185);
|
|
14622
14693
|
case 36:
|
|
14623
14694
|
_channel4 = args.channel, addedMembers = args.addedMembers;
|
|
14624
14695
|
log.info('channel ADD_MEMBERS ... ', addedMembers);
|
|
14625
|
-
|
|
14696
|
+
_context.n = 37;
|
|
14626
14697
|
return call(getActiveChannelId);
|
|
14627
14698
|
case 37:
|
|
14628
|
-
_activeChannelId3 =
|
|
14699
|
+
_activeChannelId3 = _context.v;
|
|
14629
14700
|
_channelExists4 = checkChannelExists(_channel4.id);
|
|
14630
14701
|
if (!_channelExists4) {
|
|
14631
|
-
|
|
14702
|
+
_context.n = 42;
|
|
14632
14703
|
break;
|
|
14633
14704
|
}
|
|
14634
14705
|
_updateChannelData2 = {};
|
|
14635
14706
|
if (!(_activeChannelId3 === _channel4.id)) {
|
|
14636
|
-
|
|
14707
|
+
_context.n = 40;
|
|
14637
14708
|
break;
|
|
14638
14709
|
}
|
|
14639
|
-
|
|
14710
|
+
_context.n = 38;
|
|
14640
14711
|
return put(addMembersToListAC(addedMembers));
|
|
14641
14712
|
case 38:
|
|
14642
|
-
|
|
14713
|
+
_context.n = 39;
|
|
14643
14714
|
return call(updateActiveChannelMembersAdd, addedMembers) || {};
|
|
14644
14715
|
case 39:
|
|
14645
|
-
_updateChannelData2 =
|
|
14716
|
+
_updateChannelData2 = _context.v;
|
|
14646
14717
|
case 40:
|
|
14647
|
-
|
|
14718
|
+
_context.n = 41;
|
|
14648
14719
|
return put(updateChannelDataAC(_channel4.id, _extends({
|
|
14649
14720
|
memberCount: _channel4.memberCount,
|
|
14650
14721
|
muted: _channel4.muted,
|
|
14651
14722
|
mutedTill: _channel4.mutedTill
|
|
14652
14723
|
}, _updateChannelData2)));
|
|
14653
14724
|
case 41:
|
|
14654
|
-
|
|
14725
|
+
_context.n = 44;
|
|
14655
14726
|
break;
|
|
14656
14727
|
case 42:
|
|
14657
|
-
|
|
14728
|
+
_context.n = 43;
|
|
14658
14729
|
return call(setChannelInMap, _channel4);
|
|
14659
14730
|
case 43:
|
|
14660
|
-
|
|
14731
|
+
_context.n = 44;
|
|
14661
14732
|
return put(setAddedToChannelAC(JSON.parse(JSON.stringify(_channel4))));
|
|
14662
14733
|
case 44:
|
|
14663
14734
|
_groupName2 = getChannelGroupName(_channel4);
|
|
14664
|
-
|
|
14735
|
+
_context.n = 45;
|
|
14665
14736
|
return put(updateSearchedChannelDataAC(_channel4.id, {
|
|
14666
14737
|
memberCount: _channel4.memberCount,
|
|
14667
14738
|
muted: _channel4.muted,
|
|
@@ -14673,17 +14744,17 @@ function watchForEvents() {
|
|
|
14673
14744
|
muted: _channel4.muted,
|
|
14674
14745
|
mutedTill: _channel4.mutedTill
|
|
14675
14746
|
});
|
|
14676
|
-
return
|
|
14747
|
+
return _context.a(3, 185);
|
|
14677
14748
|
case 46:
|
|
14678
14749
|
log.info('channel UPDATE_CHANNEL ... ');
|
|
14679
14750
|
updatedChannel = args.updatedChannel;
|
|
14680
14751
|
_channelExists5 = checkChannelExists(updatedChannel.id);
|
|
14681
14752
|
subject = updatedChannel.subject, avatarUrl = updatedChannel.avatarUrl, muted = updatedChannel.muted, mutedTill = updatedChannel.mutedTill, metadata = updatedChannel.metadata;
|
|
14682
14753
|
if (!_channelExists5) {
|
|
14683
|
-
|
|
14754
|
+
_context.n = 49;
|
|
14684
14755
|
break;
|
|
14685
14756
|
}
|
|
14686
|
-
|
|
14757
|
+
_context.n = 47;
|
|
14687
14758
|
return put(updateChannelDataAC(updatedChannel.id, {
|
|
14688
14759
|
subject: subject,
|
|
14689
14760
|
avatarUrl: avatarUrl,
|
|
@@ -14691,21 +14762,21 @@ function watchForEvents() {
|
|
|
14691
14762
|
mutedTill: mutedTill
|
|
14692
14763
|
}));
|
|
14693
14764
|
case 47:
|
|
14694
|
-
|
|
14765
|
+
_context.n = 48;
|
|
14695
14766
|
return call(getActiveChannelId);
|
|
14696
14767
|
case 48:
|
|
14697
|
-
_activeChannelId4 =
|
|
14768
|
+
_activeChannelId4 = _context.v;
|
|
14698
14769
|
if (!(_activeChannelId4 === updatedChannel.id)) {
|
|
14699
|
-
|
|
14770
|
+
_context.n = 49;
|
|
14700
14771
|
break;
|
|
14701
14772
|
}
|
|
14702
|
-
|
|
14773
|
+
_context.n = 49;
|
|
14703
14774
|
return put(setActiveChannelAC(_extends({}, updatedChannel, {
|
|
14704
14775
|
metadata: isJSON(metadata) ? JSON.parse(metadata) : metadata
|
|
14705
14776
|
})));
|
|
14706
14777
|
case 49:
|
|
14707
14778
|
_groupName3 = getChannelGroupName(updatedChannel);
|
|
14708
|
-
|
|
14779
|
+
_context.n = 50;
|
|
14709
14780
|
return put(updateSearchedChannelDataAC(updatedChannel.id, {
|
|
14710
14781
|
subject: subject,
|
|
14711
14782
|
avatarUrl: avatarUrl,
|
|
@@ -14720,67 +14791,65 @@ function watchForEvents() {
|
|
|
14720
14791
|
mutedTill: mutedTill,
|
|
14721
14792
|
metadata: isJSON(metadata) ? JSON.parse(metadata) : metadata
|
|
14722
14793
|
});
|
|
14723
|
-
return
|
|
14794
|
+
return _context.a(3, 185);
|
|
14724
14795
|
case 51:
|
|
14725
14796
|
_channel5 = args.channel, message = args.message;
|
|
14726
14797
|
log.info('channel MESSAGE ... id : ', message.id, ', channel.id: ', _channel5.id);
|
|
14727
14798
|
messageToHandle = handleNewMessages ? handleNewMessages(message, _channel5) : message;
|
|
14728
14799
|
_channelFilterTypes = getChannelTypesFilter();
|
|
14729
14800
|
if (!(messageToHandle && _channel5 && (_channelFilterTypes !== null && _channelFilterTypes !== void 0 && _channelFilterTypes.length ? _channelFilterTypes.includes(_channel5.type) : true))) {
|
|
14730
|
-
|
|
14801
|
+
_context.n = 67;
|
|
14731
14802
|
break;
|
|
14732
14803
|
}
|
|
14733
14804
|
_channel5.metadata = isJSON(_channel5.metadata) ? JSON.parse(_channel5.metadata) : _channel5.metadata;
|
|
14734
|
-
|
|
14805
|
+
_context.n = 52;
|
|
14735
14806
|
return call(getActiveChannelId);
|
|
14736
14807
|
case 52:
|
|
14737
|
-
_activeChannelId5 =
|
|
14808
|
+
_activeChannelId5 = _context.v;
|
|
14738
14809
|
_channelExists6 = checkChannelExists(_channel5.id);
|
|
14739
14810
|
channelForAdd = JSON.parse(JSON.stringify(_channel5));
|
|
14740
|
-
|
|
14811
|
+
_context.n = 53;
|
|
14741
14812
|
return put(addChannelAC(channelForAdd));
|
|
14742
14813
|
case 53:
|
|
14743
14814
|
if (_channelExists6) {
|
|
14744
|
-
|
|
14815
|
+
_context.n = 55;
|
|
14745
14816
|
break;
|
|
14746
14817
|
}
|
|
14747
|
-
|
|
14818
|
+
_context.n = 54;
|
|
14748
14819
|
return call(setChannelInMap, _channel5);
|
|
14749
14820
|
case 54:
|
|
14750
|
-
|
|
14821
|
+
_context.n = 56;
|
|
14751
14822
|
break;
|
|
14752
14823
|
case 55:
|
|
14753
14824
|
if (message.repliedInThread) {
|
|
14754
|
-
|
|
14825
|
+
_context.n = 56;
|
|
14755
14826
|
break;
|
|
14756
14827
|
}
|
|
14757
|
-
|
|
14828
|
+
_context.n = 56;
|
|
14758
14829
|
return put(updateChannelLastMessageAC(message, channelForAdd));
|
|
14759
14830
|
case 56:
|
|
14760
14831
|
if (!(_channel5.id === _activeChannelId5)) {
|
|
14761
|
-
|
|
14832
|
+
_context.n = 58;
|
|
14762
14833
|
break;
|
|
14763
14834
|
}
|
|
14764
14835
|
if (getHasNextCached()) {
|
|
14765
|
-
|
|
14836
|
+
_context.n = 57;
|
|
14766
14837
|
break;
|
|
14767
14838
|
}
|
|
14768
|
-
|
|
14839
|
+
_context.n = 57;
|
|
14769
14840
|
return put(addMessageAC(message));
|
|
14770
14841
|
case 57:
|
|
14771
14842
|
addAllMessages([message], MESSAGE_LOAD_DIRECTION.NEXT);
|
|
14772
14843
|
hasNextMessage = store.getState().MessageReducer.messagesHasNext;
|
|
14773
14844
|
if (!(!getHasNextCached() && !hasNextMessage)) {
|
|
14774
|
-
|
|
14845
|
+
_context.n = 58;
|
|
14775
14846
|
break;
|
|
14776
14847
|
}
|
|
14777
|
-
|
|
14848
|
+
_context.n = 58;
|
|
14778
14849
|
return put(scrollToNewMessageAC(true, false, true));
|
|
14779
14850
|
case 58:
|
|
14780
|
-
|
|
14781
|
-
|
|
14782
|
-
}
|
|
14783
|
-
_context2.n = 59;
|
|
14851
|
+
addMessageToMap(_channel5.id, message);
|
|
14852
|
+
_context.n = 59;
|
|
14784
14853
|
return put(updateChannelDataAC(_channel5.id, {
|
|
14785
14854
|
messageCount: channelForAdd.messageCount,
|
|
14786
14855
|
unread: channelForAdd.unread,
|
|
@@ -14798,7 +14867,7 @@ function watchForEvents() {
|
|
|
14798
14867
|
}));
|
|
14799
14868
|
case 59:
|
|
14800
14869
|
_groupName4 = getChannelGroupName(_channel5);
|
|
14801
|
-
|
|
14870
|
+
_context.n = 60;
|
|
14802
14871
|
return put(updateSearchedChannelDataAC(_channel5.id, {
|
|
14803
14872
|
messageCount: channelForAdd.messageCount,
|
|
14804
14873
|
unread: channelForAdd.unread,
|
|
@@ -14817,25 +14886,25 @@ function watchForEvents() {
|
|
|
14817
14886
|
case 60:
|
|
14818
14887
|
showNotifications = getShowNotifications();
|
|
14819
14888
|
if (!(showNotifications && !message.silent && message.user.id !== SceytChatClient.user.id && !_channel5.muted)) {
|
|
14820
|
-
|
|
14889
|
+
_context.n = 63;
|
|
14821
14890
|
break;
|
|
14822
14891
|
}
|
|
14823
14892
|
if (!(Notification.permission === 'granted')) {
|
|
14824
|
-
|
|
14893
|
+
_context.n = 63;
|
|
14825
14894
|
break;
|
|
14826
14895
|
}
|
|
14827
|
-
|
|
14896
|
+
_context.n = 61;
|
|
14828
14897
|
return select(browserTabIsActiveSelector);
|
|
14829
14898
|
case 61:
|
|
14830
|
-
tabIsActive =
|
|
14899
|
+
tabIsActive = _context.v;
|
|
14831
14900
|
if (!(document.visibilityState !== 'visible' || !tabIsActive || _channel5.id !== _activeChannelId5)) {
|
|
14832
|
-
|
|
14901
|
+
_context.n = 63;
|
|
14833
14902
|
break;
|
|
14834
14903
|
}
|
|
14835
|
-
|
|
14904
|
+
_context.n = 62;
|
|
14836
14905
|
return select(contactsMapSelector);
|
|
14837
14906
|
case 62:
|
|
14838
|
-
contactsMap =
|
|
14907
|
+
contactsMap = _context.v;
|
|
14839
14908
|
_getFromContacts = getShowOnlyContactUsers();
|
|
14840
14909
|
state = store.getState();
|
|
14841
14910
|
theme = state.ThemeReducer.theme || 'light';
|
|
@@ -14856,16 +14925,16 @@ function watchForEvents() {
|
|
|
14856
14925
|
}) : undefined);
|
|
14857
14926
|
case 63:
|
|
14858
14927
|
if (!(message.repliedInThread && message.parentMessage.id)) {
|
|
14859
|
-
|
|
14928
|
+
_context.n = 65;
|
|
14860
14929
|
break;
|
|
14861
14930
|
}
|
|
14862
|
-
|
|
14931
|
+
_context.n = 64;
|
|
14863
14932
|
return put(markMessagesAsDeliveredAC(message.parentMessage.id, [message.id]));
|
|
14864
14933
|
case 64:
|
|
14865
|
-
|
|
14934
|
+
_context.n = 66;
|
|
14866
14935
|
break;
|
|
14867
14936
|
case 65:
|
|
14868
|
-
|
|
14937
|
+
_context.n = 66;
|
|
14869
14938
|
return put(markMessagesAsDeliveredAC(_channel5.id, [message.id]));
|
|
14870
14939
|
case 66:
|
|
14871
14940
|
updateChannelOnAllChannels(_channel5.id, {
|
|
@@ -14885,157 +14954,157 @@ function watchForEvents() {
|
|
|
14885
14954
|
});
|
|
14886
14955
|
updateChannelLastMessageOnAllChannels(_channel5.id, _channel5.lastMessage);
|
|
14887
14956
|
case 67:
|
|
14888
|
-
return
|
|
14957
|
+
return _context.a(3, 185);
|
|
14889
14958
|
case 68:
|
|
14890
14959
|
channelId = args.channelId, markerList = args.markerList;
|
|
14891
|
-
|
|
14960
|
+
_context.n = 69;
|
|
14892
14961
|
return call(getChannelFromMap, channelId);
|
|
14893
14962
|
case 69:
|
|
14894
|
-
_channel6 =
|
|
14963
|
+
_channel6 = _context.v;
|
|
14895
14964
|
log.info('channel MESSAGE_MARKERS_RECEIVED ... channel: ', _channel6, 'markers list: ', markerList);
|
|
14896
14965
|
if (!_channel6) {
|
|
14897
|
-
|
|
14966
|
+
_context.n = 80;
|
|
14898
14967
|
break;
|
|
14899
14968
|
}
|
|
14900
|
-
|
|
14969
|
+
_context.n = 70;
|
|
14901
14970
|
return call(getActiveChannelId);
|
|
14902
14971
|
case 70:
|
|
14903
|
-
_activeChannelId6 =
|
|
14972
|
+
_activeChannelId6 = _context.v;
|
|
14904
14973
|
updateLastMessage = false;
|
|
14905
14974
|
markersMap = {};
|
|
14906
14975
|
activeChannelMessages = getMessagesFromMap(_activeChannelId6);
|
|
14907
|
-
markerList.messageIds
|
|
14908
|
-
|
|
14909
|
-
|
|
14910
|
-
|
|
14911
|
-
|
|
14912
|
-
|
|
14913
|
-
|
|
14914
|
-
|
|
14915
|
-
|
|
14916
|
-
|
|
14917
|
-
|
|
14918
|
-
|
|
14919
|
-
|
|
14920
|
-
|
|
14921
|
-
|
|
14922
|
-
|
|
14923
|
-
|
|
14924
|
-
|
|
14925
|
-
|
|
14926
|
-
|
|
14927
|
-
|
|
14928
|
-
|
|
14929
|
-
|
|
14930
|
-
|
|
14931
|
-
|
|
14932
|
-
|
|
14933
|
-
|
|
14934
|
-
|
|
14935
|
-
|
|
14936
|
-
|
|
14937
|
-
|
|
14938
|
-
|
|
14939
|
-
|
|
14940
|
-
|
|
14941
|
-
|
|
14942
|
-
|
|
14943
|
-
|
|
14944
|
-
|
|
14945
|
-
}));
|
|
14976
|
+
_iterator = _createForOfIteratorHelperLoose(markerList.messageIds);
|
|
14977
|
+
case 71:
|
|
14978
|
+
if ((_step = _iterator()).done) {
|
|
14979
|
+
_context.n = 76;
|
|
14980
|
+
break;
|
|
14981
|
+
}
|
|
14982
|
+
messageId = _step.value;
|
|
14983
|
+
if (!(activeChannelMessages !== null && activeChannelMessages !== void 0 && activeChannelMessages[messageId])) {
|
|
14984
|
+
_context.n = 73;
|
|
14985
|
+
break;
|
|
14986
|
+
}
|
|
14987
|
+
_context.n = 72;
|
|
14988
|
+
return put(removePendingMessageAC(channelId, messageId));
|
|
14989
|
+
case 72:
|
|
14990
|
+
_context.n = 74;
|
|
14991
|
+
break;
|
|
14992
|
+
case 73:
|
|
14993
|
+
isPendingMessage = getMessageFromPendingMessagesMap(_activeChannelId6, messageId);
|
|
14994
|
+
if (isPendingMessage) {
|
|
14995
|
+
updatePendingMessageOnMap(_activeChannelId6, messageId, {
|
|
14996
|
+
deliveryStatus: markerList.name
|
|
14997
|
+
});
|
|
14998
|
+
}
|
|
14999
|
+
case 74:
|
|
15000
|
+
markersMap[messageId] = true;
|
|
15001
|
+
if (_channel6) {
|
|
15002
|
+
if (_channel6.lastMessage && messageId === _channel6.lastMessage.id && _channel6.lastMessage.deliveryStatus !== MESSAGE_DELIVERY_STATUS.READ) {
|
|
15003
|
+
updateLastMessage = true;
|
|
15004
|
+
}
|
|
15005
|
+
}
|
|
15006
|
+
updateChannelOnAllChannels(channelId, {}, {
|
|
15007
|
+
id: messageId,
|
|
15008
|
+
deliveryStatus: markerList.name
|
|
15009
|
+
});
|
|
15010
|
+
case 75:
|
|
15011
|
+
_context.n = 71;
|
|
15012
|
+
break;
|
|
15013
|
+
case 76:
|
|
14946
15014
|
if (!updateLastMessage) {
|
|
14947
|
-
|
|
15015
|
+
_context.n = 77;
|
|
14948
15016
|
break;
|
|
14949
15017
|
}
|
|
14950
15018
|
lastMessage = _extends({}, _channel6.lastMessage, {
|
|
14951
15019
|
deliveryStatus: markerList.name
|
|
14952
15020
|
});
|
|
14953
15021
|
updateChannelLastMessageOnAllChannels(_channel6.id, lastMessage);
|
|
14954
|
-
|
|
15022
|
+
_context.n = 77;
|
|
14955
15023
|
return put(updateChannelLastMessageStatusAC(lastMessage, _channel6));
|
|
14956
|
-
case
|
|
15024
|
+
case 77:
|
|
14957
15025
|
if (!(_activeChannelId6 === channelId)) {
|
|
14958
|
-
|
|
15026
|
+
_context.n = 79;
|
|
14959
15027
|
break;
|
|
14960
15028
|
}
|
|
14961
|
-
|
|
15029
|
+
_context.n = 78;
|
|
14962
15030
|
return put(updateMessagesStatusAC(markerList.name, markersMap));
|
|
14963
|
-
case
|
|
15031
|
+
case 78:
|
|
14964
15032
|
updateMarkersOnAllMessages(markersMap, markerList.name);
|
|
14965
|
-
case
|
|
15033
|
+
case 79:
|
|
14966
15034
|
updateMessageStatusOnMap(_channel6.id, {
|
|
14967
15035
|
name: markerList.name,
|
|
14968
15036
|
markersMap: markersMap
|
|
14969
15037
|
});
|
|
14970
|
-
|
|
15038
|
+
updateMessageStatusOnAllMessages(markerList.name, markersMap);
|
|
15039
|
+
_context.n = 80;
|
|
14971
15040
|
return put(updateMessagesMarkersAC(channelId, markerList.name, markerList));
|
|
14972
|
-
case
|
|
14973
|
-
return
|
|
14974
|
-
case
|
|
15041
|
+
case 80:
|
|
15042
|
+
return _context.a(3, 185);
|
|
15043
|
+
case 81:
|
|
14975
15044
|
_channelId = args.channelId;
|
|
14976
15045
|
log.info('channel DELETE ... ');
|
|
14977
15046
|
_channel7 = getChannelFromMap(_channelId);
|
|
14978
|
-
|
|
15047
|
+
_context.n = 82;
|
|
14979
15048
|
return put(setChannelToRemoveAC(_channel7));
|
|
14980
|
-
case
|
|
15049
|
+
case 82:
|
|
14981
15050
|
deleteChannelFromAllChannels(_channelId);
|
|
14982
|
-
return
|
|
14983
|
-
case
|
|
15051
|
+
return _context.a(3, 185);
|
|
15052
|
+
case 83:
|
|
14984
15053
|
_channel8 = args.channel, deletedMessage = args.deletedMessage;
|
|
14985
|
-
|
|
15054
|
+
_context.n = 84;
|
|
14986
15055
|
return call(getActiveChannelId);
|
|
14987
|
-
case
|
|
14988
|
-
_activeChannelId7 =
|
|
15056
|
+
case 84:
|
|
15057
|
+
_activeChannelId7 = _context.v;
|
|
14989
15058
|
log.info('channel DELETE_MESSAGE ... ');
|
|
14990
15059
|
_channelExists7 = checkChannelExists(_channel8.id);
|
|
14991
15060
|
if (!(_channel8.id === _activeChannelId7)) {
|
|
14992
|
-
|
|
15061
|
+
_context.n = 85;
|
|
14993
15062
|
break;
|
|
14994
15063
|
}
|
|
14995
15064
|
updateMessageOnAllMessages(deletedMessage.id, deletedMessage);
|
|
14996
|
-
|
|
15065
|
+
_context.n = 85;
|
|
14997
15066
|
return put(updateMessageAC(deletedMessage.id, deletedMessage));
|
|
14998
|
-
case
|
|
15067
|
+
case 85:
|
|
14999
15068
|
updateMessageOnMap(_channel8.id, {
|
|
15000
15069
|
messageId: deletedMessage.id,
|
|
15001
15070
|
params: deletedMessage
|
|
15002
15071
|
});
|
|
15003
15072
|
if (!_channelExists7) {
|
|
15004
|
-
|
|
15073
|
+
_context.n = 87;
|
|
15005
15074
|
break;
|
|
15006
15075
|
}
|
|
15007
|
-
|
|
15076
|
+
_context.n = 86;
|
|
15008
15077
|
return put(updateChannelDataAC(_channel8.id, {
|
|
15009
15078
|
newMessageCount: _channel8.newMessageCount,
|
|
15010
15079
|
muted: _channel8.muted,
|
|
15011
15080
|
mutedTill: _channel8.mutedTill
|
|
15012
15081
|
}));
|
|
15013
|
-
case
|
|
15082
|
+
case 86:
|
|
15014
15083
|
if (!(_channel8.lastMessage.id === deletedMessage.id)) {
|
|
15015
|
-
|
|
15084
|
+
_context.n = 87;
|
|
15016
15085
|
break;
|
|
15017
15086
|
}
|
|
15018
|
-
|
|
15087
|
+
_context.n = 87;
|
|
15019
15088
|
return put(updateChannelLastMessageAC(deletedMessage, _channel8));
|
|
15020
|
-
case
|
|
15089
|
+
case 87:
|
|
15021
15090
|
updateChannelOnAllChannels(_channel8.id, {
|
|
15022
15091
|
newMessageCount: _channel8.newMessageCount,
|
|
15023
15092
|
muted: _channel8.muted,
|
|
15024
15093
|
mutedTill: _channel8.mutedTill
|
|
15025
15094
|
}, deletedMessage);
|
|
15026
|
-
return
|
|
15027
|
-
case
|
|
15095
|
+
return _context.a(3, 185);
|
|
15096
|
+
case 88:
|
|
15028
15097
|
_channel9 = args.channel, _message = args.message;
|
|
15029
|
-
|
|
15098
|
+
_context.n = 89;
|
|
15030
15099
|
return call(getActiveChannelId);
|
|
15031
|
-
case
|
|
15032
|
-
_activeChannelId8 =
|
|
15100
|
+
case 89:
|
|
15101
|
+
_activeChannelId8 = _context.v;
|
|
15033
15102
|
_channelExists8 = checkChannelExists(_channel9.id);
|
|
15034
15103
|
if (!(_channel9.id === _activeChannelId8)) {
|
|
15035
|
-
|
|
15104
|
+
_context.n = 91;
|
|
15036
15105
|
break;
|
|
15037
15106
|
}
|
|
15038
|
-
|
|
15107
|
+
_context.n = 90;
|
|
15039
15108
|
return put(updateMessageAC(_message.id, {
|
|
15040
15109
|
body: _message.body,
|
|
15041
15110
|
state: _message.state,
|
|
@@ -15044,7 +15113,7 @@ function watchForEvents() {
|
|
|
15044
15113
|
mentionedUsers: _message.mentionedUsers,
|
|
15045
15114
|
updatedAt: _message.updatedAt
|
|
15046
15115
|
}));
|
|
15047
|
-
case
|
|
15116
|
+
case 90:
|
|
15048
15117
|
updateMessageOnAllMessages(_message.id, {
|
|
15049
15118
|
body: _message.body,
|
|
15050
15119
|
state: _message.state,
|
|
@@ -15053,18 +15122,18 @@ function watchForEvents() {
|
|
|
15053
15122
|
mentionedUsers: _message.mentionedUsers,
|
|
15054
15123
|
updatedAt: _message.updatedAt
|
|
15055
15124
|
});
|
|
15056
|
-
case
|
|
15125
|
+
case 91:
|
|
15057
15126
|
if (!_channelExists8) {
|
|
15058
|
-
|
|
15127
|
+
_context.n = 92;
|
|
15059
15128
|
break;
|
|
15060
15129
|
}
|
|
15061
15130
|
if (!(_channel9.lastMessage.id === _message.id)) {
|
|
15062
|
-
|
|
15131
|
+
_context.n = 92;
|
|
15063
15132
|
break;
|
|
15064
15133
|
}
|
|
15065
|
-
|
|
15134
|
+
_context.n = 92;
|
|
15066
15135
|
return put(updateChannelLastMessageAC(_message, _channel9));
|
|
15067
|
-
case
|
|
15136
|
+
case 92:
|
|
15068
15137
|
if (checkChannelExistsOnMessagesMap(_channel9.id)) {
|
|
15069
15138
|
updateMessageOnMap(_channel9.id, {
|
|
15070
15139
|
messageId: _message.id,
|
|
@@ -15072,39 +15141,39 @@ function watchForEvents() {
|
|
|
15072
15141
|
});
|
|
15073
15142
|
}
|
|
15074
15143
|
updateChannelOnAllChannels(_channel9.id, {}, _message);
|
|
15075
|
-
return
|
|
15076
|
-
case
|
|
15144
|
+
return _context.a(3, 185);
|
|
15145
|
+
case 93:
|
|
15077
15146
|
_channel0 = args.channel, user = args.user, _message2 = args.message, reaction = args.reaction;
|
|
15078
15147
|
isSelf = user.id === SceytChatClient.user.id;
|
|
15079
|
-
|
|
15148
|
+
_context.n = 94;
|
|
15080
15149
|
return call(getActiveChannelId);
|
|
15081
|
-
case
|
|
15082
|
-
_activeChannelId9 =
|
|
15150
|
+
case 94:
|
|
15151
|
+
_activeChannelId9 = _context.v;
|
|
15083
15152
|
if (!(_channel0.id === _activeChannelId9)) {
|
|
15084
|
-
|
|
15153
|
+
_context.n = 96;
|
|
15085
15154
|
break;
|
|
15086
15155
|
}
|
|
15087
|
-
|
|
15156
|
+
_context.n = 95;
|
|
15088
15157
|
return put(addReactionToMessageAC(_message2, reaction, isSelf));
|
|
15089
|
-
case
|
|
15158
|
+
case 95:
|
|
15090
15159
|
addReactionOnAllMessages(_message2, reaction, true);
|
|
15091
|
-
case
|
|
15160
|
+
case 96:
|
|
15092
15161
|
if (!(_message2.user.id === SceytChatClient.user.id)) {
|
|
15093
|
-
|
|
15162
|
+
_context.n = 100;
|
|
15094
15163
|
break;
|
|
15095
15164
|
}
|
|
15096
15165
|
if (!(!isSelf && Notification.permission === 'granted')) {
|
|
15097
|
-
|
|
15166
|
+
_context.n = 98;
|
|
15098
15167
|
break;
|
|
15099
15168
|
}
|
|
15100
15169
|
if (!(document.visibilityState !== 'visible' || _channel0.id !== _activeChannelId9)) {
|
|
15101
|
-
|
|
15170
|
+
_context.n = 98;
|
|
15102
15171
|
break;
|
|
15103
15172
|
}
|
|
15104
|
-
|
|
15173
|
+
_context.n = 97;
|
|
15105
15174
|
return select(contactsMapSelector);
|
|
15106
|
-
case
|
|
15107
|
-
_contactsMap =
|
|
15175
|
+
case 97:
|
|
15176
|
+
_contactsMap = _context.v;
|
|
15108
15177
|
_getFromContacts2 = getShowOnlyContactUsers();
|
|
15109
15178
|
_state = store.getState();
|
|
15110
15179
|
_theme = _state.ThemeReducer.theme || 'light';
|
|
@@ -15123,9 +15192,9 @@ function watchForEvents() {
|
|
|
15123
15192
|
setNotification(_messageBody, reaction.user, _channel0, reaction.key, _message2.attachments && _message2.attachments.length ? _message2.attachments.find(function (att) {
|
|
15124
15193
|
return att.type !== attachmentTypes.link;
|
|
15125
15194
|
}) : undefined);
|
|
15126
|
-
case
|
|
15195
|
+
case 98:
|
|
15127
15196
|
if (!(_channel0.newReactions && _channel0.newReactions.length)) {
|
|
15128
|
-
|
|
15197
|
+
_context.n = 99;
|
|
15129
15198
|
break;
|
|
15130
15199
|
}
|
|
15131
15200
|
channelUpdateParams = {
|
|
@@ -15135,9 +15204,9 @@ function watchForEvents() {
|
|
|
15135
15204
|
muted: _channel0.muted,
|
|
15136
15205
|
mutedTill: _channel0.mutedTill
|
|
15137
15206
|
};
|
|
15138
|
-
|
|
15207
|
+
_context.n = 99;
|
|
15139
15208
|
return put(updateChannelDataAC(_channel0.id, channelUpdateParams));
|
|
15140
|
-
case
|
|
15209
|
+
case 99:
|
|
15141
15210
|
updateChannelOnAllChannels(_channel0.id, {
|
|
15142
15211
|
userMessageReactions: _channel0.newReactions,
|
|
15143
15212
|
lastReactedMessage: _message2,
|
|
@@ -15145,31 +15214,31 @@ function watchForEvents() {
|
|
|
15145
15214
|
muted: _channel0.muted,
|
|
15146
15215
|
mutedTill: _channel0.mutedTill
|
|
15147
15216
|
});
|
|
15148
|
-
case
|
|
15217
|
+
case 100:
|
|
15149
15218
|
if (checkChannelExistsOnMessagesMap(_channel0.id)) {
|
|
15150
15219
|
addReactionToMessageOnMap(_channel0.id, _message2, reaction, true);
|
|
15151
15220
|
}
|
|
15152
|
-
return
|
|
15153
|
-
case
|
|
15154
|
-
_channel1 = args.channel, pollDetails = args.pollDetails,
|
|
15221
|
+
return _context.a(3, 185);
|
|
15222
|
+
case 101:
|
|
15223
|
+
_channel1 = args.channel, pollDetails = args.pollDetails, _messageId = args.messageId;
|
|
15155
15224
|
pollDetailsData = pollDetails;
|
|
15156
|
-
|
|
15225
|
+
_context.n = 102;
|
|
15157
15226
|
return call(getActiveChannelId);
|
|
15158
|
-
case
|
|
15159
|
-
_activeChannelId0 =
|
|
15227
|
+
case 102:
|
|
15228
|
+
_activeChannelId0 = _context.v;
|
|
15160
15229
|
addedVotes = (pollDetailsData === null || pollDetailsData === void 0 ? void 0 : (_pollDetailsData$chan = pollDetailsData.changedVotes) === null || _pollDetailsData$chan === void 0 ? void 0 : _pollDetailsData$chan.addedVotes) || [];
|
|
15161
15230
|
deletedVotes = (pollDetailsData === null || pollDetailsData === void 0 ? void 0 : (_pollDetailsData$chan2 = pollDetailsData.changedVotes) === null || _pollDetailsData$chan2 === void 0 ? void 0 : _pollDetailsData$chan2.removedVotes) || [];
|
|
15162
15231
|
objs = [];
|
|
15163
|
-
for (
|
|
15164
|
-
vote =
|
|
15232
|
+
for (_iterator2 = _createForOfIteratorHelperLoose(deletedVotes); !(_step2 = _iterator2()).done;) {
|
|
15233
|
+
vote = _step2.value;
|
|
15165
15234
|
objs.push({
|
|
15166
15235
|
type: vote.user.id === SceytChatClient.user.id ? 'deleteOwn' : 'delete',
|
|
15167
15236
|
vote: vote,
|
|
15168
15237
|
incrementVotesPerOptionCount: -((deletedVotes === null || deletedVotes === void 0 ? void 0 : deletedVotes.length) || 0)
|
|
15169
15238
|
});
|
|
15170
15239
|
}
|
|
15171
|
-
for (
|
|
15172
|
-
_vote =
|
|
15240
|
+
for (_iterator3 = _createForOfIteratorHelperLoose(addedVotes); !(_step3 = _iterator3()).done;) {
|
|
15241
|
+
_vote = _step3.value;
|
|
15173
15242
|
objs.push({
|
|
15174
15243
|
type: _vote.user.id === SceytChatClient.user.id ? 'addOwn' : 'add',
|
|
15175
15244
|
vote: _vote,
|
|
@@ -15177,44 +15246,44 @@ function watchForEvents() {
|
|
|
15177
15246
|
});
|
|
15178
15247
|
}
|
|
15179
15248
|
_i = 0, _objs = objs;
|
|
15180
|
-
case
|
|
15249
|
+
case 103:
|
|
15181
15250
|
if (!(_i < _objs.length)) {
|
|
15182
|
-
|
|
15251
|
+
_context.n = 107;
|
|
15183
15252
|
break;
|
|
15184
15253
|
}
|
|
15185
15254
|
obj = _objs[_i];
|
|
15186
15255
|
if (!(pollDetailsData !== null && pollDetailsData !== void 0 && pollDetailsData.id && obj.vote)) {
|
|
15187
|
-
|
|
15256
|
+
_context.n = 106;
|
|
15188
15257
|
break;
|
|
15189
15258
|
}
|
|
15190
15259
|
key = pollDetailsData.id + "_" + obj.vote.optionId;
|
|
15191
15260
|
hasNext = ((_store$getState$Messa = store.getState().MessageReducer.pollVotesHasMore) === null || _store$getState$Messa === void 0 ? void 0 : _store$getState$Messa[key]) || false;
|
|
15192
15261
|
if (!(obj.type === 'addOwn')) {
|
|
15193
|
-
|
|
15262
|
+
_context.n = 105;
|
|
15194
15263
|
break;
|
|
15195
15264
|
}
|
|
15196
|
-
|
|
15265
|
+
_context.n = 104;
|
|
15197
15266
|
return put(addPollVotesToListAC(pollDetailsData.id, obj.vote.optionId, [obj.vote], hasNext, undefined));
|
|
15198
|
-
case
|
|
15199
|
-
|
|
15267
|
+
case 104:
|
|
15268
|
+
_context.n = 106;
|
|
15200
15269
|
break;
|
|
15201
|
-
case
|
|
15202
|
-
|
|
15203
|
-
return put(deletePollVotesFromListAC(pollDetailsData.id, obj.vote.optionId, [obj.vote],
|
|
15204
|
-
case
|
|
15270
|
+
case 105:
|
|
15271
|
+
_context.n = 106;
|
|
15272
|
+
return put(deletePollVotesFromListAC(pollDetailsData.id, obj.vote.optionId, [obj.vote], _messageId));
|
|
15273
|
+
case 106:
|
|
15205
15274
|
_i++;
|
|
15206
|
-
|
|
15275
|
+
_context.n = 103;
|
|
15207
15276
|
break;
|
|
15208
|
-
case
|
|
15277
|
+
case 107:
|
|
15209
15278
|
_i2 = 0, _objs2 = objs;
|
|
15210
|
-
case
|
|
15279
|
+
case 108:
|
|
15211
15280
|
if (!(_i2 < _objs2.length)) {
|
|
15212
|
-
|
|
15281
|
+
_context.n = 110;
|
|
15213
15282
|
break;
|
|
15214
15283
|
}
|
|
15215
15284
|
_obj = _objs2[_i2];
|
|
15216
15285
|
updateMessageOnMap(_channel1.id, {
|
|
15217
|
-
messageId:
|
|
15286
|
+
messageId: _messageId,
|
|
15218
15287
|
params: {}
|
|
15219
15288
|
}, {
|
|
15220
15289
|
type: _obj.type,
|
|
@@ -15222,29 +15291,29 @@ function watchForEvents() {
|
|
|
15222
15291
|
incrementVotesPerOptionCount: _obj.incrementVotesPerOptionCount
|
|
15223
15292
|
});
|
|
15224
15293
|
if (!(_channel1.id === _activeChannelId0)) {
|
|
15225
|
-
|
|
15294
|
+
_context.n = 109;
|
|
15226
15295
|
break;
|
|
15227
15296
|
}
|
|
15228
|
-
updateMessageOnAllMessages(
|
|
15229
|
-
|
|
15230
|
-
return put(updateMessageAC(
|
|
15231
|
-
case
|
|
15297
|
+
updateMessageOnAllMessages(_messageId, {}, _obj);
|
|
15298
|
+
_context.n = 109;
|
|
15299
|
+
return put(updateMessageAC(_messageId, {}, undefined, _obj));
|
|
15300
|
+
case 109:
|
|
15232
15301
|
_i2++;
|
|
15233
|
-
|
|
15302
|
+
_context.n = 108;
|
|
15234
15303
|
break;
|
|
15235
|
-
case
|
|
15236
|
-
return
|
|
15237
|
-
case
|
|
15238
|
-
_channel10 = args.channel, _pollDetails = args.pollDetails,
|
|
15304
|
+
case 110:
|
|
15305
|
+
return _context.a(3, 185);
|
|
15306
|
+
case 111:
|
|
15307
|
+
_channel10 = args.channel, _pollDetails = args.pollDetails, _messageId2 = args.messageId;
|
|
15239
15308
|
_pollDetailsData = _pollDetails;
|
|
15240
|
-
|
|
15309
|
+
_context.n = 112;
|
|
15241
15310
|
return call(getActiveChannelId);
|
|
15242
|
-
case
|
|
15243
|
-
_activeChannelId1 =
|
|
15311
|
+
case 112:
|
|
15312
|
+
_activeChannelId1 = _context.v;
|
|
15244
15313
|
_deletedVotes = (_pollDetailsData === null || _pollDetailsData === void 0 ? void 0 : (_pollDetailsData$chan3 = _pollDetailsData.changedVotes) === null || _pollDetailsData$chan3 === void 0 ? void 0 : _pollDetailsData$chan3.removedVotes) || [];
|
|
15245
15314
|
_objs3 = [];
|
|
15246
|
-
for (
|
|
15247
|
-
_vote2 =
|
|
15315
|
+
for (_iterator4 = _createForOfIteratorHelperLoose(_deletedVotes); !(_step4 = _iterator4()).done;) {
|
|
15316
|
+
_vote2 = _step4.value;
|
|
15248
15317
|
_objs3.push({
|
|
15249
15318
|
type: _vote2.user.id === SceytChatClient.user.id ? 'deleteOwn' : 'delete',
|
|
15250
15319
|
vote: _vote2,
|
|
@@ -15252,58 +15321,58 @@ function watchForEvents() {
|
|
|
15252
15321
|
});
|
|
15253
15322
|
}
|
|
15254
15323
|
_i3 = 0, _objs4 = _objs3;
|
|
15255
|
-
case
|
|
15324
|
+
case 113:
|
|
15256
15325
|
if (!(_i3 < _objs4.length)) {
|
|
15257
|
-
|
|
15326
|
+
_context.n = 115;
|
|
15258
15327
|
break;
|
|
15259
15328
|
}
|
|
15260
15329
|
_obj2 = _objs4[_i3];
|
|
15261
15330
|
if (!(_pollDetailsData !== null && _pollDetailsData !== void 0 && _pollDetailsData.id && _obj2.vote)) {
|
|
15262
|
-
|
|
15331
|
+
_context.n = 114;
|
|
15263
15332
|
break;
|
|
15264
15333
|
}
|
|
15265
|
-
|
|
15266
|
-
return put(deletePollVotesFromListAC(_pollDetailsData.id, _obj2.vote.optionId, [_obj2.vote],
|
|
15267
|
-
case
|
|
15334
|
+
_context.n = 114;
|
|
15335
|
+
return put(deletePollVotesFromListAC(_pollDetailsData.id, _obj2.vote.optionId, [_obj2.vote], _messageId2));
|
|
15336
|
+
case 114:
|
|
15268
15337
|
_i3++;
|
|
15269
|
-
|
|
15338
|
+
_context.n = 113;
|
|
15270
15339
|
break;
|
|
15271
|
-
case
|
|
15340
|
+
case 115:
|
|
15272
15341
|
_i4 = 0, _objs5 = _objs3;
|
|
15273
|
-
case
|
|
15342
|
+
case 116:
|
|
15274
15343
|
if (!(_i4 < _objs5.length)) {
|
|
15275
|
-
|
|
15344
|
+
_context.n = 118;
|
|
15276
15345
|
break;
|
|
15277
15346
|
}
|
|
15278
15347
|
_obj3 = _objs5[_i4];
|
|
15279
15348
|
updateMessageOnMap(_channel10.id, {
|
|
15280
|
-
messageId:
|
|
15349
|
+
messageId: _messageId2,
|
|
15281
15350
|
params: {}
|
|
15282
15351
|
}, _obj3);
|
|
15283
15352
|
if (!(_channel10.id === _activeChannelId1)) {
|
|
15284
|
-
|
|
15353
|
+
_context.n = 117;
|
|
15285
15354
|
break;
|
|
15286
15355
|
}
|
|
15287
|
-
updateMessageOnAllMessages(
|
|
15288
|
-
|
|
15289
|
-
return put(updateMessageAC(
|
|
15290
|
-
case
|
|
15356
|
+
updateMessageOnAllMessages(_messageId2, {}, _obj3);
|
|
15357
|
+
_context.n = 117;
|
|
15358
|
+
return put(updateMessageAC(_messageId2, {}, undefined, _obj3));
|
|
15359
|
+
case 117:
|
|
15291
15360
|
_i4++;
|
|
15292
|
-
|
|
15361
|
+
_context.n = 116;
|
|
15293
15362
|
break;
|
|
15294
|
-
case
|
|
15295
|
-
return
|
|
15296
|
-
case
|
|
15297
|
-
_channel11 = args.channel, _pollDetails2 = args.pollDetails,
|
|
15298
|
-
|
|
15363
|
+
case 118:
|
|
15364
|
+
return _context.a(3, 185);
|
|
15365
|
+
case 119:
|
|
15366
|
+
_channel11 = args.channel, _pollDetails2 = args.pollDetails, _messageId3 = args.messageId;
|
|
15367
|
+
_context.n = 120;
|
|
15299
15368
|
return call(getActiveChannelId);
|
|
15300
|
-
case
|
|
15301
|
-
_activeChannelId10 =
|
|
15369
|
+
case 120:
|
|
15370
|
+
_activeChannelId10 = _context.v;
|
|
15302
15371
|
_pollDetailsData2 = _pollDetails2;
|
|
15303
15372
|
retractedVotes = (_pollDetailsData2 === null || _pollDetailsData2 === void 0 ? void 0 : (_pollDetailsData2$cha = _pollDetailsData2.changedVotes) === null || _pollDetailsData2$cha === void 0 ? void 0 : _pollDetailsData2$cha.removedVotes) || [];
|
|
15304
15373
|
_objs6 = [];
|
|
15305
|
-
for (
|
|
15306
|
-
_vote4 =
|
|
15374
|
+
for (_iterator5 = _createForOfIteratorHelperLoose(retractedVotes); !(_step5 = _iterator5()).done;) {
|
|
15375
|
+
_vote4 = _step5.value;
|
|
15307
15376
|
_objs6.push({
|
|
15308
15377
|
type: _vote4.user.id === SceytChatClient.user.id ? 'deleteOwn' : 'delete',
|
|
15309
15378
|
vote: _vote4,
|
|
@@ -15311,109 +15380,109 @@ function watchForEvents() {
|
|
|
15311
15380
|
});
|
|
15312
15381
|
}
|
|
15313
15382
|
_i5 = 0, _objs7 = _objs6;
|
|
15314
|
-
case
|
|
15383
|
+
case 121:
|
|
15315
15384
|
if (!(_i5 < _objs7.length)) {
|
|
15316
|
-
|
|
15385
|
+
_context.n = 126;
|
|
15317
15386
|
break;
|
|
15318
15387
|
}
|
|
15319
15388
|
_obj4 = _objs7[_i5];
|
|
15320
15389
|
updateMessageOnMap(_channel11.id, {
|
|
15321
|
-
messageId:
|
|
15390
|
+
messageId: _messageId3,
|
|
15322
15391
|
params: {}
|
|
15323
15392
|
}, _obj4);
|
|
15324
15393
|
if (!(_pollDetailsData2 !== null && _pollDetailsData2 !== void 0 && _pollDetailsData2.id && retractedVotes.length > 0)) {
|
|
15325
|
-
|
|
15394
|
+
_context.n = 124;
|
|
15326
15395
|
break;
|
|
15327
15396
|
}
|
|
15328
|
-
|
|
15329
|
-
case
|
|
15330
|
-
if ((
|
|
15331
|
-
|
|
15397
|
+
_iterator6 = _createForOfIteratorHelperLoose(retractedVotes);
|
|
15398
|
+
case 122:
|
|
15399
|
+
if ((_step6 = _iterator6()).done) {
|
|
15400
|
+
_context.n = 124;
|
|
15332
15401
|
break;
|
|
15333
15402
|
}
|
|
15334
|
-
_vote3 =
|
|
15335
|
-
|
|
15336
|
-
return put(deletePollVotesFromListAC(_pollDetailsData2.id, _vote3.optionId, [_vote3],
|
|
15337
|
-
case
|
|
15338
|
-
|
|
15403
|
+
_vote3 = _step6.value;
|
|
15404
|
+
_context.n = 123;
|
|
15405
|
+
return put(deletePollVotesFromListAC(_pollDetailsData2.id, _vote3.optionId, [_vote3], _messageId3));
|
|
15406
|
+
case 123:
|
|
15407
|
+
_context.n = 122;
|
|
15339
15408
|
break;
|
|
15340
|
-
case
|
|
15409
|
+
case 124:
|
|
15341
15410
|
if (!(_channel11.id === _activeChannelId10)) {
|
|
15342
|
-
|
|
15411
|
+
_context.n = 125;
|
|
15343
15412
|
break;
|
|
15344
15413
|
}
|
|
15345
|
-
updateMessageOnAllMessages(
|
|
15346
|
-
|
|
15347
|
-
return put(updateMessageAC(
|
|
15348
|
-
case
|
|
15414
|
+
updateMessageOnAllMessages(_messageId3, {}, _obj4);
|
|
15415
|
+
_context.n = 125;
|
|
15416
|
+
return put(updateMessageAC(_messageId3, {}, undefined, _obj4));
|
|
15417
|
+
case 125:
|
|
15349
15418
|
_i5++;
|
|
15350
|
-
|
|
15419
|
+
_context.n = 121;
|
|
15351
15420
|
break;
|
|
15352
|
-
case
|
|
15353
|
-
return
|
|
15354
|
-
case
|
|
15355
|
-
_channel12 = args.channel,
|
|
15356
|
-
|
|
15421
|
+
case 126:
|
|
15422
|
+
return _context.a(3, 185);
|
|
15423
|
+
case 127:
|
|
15424
|
+
_channel12 = args.channel, _messageId4 = args.messageId;
|
|
15425
|
+
_context.n = 128;
|
|
15357
15426
|
return call(getActiveChannelId);
|
|
15358
|
-
case
|
|
15359
|
-
_activeChannelId11 =
|
|
15427
|
+
case 128:
|
|
15428
|
+
_activeChannelId11 = _context.v;
|
|
15360
15429
|
_obj5 = {
|
|
15361
15430
|
type: 'close',
|
|
15362
15431
|
incrementVotesPerOptionCount: 0
|
|
15363
15432
|
};
|
|
15364
15433
|
updateMessageOnMap(_channel12.id, {
|
|
15365
|
-
messageId:
|
|
15434
|
+
messageId: _messageId4,
|
|
15366
15435
|
params: {}
|
|
15367
15436
|
}, _obj5);
|
|
15368
15437
|
if (!(_channel12.id === _activeChannelId11)) {
|
|
15369
|
-
|
|
15438
|
+
_context.n = 130;
|
|
15370
15439
|
break;
|
|
15371
15440
|
}
|
|
15372
|
-
updateMessageOnAllMessages(
|
|
15373
|
-
|
|
15374
|
-
return put(updateMessageAC(
|
|
15375
|
-
case
|
|
15376
|
-
return
|
|
15377
|
-
case
|
|
15378
|
-
return
|
|
15379
|
-
case
|
|
15441
|
+
updateMessageOnAllMessages(_messageId4, {}, _obj5);
|
|
15442
|
+
_context.n = 129;
|
|
15443
|
+
return put(updateMessageAC(_messageId4, {}, undefined, _obj5));
|
|
15444
|
+
case 129:
|
|
15445
|
+
return _context.a(3, 185);
|
|
15446
|
+
case 130:
|
|
15447
|
+
return _context.a(3, 185);
|
|
15448
|
+
case 131:
|
|
15380
15449
|
_channel13 = args.channel, _user = args.user, _message3 = args.message, _reaction = args.reaction;
|
|
15381
15450
|
log.info('channel REACTION_DELETED ... ', _channel13);
|
|
15382
15451
|
channelFromMap = getChannelFromMap(_channel13.id);
|
|
15383
15452
|
_isSelf = _user.id === SceytChatClient.user.id;
|
|
15384
|
-
|
|
15453
|
+
_context.n = 132;
|
|
15385
15454
|
return call(getActiveChannelId);
|
|
15386
|
-
case
|
|
15387
|
-
_activeChannelId12 =
|
|
15455
|
+
case 132:
|
|
15456
|
+
_activeChannelId12 = _context.v;
|
|
15388
15457
|
if (!(_channel13.id === _activeChannelId12)) {
|
|
15389
|
-
|
|
15458
|
+
_context.n = 134;
|
|
15390
15459
|
break;
|
|
15391
15460
|
}
|
|
15392
|
-
|
|
15461
|
+
_context.n = 133;
|
|
15393
15462
|
return put(deleteReactionFromMessageAC(_message3, _reaction, _isSelf));
|
|
15394
|
-
case
|
|
15463
|
+
case 133:
|
|
15395
15464
|
removeReactionOnAllMessages(_message3, _reaction, true);
|
|
15396
|
-
case
|
|
15465
|
+
case 134:
|
|
15397
15466
|
_channelUpdateParams = JSON.parse(JSON.stringify(_channel13));
|
|
15398
15467
|
if (channelFromMap && channelFromMap.lastReactedMessage && channelFromMap.lastReactedMessage.id === _message3.id) {
|
|
15399
15468
|
_channelUpdateParams.lastReactedMessage = null;
|
|
15400
15469
|
}
|
|
15401
|
-
|
|
15470
|
+
_context.n = 135;
|
|
15402
15471
|
return put(updateChannelDataAC(_channel13.id, _channelUpdateParams));
|
|
15403
|
-
case
|
|
15472
|
+
case 135:
|
|
15404
15473
|
updateChannelOnAllChannels(_channel13.id, _channelUpdateParams);
|
|
15405
15474
|
if (checkChannelExistsOnMessagesMap(_channel13.id)) {
|
|
15406
15475
|
removeReactionToMessageOnMap(_channel13.id, _message3, _reaction, true);
|
|
15407
15476
|
}
|
|
15408
|
-
return
|
|
15409
|
-
case
|
|
15477
|
+
return _context.a(3, 185);
|
|
15478
|
+
case 136:
|
|
15410
15479
|
_channel14 = args.channel;
|
|
15411
15480
|
if (!_channel14) {
|
|
15412
|
-
|
|
15481
|
+
_context.n = 138;
|
|
15413
15482
|
break;
|
|
15414
15483
|
}
|
|
15415
15484
|
_updatedChannel = JSON.parse(JSON.stringify(_channel14));
|
|
15416
|
-
|
|
15485
|
+
_context.n = 137;
|
|
15417
15486
|
return put(updateChannelDataAC(_channel14.id, {
|
|
15418
15487
|
lastMessage: _channel14.lastMessage,
|
|
15419
15488
|
newMessageCount: _channel14.newMessageCount,
|
|
@@ -15426,36 +15495,36 @@ function watchForEvents() {
|
|
|
15426
15495
|
lastDisplayedMessageId: _channel14.lastDisplayedMessageId,
|
|
15427
15496
|
messageRetentionPeriod: _channel14.messageRetentionPeriod
|
|
15428
15497
|
}));
|
|
15429
|
-
case
|
|
15498
|
+
case 137:
|
|
15430
15499
|
updateChannelOnAllChannels(_channel14.id, _updatedChannel);
|
|
15431
|
-
case
|
|
15432
|
-
return
|
|
15433
|
-
case
|
|
15500
|
+
case 138:
|
|
15501
|
+
return _context.a(3, 185);
|
|
15502
|
+
case 139:
|
|
15434
15503
|
_channel15 = args.channel;
|
|
15435
15504
|
log.info('CLEAR_HISTORY: ', _channel15);
|
|
15436
|
-
|
|
15505
|
+
_context.n = 140;
|
|
15437
15506
|
return call(getActiveChannelId);
|
|
15438
|
-
case
|
|
15439
|
-
_activeChannelId13 =
|
|
15440
|
-
|
|
15507
|
+
case 140:
|
|
15508
|
+
_activeChannelId13 = _context.v;
|
|
15509
|
+
_context.n = 141;
|
|
15441
15510
|
return call(checkChannelExists, _channel15.id);
|
|
15442
|
-
case
|
|
15443
|
-
channelExist =
|
|
15511
|
+
case 141:
|
|
15512
|
+
channelExist = _context.v;
|
|
15444
15513
|
if (!(_channel15.id === _activeChannelId13)) {
|
|
15445
|
-
|
|
15514
|
+
_context.n = 143;
|
|
15446
15515
|
break;
|
|
15447
15516
|
}
|
|
15448
|
-
|
|
15517
|
+
_context.n = 142;
|
|
15449
15518
|
return put(clearMessagesAC());
|
|
15450
|
-
case
|
|
15519
|
+
case 142:
|
|
15451
15520
|
removeAllMessages();
|
|
15452
|
-
case
|
|
15521
|
+
case 143:
|
|
15453
15522
|
removeMessagesFromMap(_channel15.id);
|
|
15454
15523
|
if (!channelExist) {
|
|
15455
|
-
|
|
15524
|
+
_context.n = 144;
|
|
15456
15525
|
break;
|
|
15457
15526
|
}
|
|
15458
|
-
|
|
15527
|
+
_context.n = 144;
|
|
15459
15528
|
return put(updateChannelDataAC(_channel15.id, {
|
|
15460
15529
|
lastMessage: null,
|
|
15461
15530
|
newMessageCount: 0,
|
|
@@ -15463,7 +15532,7 @@ function watchForEvents() {
|
|
|
15463
15532
|
muted: _channel15.muted,
|
|
15464
15533
|
mutedTill: _channel15.mutedTill
|
|
15465
15534
|
}));
|
|
15466
|
-
case
|
|
15535
|
+
case 144:
|
|
15467
15536
|
updateChannelOnAllChannels(_channel15.id, {
|
|
15468
15537
|
lastMessage: null,
|
|
15469
15538
|
newMessageCount: 0,
|
|
@@ -15471,173 +15540,173 @@ function watchForEvents() {
|
|
|
15471
15540
|
muted: _channel15.muted,
|
|
15472
15541
|
mutedTill: _channel15.mutedTill
|
|
15473
15542
|
});
|
|
15474
|
-
return
|
|
15475
|
-
case
|
|
15543
|
+
return _context.a(3, 185);
|
|
15544
|
+
case 145:
|
|
15476
15545
|
_channel16 = args.channel;
|
|
15477
15546
|
log.info('channel MUTE ... ');
|
|
15478
|
-
|
|
15547
|
+
_context.n = 146;
|
|
15479
15548
|
return put(updateChannelDataAC(_channel16.id, {
|
|
15480
15549
|
muted: _channel16.muted,
|
|
15481
15550
|
mutedTill: _channel16.mutedTill
|
|
15482
15551
|
}));
|
|
15483
|
-
case
|
|
15552
|
+
case 146:
|
|
15484
15553
|
updateChannelOnAllChannels(_channel16.id, {
|
|
15485
15554
|
muted: _channel16.muted,
|
|
15486
15555
|
mutedTill: _channel16.mutedTill
|
|
15487
15556
|
});
|
|
15488
|
-
return
|
|
15489
|
-
case
|
|
15557
|
+
return _context.a(3, 185);
|
|
15558
|
+
case 147:
|
|
15490
15559
|
_channel17 = args.channel;
|
|
15491
15560
|
log.info('channel UNMUTE ... ');
|
|
15492
|
-
|
|
15561
|
+
_context.n = 148;
|
|
15493
15562
|
return put(updateChannelDataAC(_channel17.id, {
|
|
15494
15563
|
muted: _channel17.muted,
|
|
15495
15564
|
mutedTill: _channel17.mutedTill
|
|
15496
15565
|
}));
|
|
15497
|
-
case
|
|
15566
|
+
case 148:
|
|
15498
15567
|
updateChannelOnAllChannels(_channel17.id, {
|
|
15499
15568
|
muted: _channel17.muted,
|
|
15500
15569
|
mutedTill: _channel17.mutedTill
|
|
15501
15570
|
});
|
|
15502
|
-
return
|
|
15503
|
-
case
|
|
15571
|
+
return _context.a(3, 185);
|
|
15572
|
+
case 149:
|
|
15504
15573
|
_channel18 = args.channel;
|
|
15505
15574
|
log.info('channel PINED ... ');
|
|
15506
|
-
|
|
15575
|
+
_context.n = 150;
|
|
15507
15576
|
return put(updateChannelDataAC(_channel18.id, {
|
|
15508
15577
|
pinnedAt: _channel18.pinnedAt
|
|
15509
15578
|
}, true));
|
|
15510
|
-
case
|
|
15579
|
+
case 150:
|
|
15511
15580
|
updateChannelOnAllChannels(_channel18.id, {
|
|
15512
15581
|
pinnedAt: _channel18.pinnedAt
|
|
15513
15582
|
});
|
|
15514
|
-
return
|
|
15515
|
-
case
|
|
15583
|
+
return _context.a(3, 185);
|
|
15584
|
+
case 151:
|
|
15516
15585
|
_channel19 = args.channel;
|
|
15517
15586
|
log.info('channel UNPINED ... ');
|
|
15518
|
-
|
|
15587
|
+
_context.n = 152;
|
|
15519
15588
|
return put(updateChannelDataAC(_channel19.id, {
|
|
15520
15589
|
pinnedAt: _channel19.pinnedAt
|
|
15521
15590
|
}, false, true));
|
|
15522
|
-
case
|
|
15591
|
+
case 152:
|
|
15523
15592
|
updateChannelOnAllChannels(_channel19.id, {
|
|
15524
15593
|
pinnedAt: _channel19.pinnedAt
|
|
15525
15594
|
});
|
|
15526
|
-
return
|
|
15527
|
-
case
|
|
15595
|
+
return _context.a(3, 185);
|
|
15596
|
+
case 153:
|
|
15528
15597
|
_channel20 = args.channel;
|
|
15529
15598
|
log.info('channel HIDE ... ');
|
|
15530
|
-
|
|
15599
|
+
_context.n = 154;
|
|
15531
15600
|
return put(setChannelToHideAC(_channel20));
|
|
15532
|
-
case
|
|
15533
|
-
return
|
|
15534
|
-
case
|
|
15601
|
+
case 154:
|
|
15602
|
+
return _context.a(3, 185);
|
|
15603
|
+
case 155:
|
|
15535
15604
|
_channel21 = args.channel;
|
|
15536
15605
|
log.info('channel UNHIDE ... ');
|
|
15537
|
-
|
|
15606
|
+
_context.n = 156;
|
|
15538
15607
|
return put(setChannelToUnHideAC(_channel21));
|
|
15539
|
-
case
|
|
15540
|
-
return
|
|
15541
|
-
case
|
|
15608
|
+
case 156:
|
|
15609
|
+
return _context.a(3, 185);
|
|
15610
|
+
case 157:
|
|
15542
15611
|
_channel22 = args.channel;
|
|
15543
|
-
|
|
15612
|
+
_context.n = 158;
|
|
15544
15613
|
return put(updateChannelDataAC(_channel22.id, {
|
|
15545
15614
|
unread: _channel22.unread,
|
|
15546
15615
|
muted: _channel22.muted,
|
|
15547
15616
|
mutedTill: _channel22.mutedTill
|
|
15548
15617
|
}));
|
|
15549
|
-
case
|
|
15618
|
+
case 158:
|
|
15550
15619
|
_groupName5 = getChannelGroupName(_channel22);
|
|
15551
|
-
|
|
15620
|
+
_context.n = 159;
|
|
15552
15621
|
return put(updateSearchedChannelDataAC(_channel22.id, {
|
|
15553
15622
|
unread: _channel22.unread
|
|
15554
15623
|
}, _groupName5));
|
|
15555
|
-
case
|
|
15624
|
+
case 159:
|
|
15556
15625
|
updateChannelOnAllChannels(_channel22.id, {
|
|
15557
15626
|
unread: _channel22.unread
|
|
15558
15627
|
});
|
|
15559
|
-
return
|
|
15560
|
-
case
|
|
15628
|
+
return _context.a(3, 185);
|
|
15629
|
+
case 160:
|
|
15561
15630
|
_channel23 = args.channel;
|
|
15562
|
-
|
|
15631
|
+
_context.n = 161;
|
|
15563
15632
|
return put(updateChannelDataAC(_channel23.id, {
|
|
15564
15633
|
unread: _channel23.unread,
|
|
15565
15634
|
muted: _channel23.muted,
|
|
15566
15635
|
mutedTill: _channel23.mutedTill
|
|
15567
15636
|
}));
|
|
15568
|
-
case
|
|
15637
|
+
case 161:
|
|
15569
15638
|
_groupName6 = getChannelGroupName(_channel23);
|
|
15570
|
-
|
|
15639
|
+
_context.n = 162;
|
|
15571
15640
|
return put(updateSearchedChannelDataAC(_channel23.id, {
|
|
15572
15641
|
unread: _channel23.unread
|
|
15573
15642
|
}, _groupName6));
|
|
15574
|
-
case
|
|
15643
|
+
case 162:
|
|
15575
15644
|
updateChannelOnAllChannels(_channel23.id, {
|
|
15576
15645
|
unread: _channel23.unread
|
|
15577
15646
|
});
|
|
15578
|
-
return
|
|
15579
|
-
case
|
|
15647
|
+
return _context.a(3, 185);
|
|
15648
|
+
case 163:
|
|
15580
15649
|
_channel24 = args.channel, members = args.members;
|
|
15581
15650
|
log.info('channel CHANGE_ROLE channel ... ', _channel24);
|
|
15582
15651
|
log.info('channel CHANGE_ROLE member ... ', members);
|
|
15583
|
-
|
|
15652
|
+
_context.n = 164;
|
|
15584
15653
|
return call(getActiveChannelId);
|
|
15585
|
-
case
|
|
15586
|
-
_activeChannelId14 =
|
|
15654
|
+
case 164:
|
|
15655
|
+
_activeChannelId14 = _context.v;
|
|
15587
15656
|
if (!(_channel24.id === _activeChannelId14)) {
|
|
15588
|
-
|
|
15657
|
+
_context.n = 165;
|
|
15589
15658
|
break;
|
|
15590
15659
|
}
|
|
15591
|
-
|
|
15660
|
+
_context.n = 165;
|
|
15592
15661
|
return put(updateMembersAC(members));
|
|
15593
|
-
case
|
|
15662
|
+
case 165:
|
|
15594
15663
|
i = 0;
|
|
15595
|
-
case
|
|
15664
|
+
case 166:
|
|
15596
15665
|
if (!(i < members.length)) {
|
|
15597
|
-
|
|
15666
|
+
_context.n = 169;
|
|
15598
15667
|
break;
|
|
15599
15668
|
}
|
|
15600
15669
|
if (!(members[i].id === SceytChatClient.user.id)) {
|
|
15601
|
-
|
|
15670
|
+
_context.n = 168;
|
|
15602
15671
|
break;
|
|
15603
15672
|
}
|
|
15604
|
-
|
|
15673
|
+
_context.n = 167;
|
|
15605
15674
|
return put(updateChannelDataAC(_channel24.id, {
|
|
15606
15675
|
userRole: members[i].role,
|
|
15607
15676
|
muted: _channel24.muted,
|
|
15608
15677
|
mutedTill: _channel24.mutedTill
|
|
15609
15678
|
}));
|
|
15610
|
-
case
|
|
15679
|
+
case 167:
|
|
15611
15680
|
updateChannelOnAllChannels(_channel24.id, {
|
|
15612
15681
|
userRole: members[i].role,
|
|
15613
15682
|
muted: _channel24.muted,
|
|
15614
15683
|
mutedTill: _channel24.mutedTill
|
|
15615
15684
|
});
|
|
15616
|
-
case
|
|
15685
|
+
case 168:
|
|
15617
15686
|
i++;
|
|
15618
|
-
|
|
15687
|
+
_context.n = 166;
|
|
15619
15688
|
break;
|
|
15620
|
-
case
|
|
15621
|
-
return
|
|
15622
|
-
case
|
|
15689
|
+
case 169:
|
|
15690
|
+
return _context.a(3, 185);
|
|
15691
|
+
case 170:
|
|
15623
15692
|
_channel25 = args.channel;
|
|
15624
15693
|
log.info('channel frozen channel ... ', _channel25);
|
|
15625
|
-
return
|
|
15626
|
-
case
|
|
15694
|
+
return _context.a(3, 185);
|
|
15695
|
+
case 171:
|
|
15627
15696
|
_channel26 = args.channel;
|
|
15628
15697
|
log.info('channel unfrozen channel ... ', _channel26);
|
|
15629
|
-
return
|
|
15630
|
-
case
|
|
15698
|
+
return _context.a(3, 185);
|
|
15699
|
+
case 172:
|
|
15631
15700
|
_channelId2 = args.channelId, from = args.from, name = args.name;
|
|
15632
15701
|
log.info('channel event received >>>... . . . . . ', args);
|
|
15633
15702
|
if (!(from.id === SceytChatClient.user.id)) {
|
|
15634
|
-
|
|
15703
|
+
_context.n = 173;
|
|
15635
15704
|
break;
|
|
15636
15705
|
}
|
|
15637
|
-
return
|
|
15638
|
-
case
|
|
15706
|
+
return _context.a(3, 185);
|
|
15707
|
+
case 173:
|
|
15639
15708
|
if (!(name === 'start_typing')) {
|
|
15640
|
-
|
|
15709
|
+
_context.n = 175;
|
|
15641
15710
|
break;
|
|
15642
15711
|
}
|
|
15643
15712
|
if (!usersTimeout[_channelId2]) {
|
|
@@ -15649,27 +15718,27 @@ function watchForEvents() {
|
|
|
15649
15718
|
usersTimeout[_channelId2][from.id] = setTimeout(function () {
|
|
15650
15719
|
channelListener.onReceivedChannelEvent(_channelId2, from, 'stop_typing');
|
|
15651
15720
|
}, 5000);
|
|
15652
|
-
|
|
15721
|
+
_context.n = 174;
|
|
15653
15722
|
return put(switchTypingIndicatorAC(true, _channelId2, from));
|
|
15654
|
-
case
|
|
15655
|
-
|
|
15723
|
+
case 174:
|
|
15724
|
+
_context.n = 180;
|
|
15656
15725
|
break;
|
|
15657
|
-
case
|
|
15726
|
+
case 175:
|
|
15658
15727
|
if (!(name === 'stop_typing')) {
|
|
15659
|
-
|
|
15728
|
+
_context.n = 177;
|
|
15660
15729
|
break;
|
|
15661
15730
|
}
|
|
15662
15731
|
if (usersTimeout[_channelId2] && usersTimeout[_channelId2][from.id]) {
|
|
15663
15732
|
clearTimeout(usersTimeout[_channelId2][from.id]);
|
|
15664
15733
|
}
|
|
15665
|
-
|
|
15734
|
+
_context.n = 176;
|
|
15666
15735
|
return put(switchTypingIndicatorAC(false, _channelId2, from));
|
|
15667
|
-
case
|
|
15668
|
-
|
|
15736
|
+
case 176:
|
|
15737
|
+
_context.n = 180;
|
|
15669
15738
|
break;
|
|
15670
|
-
case
|
|
15739
|
+
case 177:
|
|
15671
15740
|
if (!(name === 'start_recording')) {
|
|
15672
|
-
|
|
15741
|
+
_context.n = 179;
|
|
15673
15742
|
break;
|
|
15674
15743
|
}
|
|
15675
15744
|
if (!usersTimeout[_channelId2]) {
|
|
@@ -15681,58 +15750,58 @@ function watchForEvents() {
|
|
|
15681
15750
|
usersTimeout[_channelId2][from.id] = setTimeout(function () {
|
|
15682
15751
|
channelListener.onReceivedChannelEvent(_channelId2, from, 'stop_recording');
|
|
15683
15752
|
}, 5000);
|
|
15684
|
-
|
|
15753
|
+
_context.n = 178;
|
|
15685
15754
|
return put(switchRecordingIndicatorAC(true, _channelId2, from));
|
|
15686
|
-
case
|
|
15687
|
-
|
|
15755
|
+
case 178:
|
|
15756
|
+
_context.n = 180;
|
|
15688
15757
|
break;
|
|
15689
|
-
case
|
|
15758
|
+
case 179:
|
|
15690
15759
|
if (!(name === 'stop_recording')) {
|
|
15691
|
-
|
|
15760
|
+
_context.n = 180;
|
|
15692
15761
|
break;
|
|
15693
15762
|
}
|
|
15694
15763
|
if (usersTimeout[_channelId2] && usersTimeout[_channelId2][from.id]) {
|
|
15695
15764
|
clearTimeout(usersTimeout[_channelId2][from.id]);
|
|
15696
15765
|
}
|
|
15697
|
-
|
|
15766
|
+
_context.n = 180;
|
|
15698
15767
|
return put(switchRecordingIndicatorAC(false, _channelId2, from));
|
|
15699
|
-
case
|
|
15700
|
-
return
|
|
15701
|
-
case
|
|
15768
|
+
case 180:
|
|
15769
|
+
return _context.a(3, 185);
|
|
15770
|
+
case 181:
|
|
15702
15771
|
status = args.status;
|
|
15703
15772
|
log.info('connection status changed . . . . . ', status);
|
|
15704
|
-
|
|
15773
|
+
_context.n = 182;
|
|
15705
15774
|
return put(setConnectionStatusAC(status));
|
|
15706
|
-
case
|
|
15775
|
+
case 182:
|
|
15707
15776
|
if (!(status === CONNECTION_STATUS.CONNECTED)) {
|
|
15708
|
-
|
|
15777
|
+
_context.n = 183;
|
|
15709
15778
|
break;
|
|
15710
15779
|
}
|
|
15711
|
-
|
|
15780
|
+
_context.n = 183;
|
|
15712
15781
|
return put(getRolesAC());
|
|
15713
|
-
case
|
|
15714
|
-
return
|
|
15715
|
-
case
|
|
15782
|
+
case 183:
|
|
15783
|
+
return _context.a(3, 185);
|
|
15784
|
+
case 184:
|
|
15716
15785
|
log.warn('UNHANDLED EVENT FROM REDUX-SAGA EVENT-CHANNEL');
|
|
15717
|
-
case
|
|
15718
|
-
|
|
15786
|
+
case 185:
|
|
15787
|
+
_context.n = 187;
|
|
15719
15788
|
break;
|
|
15720
|
-
case
|
|
15721
|
-
|
|
15722
|
-
_t2 =
|
|
15789
|
+
case 186:
|
|
15790
|
+
_context.p = 186;
|
|
15791
|
+
_t2 = _context.v;
|
|
15723
15792
|
log.error('Error in watchForEvents:', _t2);
|
|
15724
|
-
case
|
|
15725
|
-
return
|
|
15793
|
+
case 187:
|
|
15794
|
+
return _context.a(2);
|
|
15726
15795
|
}
|
|
15727
|
-
},
|
|
15796
|
+
}, _callee, null, [[0, 186]]);
|
|
15728
15797
|
});
|
|
15729
15798
|
case 1:
|
|
15730
|
-
return
|
|
15799
|
+
return _context2.d(_regeneratorValues(_loop()), 2);
|
|
15731
15800
|
case 2:
|
|
15732
|
-
|
|
15801
|
+
_context2.n = 1;
|
|
15733
15802
|
break;
|
|
15734
15803
|
case 3:
|
|
15735
|
-
return
|
|
15804
|
+
return _context2.a(2);
|
|
15736
15805
|
}
|
|
15737
15806
|
}, _marked$1);
|
|
15738
15807
|
}
|
|
@@ -16590,7 +16659,7 @@ function channelsForForwardLoadMore(action) {
|
|
|
16590
16659
|
channelQueryForward.limit = limit;
|
|
16591
16660
|
}
|
|
16592
16661
|
_context8.n = 1;
|
|
16593
|
-
return put(setChannelsLoadingStateAC(LOADING_STATE.LOADING));
|
|
16662
|
+
return put(setChannelsLoadingStateAC(LOADING_STATE.LOADING, true));
|
|
16594
16663
|
case 1:
|
|
16595
16664
|
_context8.n = 2;
|
|
16596
16665
|
return call(channelQueryForward.loadNextPage);
|
|
@@ -16613,7 +16682,7 @@ function channelsForForwardLoadMore(action) {
|
|
|
16613
16682
|
return put(addChannelsForForwardAC(mappedChannels));
|
|
16614
16683
|
case 5:
|
|
16615
16684
|
_context8.n = 6;
|
|
16616
|
-
return put(setChannelsLoadingStateAC(LOADING_STATE.LOADED));
|
|
16685
|
+
return put(setChannelsLoadingStateAC(LOADING_STATE.LOADED, true));
|
|
16617
16686
|
case 6:
|
|
16618
16687
|
_context8.n = 8;
|
|
16619
16688
|
break;
|
|
@@ -16835,7 +16904,7 @@ function switchChannel(action) {
|
|
|
16835
16904
|
}
|
|
16836
16905
|
currentActiveChannel = getChannelFromMap(getActiveChannelId());
|
|
16837
16906
|
_context10.n = 11;
|
|
16838
|
-
return
|
|
16907
|
+
return put(setUnreadScrollToAC(true));
|
|
16839
16908
|
case 11:
|
|
16840
16909
|
_context10.n = 12;
|
|
16841
16910
|
return call(setActiveChannelId, channel && channel.id);
|
|
@@ -18479,6 +18548,9 @@ var pendingPollActionsSelector = function pendingPollActionsSelector(store) {
|
|
|
18479
18548
|
var pendingMessagesMapSelector = function pendingMessagesMapSelector(store) {
|
|
18480
18549
|
return store.MessageReducer.pendingMessagesMap;
|
|
18481
18550
|
};
|
|
18551
|
+
var unreadScrollToSelector = function unreadScrollToSelector(store) {
|
|
18552
|
+
return store.MessageReducer.unreadScrollTo;
|
|
18553
|
+
};
|
|
18482
18554
|
|
|
18483
18555
|
var getFrame = function getFrame(videoSrc, time) {
|
|
18484
18556
|
try {
|
|
@@ -19046,7 +19118,7 @@ function sendMessage(action) {
|
|
|
19046
19118
|
}, _marked$3, null, [[1, 18]]);
|
|
19047
19119
|
}
|
|
19048
19120
|
function sendTextMessage(action) {
|
|
19049
|
-
var payload, message, connectionState, channelId, channel, sendMessageTid, activeChannelId, SceytChatClient, createChannelData, mentionedUserIds, attachments, attachmentBuilder, att, messageBuilder, messageToSend, pendingMessage, messageResponse, messageUpdateData, messageToUpdate, channelUpdateParam, _t3;
|
|
19121
|
+
var payload, message, connectionState, channelId, channel, sendMessageTid, activeChannelId, SceytChatClient, createChannelData, mentionedUserIds, attachments, attachmentBuilder, att, messageBuilder, messageToSend, pendingMessage, _messageResponse, messageResponse, messageUpdateData, messageToUpdate, channelUpdateParam, _t3;
|
|
19050
19122
|
return _regenerator().w(function (_context4) {
|
|
19051
19123
|
while (1) switch (_context4.p = _context4.n) {
|
|
19052
19124
|
case 0:
|
|
@@ -19159,6 +19231,7 @@ function sendTextMessage(action) {
|
|
|
19159
19231
|
parentMessage: messageResponse.parentMessage,
|
|
19160
19232
|
repliedInThread: messageResponse.repliedInThread,
|
|
19161
19233
|
createdAt: messageResponse.createdAt,
|
|
19234
|
+
pollDetails: (_messageResponse = messageResponse) === null || _messageResponse === void 0 ? void 0 : _messageResponse.pollDetails,
|
|
19162
19235
|
channelId: channel.id
|
|
19163
19236
|
};
|
|
19164
19237
|
if (!(activeChannelId === channel.id)) {
|
|
@@ -19199,15 +19272,12 @@ function sendTextMessage(action) {
|
|
|
19199
19272
|
throw new Error('Connection required to send message');
|
|
19200
19273
|
case 17:
|
|
19201
19274
|
_context4.n = 18;
|
|
19202
|
-
return put(getMessagesAC(channel, true, channel.lastMessage.id, undefined, undefined, false));
|
|
19203
|
-
case 18:
|
|
19204
|
-
_context4.n = 19;
|
|
19205
19275
|
return put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
19206
|
-
case
|
|
19207
|
-
_context4.n =
|
|
19276
|
+
case 18:
|
|
19277
|
+
_context4.n = 21;
|
|
19208
19278
|
break;
|
|
19209
|
-
case
|
|
19210
|
-
_context4.p =
|
|
19279
|
+
case 19:
|
|
19280
|
+
_context4.p = 19;
|
|
19211
19281
|
_t3 = _context4.v;
|
|
19212
19282
|
log.error('error on send text message ... ', _t3);
|
|
19213
19283
|
updateMessageOnMap(channel.id, {
|
|
@@ -19217,23 +19287,23 @@ function sendTextMessage(action) {
|
|
|
19217
19287
|
}
|
|
19218
19288
|
});
|
|
19219
19289
|
if (!(activeChannelId === channel.id)) {
|
|
19220
|
-
_context4.n =
|
|
19290
|
+
_context4.n = 20;
|
|
19221
19291
|
break;
|
|
19222
19292
|
}
|
|
19223
19293
|
updateMessageOnAllMessages(sendMessageTid, {
|
|
19224
19294
|
state: MESSAGE_STATUS.FAILED
|
|
19225
19295
|
});
|
|
19226
|
-
_context4.n =
|
|
19296
|
+
_context4.n = 20;
|
|
19227
19297
|
return put(updateMessageAC(sendMessageTid, {
|
|
19228
19298
|
state: MESSAGE_STATUS.FAILED
|
|
19229
19299
|
}));
|
|
19230
|
-
case
|
|
19231
|
-
_context4.n =
|
|
19300
|
+
case 20:
|
|
19301
|
+
_context4.n = 21;
|
|
19232
19302
|
return put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
19233
|
-
case
|
|
19303
|
+
case 21:
|
|
19234
19304
|
return _context4.a(2);
|
|
19235
19305
|
}
|
|
19236
|
-
}, _marked2$2, null, [[3,
|
|
19306
|
+
}, _marked2$2, null, [[3, 19]]);
|
|
19237
19307
|
}
|
|
19238
19308
|
function forwardMessage(action) {
|
|
19239
19309
|
var payload, message, channelId, connectionState, isForward, channel, SceytChatClient, mentionedUserIds, attachments, attachmentBuilder, att, messageBuilder, pollDetails, messageToSend, pendingMessage, activeChannelId, isCachedChannel, hasNextMessages, messageResponse, messageUpdateData, messageToUpdate, channelUpdateParam, _t4;
|
|
@@ -19439,7 +19509,7 @@ function forwardMessage(action) {
|
|
|
19439
19509
|
}, _marked3$1, null, [[0, 20]]);
|
|
19440
19510
|
}
|
|
19441
19511
|
function resendMessage(action) {
|
|
19442
|
-
var payload, message, connectionState, channelId, channel, customUploader, attachmentCompilation, messageAttachment, messageCopy, handleUploadProgress, uri, filePath, handleUpdateLocalPath, pendingAttachment, thumbnailMetas, fileSize, meta, attachmentMeta, attachmentBuilder, attachmentToSend, messageResponse, messageUpdateData, fileType, messageToUpdate, _messageCopy2,
|
|
19512
|
+
var payload, message, connectionState, channelId, channel, customUploader, attachmentCompilation, messageAttachment, messageCopy, handleUploadProgress, uri, filePath, handleUpdateLocalPath, pendingAttachment, thumbnailMetas, fileSize, meta, attachmentMeta, attachmentBuilder, attachmentToSend, messageResponse, messageUpdateData, fileType, messageToUpdate, _messageCopy2, _messageResponse2, _messageUpdateData, isInActiveChannel, activeChannelId, _messageToUpdate, _t5, _t6;
|
|
19443
19513
|
return _regenerator().w(function (_context6) {
|
|
19444
19514
|
while (1) switch (_context6.p = _context6.n) {
|
|
19445
19515
|
case 0:
|
|
@@ -19692,29 +19762,27 @@ function resendMessage(action) {
|
|
|
19692
19762
|
_context6.n = 27;
|
|
19693
19763
|
return call(channel.sendMessage, _messageCopy2);
|
|
19694
19764
|
case 27:
|
|
19695
|
-
|
|
19765
|
+
_messageResponse2 = _context6.v;
|
|
19696
19766
|
_context6.n = 28;
|
|
19697
19767
|
return put(removePendingMessageAC(channel.id, _messageCopy2.tid || _messageCopy2.id));
|
|
19698
19768
|
case 28:
|
|
19699
19769
|
_messageUpdateData = {
|
|
19700
|
-
id:
|
|
19701
|
-
body:
|
|
19702
|
-
type:
|
|
19703
|
-
state:
|
|
19704
|
-
displayCount:
|
|
19705
|
-
deliveryStatus:
|
|
19770
|
+
id: _messageResponse2.id,
|
|
19771
|
+
body: _messageResponse2.body,
|
|
19772
|
+
type: _messageResponse2.type,
|
|
19773
|
+
state: _messageResponse2.state,
|
|
19774
|
+
displayCount: _messageResponse2.displayCount,
|
|
19775
|
+
deliveryStatus: _messageResponse2.deliveryStatus,
|
|
19706
19776
|
attachments: [],
|
|
19707
|
-
mentionedUsers:
|
|
19708
|
-
metadata:
|
|
19709
|
-
parentMessage:
|
|
19710
|
-
repliedInThread:
|
|
19711
|
-
bodyAttributes:
|
|
19712
|
-
createdAt:
|
|
19777
|
+
mentionedUsers: _messageResponse2.mentionedUsers,
|
|
19778
|
+
metadata: _messageResponse2.metadata,
|
|
19779
|
+
parentMessage: _messageResponse2.parentMessage,
|
|
19780
|
+
repliedInThread: _messageResponse2.repliedInThread,
|
|
19781
|
+
bodyAttributes: _messageResponse2.bodyAttributes,
|
|
19782
|
+
createdAt: _messageResponse2.createdAt,
|
|
19713
19783
|
channelId: channel.id
|
|
19714
19784
|
};
|
|
19715
|
-
isInActiveChannel =
|
|
19716
|
-
return message.id === _messageCopy2.tid;
|
|
19717
|
-
});
|
|
19785
|
+
isInActiveChannel = getMessagesFromMap(channelId)[_messageCopy2.tid];
|
|
19718
19786
|
if (!isInActiveChannel) {
|
|
19719
19787
|
_context6.n = 29;
|
|
19720
19788
|
break;
|
|
@@ -19735,7 +19803,7 @@ function resendMessage(action) {
|
|
|
19735
19803
|
break;
|
|
19736
19804
|
}
|
|
19737
19805
|
_context6.n = 31;
|
|
19738
|
-
return put(updateMessageAC(_messageCopy2.tid, JSON.parse(JSON.stringify(
|
|
19806
|
+
return put(updateMessageAC(_messageCopy2.tid, JSON.parse(JSON.stringify(_messageResponse2))));
|
|
19739
19807
|
case 31:
|
|
19740
19808
|
updateMessageOnMap(channel.id, {
|
|
19741
19809
|
messageId: _messageCopy2.tid,
|
|
@@ -19744,7 +19812,7 @@ function resendMessage(action) {
|
|
|
19744
19812
|
updateMessageOnAllMessages(_messageCopy2.tid, _messageUpdateData);
|
|
19745
19813
|
case 32:
|
|
19746
19814
|
updateChannelOnAllChannels(channel.id, channel);
|
|
19747
|
-
_messageToUpdate = JSON.parse(JSON.stringify(
|
|
19815
|
+
_messageToUpdate = JSON.parse(JSON.stringify(_messageResponse2));
|
|
19748
19816
|
updateChannelLastMessageOnAllChannels(channel.id, _messageToUpdate);
|
|
19749
19817
|
_context6.n = 33;
|
|
19750
19818
|
return put(updateChannelLastMessageAC(_messageToUpdate, {
|
|
@@ -19905,7 +19973,7 @@ function editMessage(action) {
|
|
|
19905
19973
|
}, _marked6$1, null, [[0, 5]]);
|
|
19906
19974
|
}
|
|
19907
19975
|
function getMessagesQuery(action) {
|
|
19908
|
-
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, _secondResult4, updatedMessages, pendingMessages, _messagesMap, filteredPendingMessages, _t9;
|
|
19976
|
+
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, _t9;
|
|
19909
19977
|
return _regenerator().w(function (_context9) {
|
|
19910
19978
|
while (1) switch (_context9.p = _context9.n) {
|
|
19911
19979
|
case 0:
|
|
@@ -19927,7 +19995,9 @@ function getMessagesQuery(action) {
|
|
|
19927
19995
|
case 2:
|
|
19928
19996
|
messageQuery = _context9.v;
|
|
19929
19997
|
query.messageQuery = messageQuery;
|
|
19930
|
-
cachedMessages = getMessagesFromMap(channel.id)
|
|
19998
|
+
cachedMessages = Object.values(getMessagesFromMap(channel.id) || {}).sort(function (a, b) {
|
|
19999
|
+
return Number(a.id) - Number(b.id);
|
|
20000
|
+
});
|
|
19931
20001
|
result = {
|
|
19932
20002
|
messages: [],
|
|
19933
20003
|
hasNext: false
|
|
@@ -20149,6 +20219,7 @@ function getMessagesQuery(action) {
|
|
|
20149
20219
|
_context9.n = 46;
|
|
20150
20220
|
break;
|
|
20151
20221
|
case 39:
|
|
20222
|
+
previousAllMessages = getAllMessages();
|
|
20152
20223
|
setMessagesToMap(channel.id, []);
|
|
20153
20224
|
setAllMessages([]);
|
|
20154
20225
|
if (!(cachedMessages && cachedMessages.length)) {
|
|
@@ -20186,13 +20257,30 @@ function getMessagesQuery(action) {
|
|
|
20186
20257
|
updateMessageOnAllMessages(msg.id, updatedMessage || msg);
|
|
20187
20258
|
updatedMessages.push(updatedMessage || msg);
|
|
20188
20259
|
});
|
|
20260
|
+
lastMessageId = updatedMessages[updatedMessages.length - 1].id;
|
|
20261
|
+
_allMessages2 = getAllMessages();
|
|
20262
|
+
setMappedAllMessages = {};
|
|
20263
|
+
previousAllMessages.forEach(function (msg) {
|
|
20264
|
+
if (msg.channelId === channel.id) {
|
|
20265
|
+
setMappedAllMessages[msg.id] = msg;
|
|
20266
|
+
}
|
|
20267
|
+
});
|
|
20268
|
+
_allMessages2.forEach(function (msg) {
|
|
20269
|
+
if (msg.channelId === channel.id) {
|
|
20270
|
+
setMappedAllMessages[msg.id] = msg;
|
|
20271
|
+
}
|
|
20272
|
+
});
|
|
20273
|
+
allMessagesAfterLastMessage = (_Object$values = Object.values(setMappedAllMessages || {})) === null || _Object$values === void 0 ? void 0 : _Object$values.filter(function (msg) {
|
|
20274
|
+
return msg.id > lastMessageId;
|
|
20275
|
+
});
|
|
20276
|
+
updatedMessages = [].concat(updatedMessages, allMessagesAfterLastMessage || []);
|
|
20189
20277
|
setMessagesToMap(channel.id, updatedMessages);
|
|
20190
|
-
setAllMessages(
|
|
20278
|
+
setAllMessages(updatedMessages);
|
|
20191
20279
|
_context9.n = 44;
|
|
20192
20280
|
return put(setMessagesAC(JSON.parse(JSON.stringify(updatedMessages))));
|
|
20193
20281
|
case 44:
|
|
20194
20282
|
_context9.n = 45;
|
|
20195
|
-
return put(setMessagesHasPrevAC(
|
|
20283
|
+
return put(setMessagesHasPrevAC(true));
|
|
20196
20284
|
case 45:
|
|
20197
20285
|
_context9.n = 46;
|
|
20198
20286
|
return put(setMessagesHasNextAC(false));
|
|
@@ -20341,6 +20429,7 @@ function loadMoreMessages(action) {
|
|
|
20341
20429
|
result = _context1.v;
|
|
20342
20430
|
if (result.messages.length) {
|
|
20343
20431
|
addAllMessages(result.messages, MESSAGE_LOAD_DIRECTION.PREV);
|
|
20432
|
+
setMessagesToMap(channelId, result.messages);
|
|
20344
20433
|
}
|
|
20345
20434
|
_context1.n = 5;
|
|
20346
20435
|
return put(setMessagesHasPrevAC(result.hasNext));
|
|
@@ -20368,6 +20457,7 @@ function loadMoreMessages(action) {
|
|
|
20368
20457
|
result = _context1.v;
|
|
20369
20458
|
if (result.messages.length) {
|
|
20370
20459
|
addAllMessages(result.messages, MESSAGE_LOAD_DIRECTION.NEXT);
|
|
20460
|
+
setMessagesToMap(channelId, result.messages);
|
|
20371
20461
|
}
|
|
20372
20462
|
_context1.n = 9;
|
|
20373
20463
|
return put(setMessagesHasNextAC(result.hasNext));
|
|
@@ -20980,7 +21070,7 @@ function updateMessageOptimisticallyForAddPollVote(channelId, message, vote) {
|
|
|
20980
21070
|
}, _marked18$1);
|
|
20981
21071
|
}
|
|
20982
21072
|
function addPollVote(action) {
|
|
20983
|
-
var payload, channelId, pollId, optionId, _message4, isResend, sceytChatClient, _user$presence2, connectionState, user, vote, pendingAction, conflictCheck, channel,
|
|
21073
|
+
var payload, channelId, pollId, optionId, _message4, isResend, sceytChatClient, _user$presence2, connectionState, user, vote, pendingAction, conflictCheck, channel, _Object$values2, _store$getState$Messa, _currentMessage$pollD, _currentMessage$pollD2, _currentMessage$pollD3, currentMessage, hasNext, obj, _t19;
|
|
20984
21074
|
return _regenerator().w(function (_context21) {
|
|
20985
21075
|
while (1) switch (_context21.p = _context21.n) {
|
|
20986
21076
|
case 0:
|
|
@@ -21039,7 +21129,7 @@ function addPollVote(action) {
|
|
|
21039
21129
|
_context21.n = 3;
|
|
21040
21130
|
break;
|
|
21041
21131
|
}
|
|
21042
|
-
currentMessage = ((
|
|
21132
|
+
currentMessage = ((_Object$values2 = Object.values(getMessagesFromMap(channelId) || {})) === null || _Object$values2 === void 0 ? void 0 : _Object$values2.find(function (msg) {
|
|
21043
21133
|
return msg.id === _message4.id || msg.tid === _message4.id;
|
|
21044
21134
|
})) || _message4;
|
|
21045
21135
|
hasNext = ((_store$getState$Messa = store.getState().MessageReducer.pollVotesHasMore) === null || _store$getState$Messa === void 0 ? void 0 : _store$getState$Messa[pollId]) || false;
|
|
@@ -21181,7 +21271,7 @@ function updateMessageOptimisticallyForDeletePollVote(channelId, message, vote)
|
|
|
21181
21271
|
}, _marked21$1);
|
|
21182
21272
|
}
|
|
21183
21273
|
function deletePollVote(action) {
|
|
21184
|
-
var payload, channelId, pollId, optionId, _message5, isResend, sceytChatClient, _message5$pollDetails, _message5$pollDetails2, _message5$pollDetails3, connectionState, vote, pendingAction, conflictCheck, channel,
|
|
21274
|
+
var payload, channelId, pollId, optionId, _message5, isResend, sceytChatClient, _message5$pollDetails, _message5$pollDetails2, _message5$pollDetails3, connectionState, vote, pendingAction, conflictCheck, channel, _Object$values3, _currentMessage$pollD4, _currentMessage$pollD5, _currentMessage$pollD6, currentMessage, obj, _t20;
|
|
21185
21275
|
return _regenerator().w(function (_context24) {
|
|
21186
21276
|
while (1) switch (_context24.p = _context24.n) {
|
|
21187
21277
|
case 0:
|
|
@@ -21227,7 +21317,7 @@ function deletePollVote(action) {
|
|
|
21227
21317
|
_context24.n = 4;
|
|
21228
21318
|
break;
|
|
21229
21319
|
}
|
|
21230
|
-
currentMessage = ((
|
|
21320
|
+
currentMessage = ((_Object$values3 = Object.values(getMessagesFromMap(channelId) || {})) === null || _Object$values3 === void 0 ? void 0 : _Object$values3.find(function (msg) {
|
|
21231
21321
|
return msg.id === _message5.id || msg.tid === _message5.id;
|
|
21232
21322
|
})) || _message5;
|
|
21233
21323
|
_context24.n = 3;
|
|
@@ -23226,7 +23316,7 @@ var MembersText = styled.div(_templateObject7$1 || (_templateObject7$1 = _tagged
|
|
|
23226
23316
|
});
|
|
23227
23317
|
var Center = styled.div(_templateObject8$1 || (_templateObject8$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: 24px;\n"])));
|
|
23228
23318
|
|
|
23229
|
-
var _templateObject$5, _templateObject2$4;
|
|
23319
|
+
var _templateObject$5, _templateObject2$4, _templateObject3$4;
|
|
23230
23320
|
var SceytChat = function SceytChat(_ref) {
|
|
23231
23321
|
var client = _ref.client,
|
|
23232
23322
|
theme = _ref.theme,
|
|
@@ -23251,7 +23341,9 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
23251
23341
|
memberCount = _ref.memberCount,
|
|
23252
23342
|
_ref$disableFrowardMe = _ref.disableFrowardMentionsCount,
|
|
23253
23343
|
disableFrowardMentionsCount = _ref$disableFrowardMe === void 0 ? false : _ref$disableFrowardMe,
|
|
23254
|
-
chatMinWidth = _ref.chatMinWidth
|
|
23344
|
+
chatMinWidth = _ref.chatMinWidth,
|
|
23345
|
+
_ref$embeddedJoinGrou = _ref.embeddedJoinGroupPopup,
|
|
23346
|
+
embeddedJoinGroupPopup = _ref$embeddedJoinGrou === void 0 ? false : _ref$embeddedJoinGrou;
|
|
23255
23347
|
var useInviteLink = getUseInviteLink();
|
|
23256
23348
|
var _useColor = useColors(),
|
|
23257
23349
|
backgroundColor = _useColor[THEME_COLORS.BACKGROUND],
|
|
@@ -23484,6 +23576,11 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
23484
23576
|
window.history.pushState({}, '', window.location.pathname);
|
|
23485
23577
|
dispatch(setJoinableChannelAC(null));
|
|
23486
23578
|
};
|
|
23579
|
+
var joinPopup = joinableChannel && getUseInviteLink() ? (/*#__PURE__*/React__default.createElement(JoinGroupPopup, {
|
|
23580
|
+
onClose: handleCloseJoinPopup,
|
|
23581
|
+
onJoin: handleJoinChannel,
|
|
23582
|
+
channel: joinableChannel
|
|
23583
|
+
})) : null;
|
|
23487
23584
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, SceytChatClient ? (/*#__PURE__*/React__default.createElement(ChatContainer, {
|
|
23488
23585
|
onDrop: handleDropFile,
|
|
23489
23586
|
onDragOver: handleDragOver,
|
|
@@ -23493,14 +23590,10 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
23493
23590
|
highlightedBackground: highlightedBackground,
|
|
23494
23591
|
id: 'sceyt_chat_container',
|
|
23495
23592
|
chatMinWidth: chatMinWidth
|
|
23496
|
-
}, children
|
|
23497
|
-
onClose: handleCloseJoinPopup,
|
|
23498
|
-
onJoin: handleJoinChannel,
|
|
23499
|
-
channel: joinableChannel
|
|
23500
|
-
})));
|
|
23593
|
+
}, children, embeddedJoinGroupPopup && joinPopup && /*#__PURE__*/React__default.createElement(EmbeddedPopupWrapper, null, joinPopup))) : '', !embeddedJoinGroupPopup && joinPopup);
|
|
23501
23594
|
};
|
|
23502
23595
|
var Container$2 = styled.div(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteralLoose(["\n display: flex;\n height: 100vh;\n"])));
|
|
23503
|
-
var ChatContainer = styled.div(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteralLoose(["\n display: flex;\n height: 100%;\n max-height: 100vh;\n min-width: ", ";\n background-color: ", ";\n\n /* Global highlighted background styles */\n ::selection {\n background-color: ", ";\n }\n\n ::-moz-selection {\n background-color: ", ";\n }\n\n /* For text selection highlighting */\n *::selection {\n background-color: ", ";\n }\n\n *::-moz-selection {\n background-color: ", ";\n }\n"])), function (props) {
|
|
23596
|
+
var ChatContainer = styled.div(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteralLoose(["\n display: flex;\n height: 100%;\n max-height: 100vh;\n min-width: ", ";\n background-color: ", ";\n position: relative;\n\n /* Global highlighted background styles */\n ::selection {\n background-color: ", ";\n }\n\n ::-moz-selection {\n background-color: ", ";\n }\n\n /* For text selection highlighting */\n *::selection {\n background-color: ", ";\n }\n\n *::-moz-selection {\n background-color: ", ";\n }\n"])), function (props) {
|
|
23504
23597
|
return props.withChannelsList && (props.chatMinWidth || '1200px');
|
|
23505
23598
|
}, function (props) {
|
|
23506
23599
|
return props.backgroundColor;
|
|
@@ -23513,6 +23606,7 @@ var ChatContainer = styled.div(_templateObject2$4 || (_templateObject2$4 = _tagg
|
|
|
23513
23606
|
}, function (props) {
|
|
23514
23607
|
return props.highlightedBackground;
|
|
23515
23608
|
});
|
|
23609
|
+
var EmbeddedPopupWrapper = styled.div(_templateObject3$4 || (_templateObject3$4 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1000;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n overflow: hidden;\n\n > * {\n pointer-events: all;\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n width: 100% !important;\n height: 100% !important;\n }\n"])));
|
|
23516
23610
|
|
|
23517
23611
|
var SceytChatContainer = function SceytChatContainer(_ref) {
|
|
23518
23612
|
var client = _ref.client,
|
|
@@ -23547,7 +23641,9 @@ var SceytChatContainer = function SceytChatContainer(_ref) {
|
|
|
23547
23641
|
JoinGroupPopup: {},
|
|
23548
23642
|
InviteLinkModal: {},
|
|
23549
23643
|
ResetLinkConfirmModal: {}
|
|
23550
|
-
} : _ref$inviteLinkOption
|
|
23644
|
+
} : _ref$inviteLinkOption,
|
|
23645
|
+
_ref$embeddedJoinGrou = _ref.embeddedJoinGroupPopup,
|
|
23646
|
+
embeddedJoinGroupPopup = _ref$embeddedJoinGrou === void 0 ? false : _ref$embeddedJoinGrou;
|
|
23551
23647
|
useEffect(function () {
|
|
23552
23648
|
log.setLevel(logLevel);
|
|
23553
23649
|
if (baseUrlForInviteMembers) {
|
|
@@ -23583,7 +23679,8 @@ var SceytChatContainer = function SceytChatContainer(_ref) {
|
|
|
23583
23679
|
channelTypeFilter: channelTypeFilter,
|
|
23584
23680
|
memberCount: memberCount,
|
|
23585
23681
|
disableFrowardMentionsCount: disableFrowardMentionsCount,
|
|
23586
|
-
chatMinWidth: chatMinWidth
|
|
23682
|
+
chatMinWidth: chatMinWidth,
|
|
23683
|
+
embeddedJoinGroupPopup: embeddedJoinGroupPopup
|
|
23587
23684
|
}));
|
|
23588
23685
|
};
|
|
23589
23686
|
|
|
@@ -23835,7 +23932,7 @@ function SvgPoll(props) {
|
|
|
23835
23932
|
})));
|
|
23836
23933
|
}
|
|
23837
23934
|
|
|
23838
|
-
var _templateObject$6, _templateObject2$5, _templateObject3$
|
|
23935
|
+
var _templateObject$6, _templateObject2$5, _templateObject3$5, _templateObject4$4, _templateObject5$3, _templateObject6$2, _templateObject7$2, _templateObject8$2, _templateObject9$1, _templateObject0$1, _templateObject1$1, _templateObject10$1, _templateObject11$1, _templateObject12$1, _templateObject13$1, _templateObject14$1, _templateObject15$1, _templateObject16$1, _templateObject17$1, _templateObject18$1, _templateObject19$1, _templateObject20$1;
|
|
23839
23936
|
var LastMessageAttachments = function LastMessageAttachments(_ref) {
|
|
23840
23937
|
var lastMessage = _ref.lastMessage;
|
|
23841
23938
|
return !!(lastMessage.attachments && lastMessage.attachments.length || lastMessage !== null && lastMessage !== void 0 && lastMessage.pollDetails && (lastMessage === null || lastMessage === void 0 ? void 0 : lastMessage.type) === MESSAGE_TYPE.POLL) && (lastMessage !== null && lastMessage !== void 0 && lastMessage.pollDetails && (lastMessage === null || lastMessage === void 0 ? void 0 : lastMessage.type) === MESSAGE_TYPE.POLL ? (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(SvgPoll, null), lastMessage.body ? '' : 'Poll')) : lastMessage.attachments[0].type === attachmentTypes.image ? (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(SvgPicture, null), lastMessage.body ? '' : 'Photo')) : lastMessage.attachments[0].type === attachmentTypes.video ? (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(SvgVideoCall, null), lastMessage.body ? '' : 'Video')) : lastMessage.attachments[0].type === attachmentTypes.file ? (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(SvgChoseFile, null), lastMessage.body ? '' : 'File')) : lastMessage.attachments[0].type === attachmentTypes.voice ? (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(SvgVoiceIcon, null), lastMessage.body ? '' : 'Voice')) : null);
|
|
@@ -23875,7 +23972,7 @@ var ChannelMessageText = function ChannelMessageText(_ref2) {
|
|
|
23875
23972
|
return mem === user.id ? ' You' : " " + systemMessageUserName(mem, contactsMap && contactsMap[mem], lastMessage.mentionedUsers);
|
|
23876
23973
|
})) + " " + (lastMessageMetas && lastMessageMetas.m && lastMessageMetas.m.length > 5 ? "and " + (lastMessageMetas.m.length - 5) + " more" : '') : lastMessage.body === 'RM' ? " removed " + (lastMessageMetas && lastMessageMetas.m && lastMessageMetas.m.slice(0, 5).map(function (mem) {
|
|
23877
23974
|
return mem === user.id ? ' You' : " " + systemMessageUserName(mem, contactsMap && contactsMap[mem], lastMessage.mentionedUsers);
|
|
23878
|
-
})) + " " + (lastMessageMetas && lastMessageMetas.m && lastMessageMetas.m.length > 5 ? "and " + (lastMessageMetas.m.length - 5) + " more" : '') : lastMessage.body === 'LG' ? 'Left this group' : lastMessage.body === 'JL' ? '
|
|
23975
|
+
})) + " " + (lastMessageMetas && lastMessageMetas.m && lastMessageMetas.m.length > 5 ? "and " + (lastMessageMetas.m.length - 5) + " more" : '') : lastMessage.body === 'LG' ? 'Left this group' : lastMessage.body === 'JL' ? 'joined via invite link' : '') : (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(LastMessageDescription, {
|
|
23879
23976
|
poll: (lastMessage === null || lastMessage === void 0 ? void 0 : lastMessage.pollDetails) && (lastMessage === null || lastMessage === void 0 ? void 0 : lastMessage.type) === MESSAGE_TYPE.POLL
|
|
23880
23977
|
}, channel.lastReactedMessage && (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, "Reacted", /*#__PURE__*/React__default.createElement(ReactionItem, null, channel.newReactions && channel.newReactions[0] && channel.newReactions[0].key), "to", ' "')), LastMessageAttachments({
|
|
23881
23978
|
lastMessage: lastMessage
|
|
@@ -24215,7 +24312,7 @@ var ChannelInfo = styled.div(_templateObject$6 || (_templateObject$6 = _taggedTe
|
|
|
24215
24312
|
var MutedIcon = styled.span(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n & > svg {\n height: 16px;\n width: 16px;\n margin-left: 5px;\n color: ", ";\n }\n"])), function (props) {
|
|
24216
24313
|
return props.color;
|
|
24217
24314
|
});
|
|
24218
|
-
var LastMessage = styled.div(_templateObject3$
|
|
24315
|
+
var LastMessage = styled.div(_templateObject3$5 || (_templateObject3$5 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n font-size: ", ";\n color: ", ";\n max-width: ", ";\n\n height: ", ";\n"])), function (props) {
|
|
24219
24316
|
return props.fontSize || '14px';
|
|
24220
24317
|
}, function (props) {
|
|
24221
24318
|
return props.color;
|
|
@@ -24374,7 +24471,7 @@ var ChannelSearch = function ChannelSearch(_ref) {
|
|
|
24374
24471
|
}));
|
|
24375
24472
|
};
|
|
24376
24473
|
|
|
24377
|
-
var _templateObject$8, _templateObject2$7, _templateObject3$
|
|
24474
|
+
var _templateObject$8, _templateObject2$7, _templateObject3$6, _templateObject4$5;
|
|
24378
24475
|
var ContactItem = function ContactItem(_ref) {
|
|
24379
24476
|
var contact = _ref.contact,
|
|
24380
24477
|
createChatWithContact = _ref.createChatWithContact,
|
|
@@ -24434,7 +24531,7 @@ var ChannelInfo$1 = styled.div(_templateObject$8 || (_templateObject$8 = _tagged
|
|
|
24434
24531
|
return props.subjectColor || props.textColor;
|
|
24435
24532
|
});
|
|
24436
24533
|
var AvatarWrapper$1 = styled.div(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n position: relative;\n"])));
|
|
24437
|
-
var UserStatus$1 = styled.span(_templateObject3$
|
|
24534
|
+
var UserStatus$1 = styled.span(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteralLoose(["\n position: absolute;\n width: 12px;\n height: 12px;\n right: 0;\n bottom: 0;\n border-radius: 50%;\n background-color: ", ";\n border: 2.5px solid ", ";\n box-sizing: border-box;\n"])), function (props) {
|
|
24438
24535
|
return props.backgroundColor || '#56E464';
|
|
24439
24536
|
}, function (props) {
|
|
24440
24537
|
return props.borderColor || '#ffffff';
|
|
@@ -24680,7 +24777,7 @@ function SvgLinkIconWb(props) {
|
|
|
24680
24777
|
})));
|
|
24681
24778
|
}
|
|
24682
24779
|
|
|
24683
|
-
var _templateObject$a, _templateObject2$9, _templateObject3$
|
|
24780
|
+
var _templateObject$a, _templateObject2$9, _templateObject3$7, _templateObject4$6;
|
|
24684
24781
|
function AddMembersListItemInviteLink(_ref) {
|
|
24685
24782
|
var _getInviteLinkOptions;
|
|
24686
24783
|
var onClick = _ref.onClick;
|
|
@@ -24733,14 +24830,14 @@ var Row$1 = styled.div(_templateObject$a || (_templateObject$a = _taggedTemplate
|
|
|
24733
24830
|
var IconCircle = styled.span(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n min-width: 40px;\n border-radius: 50%;\n background-color: ", ";\n box-sizing: border-box;\n border: 0.5px solid rgba(0, 0, 0, 0.14);\n overflow: hidden;\n"])), function (props) {
|
|
24734
24831
|
return props.backgroundColor;
|
|
24735
24832
|
});
|
|
24736
|
-
var StyledLinkIcon = styled(SvgLinkIconWb)(_templateObject3$
|
|
24833
|
+
var StyledLinkIcon = styled(SvgLinkIconWb)(_templateObject3$7 || (_templateObject3$7 = _taggedTemplateLiteralLoose(["\n color: ", ";\n /* keep default fill from theme surface */\n"])), function (props) {
|
|
24737
24834
|
return props.color;
|
|
24738
24835
|
});
|
|
24739
24836
|
var Title$1 = styled.h4(_templateObject4$6 || (_templateObject4$6 = _taggedTemplateLiteralLoose(["\n margin: 0 0 0 12px;\n font-size: 15px;\n font-weight: 500;\n line-height: 16px;\n color: ", ";\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n"])), function (props) {
|
|
24740
24837
|
return props.color;
|
|
24741
24838
|
});
|
|
24742
24839
|
|
|
24743
|
-
var _templateObject$b, _templateObject2$a, _templateObject3$
|
|
24840
|
+
var _templateObject$b, _templateObject2$a, _templateObject3$8, _templateObject4$7, _templateObject5$4, _templateObject6$3, _templateObject7$3, _templateObject8$3, _templateObject9$2, _templateObject0$2, _templateObject1$2;
|
|
24744
24841
|
var UsersPopup = function UsersPopup(_ref) {
|
|
24745
24842
|
var channel = _ref.channel,
|
|
24746
24843
|
toggleCreatePopup = _ref.toggleCreatePopup,
|
|
@@ -25084,7 +25181,7 @@ var MembersContainer = styled(List)(_templateObject2$a || (_templateObject2$a =
|
|
|
25084
25181
|
}, function (props) {
|
|
25085
25182
|
return props.thumbColor;
|
|
25086
25183
|
});
|
|
25087
|
-
var SearchUserCont = styled.div(_templateObject3$
|
|
25184
|
+
var SearchUserCont = styled.div(_templateObject3$8 || (_templateObject3$8 = _taggedTemplateLiteralLoose(["\n position: relative;\n margin: 24px 12px 0;\n\n ", " {\n top: 10px;\n right: 11px;\n }\n"])), ClearTypedText);
|
|
25088
25185
|
var SearchUsersInput = styled.input(_templateObject4$7 || (_templateObject4$7 = _taggedTemplateLiteralLoose(["\n height: 40px;\n width: 100%;\n font-size: 14px;\n border: ", ";\n box-sizing: border-box;\n border-radius: 8px;\n padding-left: 36px;\n color: ", ";\n background-color: ", ";\n\n &::placeholder {\n color: ", ";\n font-size: 14px;\n opacity: 1;\n }\n\n &:focus {\n outline: none;\n }\n"])), function (props) {
|
|
25089
25186
|
return props.widthBorder ? "1px solid " + props.borderColor : 'none';
|
|
25090
25187
|
}, function (props) {
|
|
@@ -25309,7 +25406,7 @@ var Controls = styled.div(_templateObject2$b || (_templateObject2$b = _taggedTem
|
|
|
25309
25406
|
return props.tickColor;
|
|
25310
25407
|
});
|
|
25311
25408
|
|
|
25312
|
-
var _templateObject$d, _templateObject2$c, _templateObject3$
|
|
25409
|
+
var _templateObject$d, _templateObject2$c, _templateObject3$9, _templateObject4$8, _templateObject5$5, _templateObject6$4, _templateObject7$4, _templateObject8$4, _templateObject9$3;
|
|
25313
25410
|
function CreateChannel(_ref) {
|
|
25314
25411
|
var handleClose = _ref.handleClose,
|
|
25315
25412
|
channelType = _ref.channelType,
|
|
@@ -25670,7 +25767,7 @@ var UploadAvatarLabel = styled.label(_templateObject2$c || (_templateObject2$c =
|
|
|
25670
25767
|
}, function (props) {
|
|
25671
25768
|
return props.iconColor;
|
|
25672
25769
|
});
|
|
25673
|
-
var URILabel = styled.label(_templateObject3$
|
|
25770
|
+
var URILabel = styled.label(_templateObject3$9 || (_templateObject3$9 = _taggedTemplateLiteralLoose(["\n display: inline-block;\n font-weight: 500;\n font-size: 14px;\n line-height: 15px;\n margin-top: 18px;\n margin-bottom: 5px;\n"])));
|
|
25674
25771
|
var UploadChannelAvatar = styled.div(_templateObject4$8 || (_templateObject4$8 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n"])));
|
|
25675
25772
|
var FileUploaderInput = styled.input(_templateObject5$5 || (_templateObject5$5 = _taggedTemplateLiteralLoose(["\n display: none;\n"])));
|
|
25676
25773
|
var RemoveSelectedAvatar = styled.span(_templateObject6$4 || (_templateObject6$4 = _taggedTemplateLiteralLoose(["\n display: inline-block;\n margin-left: 16px;\n cursor: pointer;\n font-weight: 400;\n font-size: 15px;\n line-height: 20px;\n color: ", ";\n"])), function (props) {
|
|
@@ -25686,7 +25783,7 @@ var UriPrefix = styled.span(_templateObject9$3 || (_templateObject9$3 = _taggedT
|
|
|
25686
25783
|
return props.color;
|
|
25687
25784
|
});
|
|
25688
25785
|
|
|
25689
|
-
var _templateObject$e, _templateObject2$d, _templateObject3$
|
|
25786
|
+
var _templateObject$e, _templateObject2$d, _templateObject3$a;
|
|
25690
25787
|
var DropDownContainer = styled.div(_templateObject$e || (_templateObject$e = _taggedTemplateLiteralLoose(["\n position: relative;\n height: ", ";\n order: ", ";\n margin: ", ";\n ", ";\n"])), function (props) {
|
|
25691
25788
|
return props.height ? props.height : '100%';
|
|
25692
25789
|
}, function (props) {
|
|
@@ -25703,7 +25800,7 @@ var DropDownTriggerContainer = styled.div(_templateObject2$d || (_templateObject
|
|
|
25703
25800
|
}, function (props) {
|
|
25704
25801
|
return props.isOpen && "\n &::after {\n transform: translateY(-50%) rotate(-45deg);\n top: calc(50% + 2px);\n }\n ";
|
|
25705
25802
|
});
|
|
25706
|
-
var DropDownBody = styled.div(_templateObject3$
|
|
25803
|
+
var DropDownBody = styled.div(_templateObject3$a || (_templateObject3$a = _taggedTemplateLiteralLoose(["\n position: absolute;\n z-index: ", ";\n min-width: 200px;\n right: ", ";\n left: ", ";\n top: 100%;\n display: flex;\n direction: initial;\n flex-direction: column;\n background: ", ";\n border-radius: 8px;\n max-height: 220px;\n overflow-y: auto;\n border: 0.5px solid ", ";\n box-shadow: 0px 0px 24px 0px #11153929;\n\n & > * {\n &:first-child {\n margin-top: 5px;\n }\n\n &:first-child {\n margin-bottom: 5px;\n }\n }\n\n ", "\n"])), function (props) {
|
|
25707
25804
|
return props.zIndex || '30';
|
|
25708
25805
|
}, function (props) {
|
|
25709
25806
|
return props.position !== 'left' && '0';
|
|
@@ -25999,7 +26096,7 @@ function SvgLeave(props) {
|
|
|
25999
26096
|
})));
|
|
26000
26097
|
}
|
|
26001
26098
|
|
|
26002
|
-
var _templateObject$g, _templateObject2$e, _templateObject3$
|
|
26099
|
+
var _templateObject$g, _templateObject2$e, _templateObject3$b;
|
|
26003
26100
|
var EditProfile = function EditProfile(_ref) {
|
|
26004
26101
|
var handleCloseEditProfile = _ref.handleCloseEditProfile,
|
|
26005
26102
|
user = _ref.user;
|
|
@@ -26080,9 +26177,9 @@ var Container$5 = styled.div(_templateObject$g || (_templateObject$g = _taggedTe
|
|
|
26080
26177
|
return props.backgroundColor;
|
|
26081
26178
|
});
|
|
26082
26179
|
var EditAvatarCont = styled.div(_templateObject2$e || (_templateObject2$e = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n margin: 20px 0 24px;\n"])));
|
|
26083
|
-
var EditProfileBody = styled.div(_templateObject3$
|
|
26180
|
+
var EditProfileBody = styled.div(_templateObject3$b || (_templateObject3$b = _taggedTemplateLiteralLoose(["\n padding: 0 16px;\n margin-bottom: 16px;\n"])));
|
|
26084
26181
|
|
|
26085
|
-
var _templateObject$h, _templateObject2$f, _templateObject3$
|
|
26182
|
+
var _templateObject$h, _templateObject2$f, _templateObject3$c, _templateObject4$9, _templateObject5$6, _templateObject6$5;
|
|
26086
26183
|
var settingsPages = {
|
|
26087
26184
|
profile: 'Profile',
|
|
26088
26185
|
notifications: 'Notifications',
|
|
@@ -26166,7 +26263,7 @@ var Container$6 = styled.div(_templateObject$h || (_templateObject$h = _taggedTe
|
|
|
26166
26263
|
var SettingsHeader = styled.div(_templateObject2$f || (_templateObject2$f = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n padding: 16px;\n height: 64px;\n border-bottom: 1px solid ", ";\n box-sizing: border-box;\n"])), function (props) {
|
|
26167
26264
|
return props.borderColor;
|
|
26168
26265
|
});
|
|
26169
|
-
var ArrowLeftWrapper = styled.span(_templateObject3$
|
|
26266
|
+
var ArrowLeftWrapper = styled.span(_templateObject3$c || (_templateObject3$c = _taggedTemplateLiteralLoose(["\n display: flex;\n cursor: pointer;\n margin-right: 12px;\n svg {\n path {\n fill: ", ";\n }\n }\n"])), function (props) {
|
|
26170
26267
|
return props.color;
|
|
26171
26268
|
});
|
|
26172
26269
|
var ProfileInfo = styled.div(_templateObject4$9 || (_templateObject4$9 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n margin: 20px 0 24px;\n"])));
|
|
@@ -26177,9 +26274,9 @@ var UserNumber = styled.h4(_templateObject6$5 || (_templateObject6$5 = _taggedTe
|
|
|
26177
26274
|
return props.color;
|
|
26178
26275
|
});
|
|
26179
26276
|
|
|
26180
|
-
var _templateObject$i, _templateObject2$g, _templateObject3$
|
|
26277
|
+
var _templateObject$i, _templateObject2$g, _templateObject3$d, _templateObject4$a, _templateObject5$7, _templateObject6$6, _templateObject7$5, _templateObject8$5, _templateObject9$4, _templateObject0$3;
|
|
26181
26278
|
var ChannelList = function ChannelList(_ref) {
|
|
26182
|
-
var _activeChannel$member,
|
|
26279
|
+
var _activeChannel$member, _searchedChannels$cha, _searchedChannels$cha2, _searchedChannels$con, _searchedChannels$cha3, _searchedChannels$cha4, _searchedChannels$cha5, _searchedChannels$cha6;
|
|
26183
26280
|
var className = _ref.className,
|
|
26184
26281
|
selectedChannelBackground = _ref.selectedChannelBackground,
|
|
26185
26282
|
selectedChannelLeftBorder = _ref.selectedChannelLeftBorder,
|
|
@@ -26478,7 +26575,7 @@ var ChannelList = function ChannelList(_ref) {
|
|
|
26478
26575
|
backgroundColor: backgroundColor || background
|
|
26479
26576
|
}, /*#__PURE__*/React__default.createElement(ChannelListHeader, {
|
|
26480
26577
|
withCustomList: !!List,
|
|
26481
|
-
maxWidth:
|
|
26578
|
+
maxWidth: '100%',
|
|
26482
26579
|
borderColor: borderColor,
|
|
26483
26580
|
padding: searchChannelsPadding
|
|
26484
26581
|
}, Profile, showSearch && searchChannelsPosition === 'inline' ? (/*#__PURE__*/React__default.createElement(ChannelSearch, {
|
|
@@ -26812,7 +26909,7 @@ var Container$7 = styled.div(_templateObject$i || (_templateObject$i = _taggedTe
|
|
|
26812
26909
|
var ChannelsList = styled.div(_templateObject2$g || (_templateObject2$g = _taggedTemplateLiteralLoose(["\n overflow-y: auto;\n width: 400px;\n height: 100%;\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n"])), function (props) {
|
|
26813
26910
|
return props.thumbColor;
|
|
26814
26911
|
});
|
|
26815
|
-
var SearchedChannels = styled.div(_templateObject3$
|
|
26912
|
+
var SearchedChannels = styled.div(_templateObject3$d || (_templateObject3$d = _taggedTemplateLiteralLoose(["\n height: calc(100vh - 123px);\n overflow-x: hidden;\n"])));
|
|
26816
26913
|
var SearchedChannelsHeader = styled.p(_templateObject4$a || (_templateObject4$a = _taggedTemplateLiteralLoose(["\n padding-left: 16px;\n font-weight: 500;\n font-size: ", ";\n line-height: 14px;\n color: ", ";\n"])), function (props) {
|
|
26817
26914
|
return props.fontSize || '15px';
|
|
26818
26915
|
}, function (props) {
|
|
@@ -26830,7 +26927,7 @@ var NoData = styled.div(_templateObject8$5 || (_templateObject8$5 = _taggedTempl
|
|
|
26830
26927
|
});
|
|
26831
26928
|
var LoadingWrapper = styled.div(_templateObject9$4 || (_templateObject9$4 = _taggedTemplateLiteralLoose(["\n position: absolute;\n left: calc(50% - 20px);\n top: calc(50% - 20px);\n"])));
|
|
26832
26929
|
var ChannelListHeader = styled.div(_templateObject0$3 || (_templateObject0$3 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n flex-direction: row;\n justify-content: space-between;\n max-width: ", ";\n padding: ", ";\n box-sizing: border-box;\n padding-left: ", ";\n border-right: ", ";\n"])), function (props) {
|
|
26833
|
-
return props.maxWidth ? props.maxWidth
|
|
26930
|
+
return props.maxWidth ? "" + props.maxWidth : 'inherit';
|
|
26834
26931
|
}, function (props) {
|
|
26835
26932
|
return props.padding || '12px';
|
|
26836
26933
|
}, function (props) {
|
|
@@ -26864,7 +26961,7 @@ function SvgMessage(props) {
|
|
|
26864
26961
|
})));
|
|
26865
26962
|
}
|
|
26866
26963
|
|
|
26867
|
-
var _templateObject$j, _templateObject2$h, _templateObject3$
|
|
26964
|
+
var _templateObject$j, _templateObject2$h, _templateObject3$e, _templateObject4$b, _templateObject5$8;
|
|
26868
26965
|
var detailsSwitcherTimeout;
|
|
26869
26966
|
function Chat(_ref) {
|
|
26870
26967
|
var children = _ref.children,
|
|
@@ -26957,7 +27054,7 @@ var Container$8 = styled.div(_templateObject$j || (_templateObject$j = _taggedTe
|
|
|
26957
27054
|
var SelectChatContainer = styled.div(_templateObject2$h || (_templateObject2$h = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: ", ";\n z-index: 99;\n"])), function (props) {
|
|
26958
27055
|
return props.backgroundColor;
|
|
26959
27056
|
});
|
|
26960
|
-
var SelectChatContent = styled.div(_templateObject3$
|
|
27057
|
+
var SelectChatContent = styled.div(_templateObject3$e || (_templateObject3$e = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n\n & > svg {\n color: ", ";\n }\n"])), function (props) {
|
|
26961
27058
|
return props.iconColor;
|
|
26962
27059
|
});
|
|
26963
27060
|
var SelectChatTitle = styled.h3(_templateObject4$b || (_templateObject4$b = _taggedTemplateLiteralLoose(["\n font-size: 20px;\n font-style: normal;\n font-weight: 500;\n line-height: 24px;\n color: ", ";\n margin: 24px 0 8px;\n"])), function (props) {
|
|
@@ -26992,7 +27089,7 @@ function SvgInfo(props) {
|
|
|
26992
27089
|
})));
|
|
26993
27090
|
}
|
|
26994
27091
|
|
|
26995
|
-
var _templateObject$k, _templateObject2$i, _templateObject3$
|
|
27092
|
+
var _templateObject$k, _templateObject2$i, _templateObject3$f, _templateObject4$c, _templateObject5$9, _templateObject6$7, _templateObject7$6, _templateObject8$6, _templateObject9$5, _templateObject0$4;
|
|
26996
27093
|
function ChatHeader(_ref) {
|
|
26997
27094
|
var infoIcon = _ref.infoIcon,
|
|
26998
27095
|
backgroundColor = _ref.backgroundColor,
|
|
@@ -27120,7 +27217,7 @@ var ChannelInfo$2 = styled.div(_templateObject2$i || (_templateObject2$i = _tagg
|
|
|
27120
27217
|
}, function (props) {
|
|
27121
27218
|
return props.order;
|
|
27122
27219
|
}, UserStatus);
|
|
27123
|
-
var ChannelName = styled.div(_templateObject3$
|
|
27220
|
+
var ChannelName = styled.div(_templateObject3$f || (_templateObject3$f = _taggedTemplateLiteralLoose(["\n margin-left: 7px;\n width: 100%;\n\n & > ", " {\n max-width: calc(100% - 8px);\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n"])), SectionHeader);
|
|
27124
27221
|
var CustomActionsWrapper = styled.div(_templateObject4$c || (_templateObject4$c = _taggedTemplateLiteralLoose(["\n order: ", ";\n"])), function (props) {
|
|
27125
27222
|
return props.order;
|
|
27126
27223
|
});
|
|
@@ -27586,7 +27683,7 @@ function SvgFullscreenExit(props) {
|
|
|
27586
27683
|
})));
|
|
27587
27684
|
}
|
|
27588
27685
|
|
|
27589
|
-
var _templateObject$m, _templateObject2$j, _templateObject3$
|
|
27686
|
+
var _templateObject$m, _templateObject2$j, _templateObject3$g, _templateObject4$d, _templateObject5$a, _templateObject6$8, _templateObject7$7, _templateObject8$7, _templateObject9$6, _templateObject0$5, _templateObject1$3;
|
|
27590
27687
|
var timerInterval;
|
|
27591
27688
|
var VideoPlayer = function VideoPlayer(_ref) {
|
|
27592
27689
|
var src = _ref.src,
|
|
@@ -27802,7 +27899,7 @@ var Component = styled.div(_templateObject$m || (_templateObject$m = _taggedTemp
|
|
|
27802
27899
|
return props.loaded && '';
|
|
27803
27900
|
});
|
|
27804
27901
|
var UploadCont = styled.div(_templateObject2$j || (_templateObject2$j = _taggedTemplateLiteralLoose(["\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n min-height: 100px;\n min-width: 100px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
27805
|
-
var PlayPauseWrapper = styled.span(_templateObject3$
|
|
27902
|
+
var PlayPauseWrapper = styled.span(_templateObject3$g || (_templateObject3$g = _taggedTemplateLiteralLoose(["\n display: inline-block;\n width: 20px;\n height: 20px;\n margin-right: 16px;\n cursor: pointer;\n @media (max-width: 768px) {\n margin-right: 8px;\n width: 18px;\n height: 18px;\n & > svg {\n width: 18px;\n height: 18px;\n }\n }\n @media (max-width: 480px) {\n margin-right: 8px;\n width: 16px;\n height: 16px;\n & > svg {\n width: 16px;\n height: 16px;\n }\n }\n"])));
|
|
27806
27903
|
var ControlsContainer = styled.div(_templateObject4$d || (_templateObject4$d = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: 0;\n left: 0;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n width: calc(100% - 32px);\n background: linear-gradient(360deg, rgba(23, 25, 28, 0.8) 0%, rgba(23, 25, 28, 0) 100%);\n padding: 10px 16px 16px;\n z-index: 20;\n\n @media (max-width: 768px) {\n width: calc(100% - 20px);\n padding: 0 10px;\n }\n"])));
|
|
27807
27904
|
var ControlTime = styled.span(_templateObject5$a || (_templateObject5$a = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-weight: 400;\n font-size: 15px;\n line-height: 20px;\n letter-spacing: -0.2px;\n @media (max-width: 768px) {\n font-size: 14px;\n }\n @media (max-width: 480px) {\n font-size: 12px;\n }\n"])), function (props) {
|
|
27808
27905
|
return props.color;
|
|
@@ -27814,7 +27911,7 @@ var VolumeSlide = styled.input(_templateObject9$6 || (_templateObject9$6 = _tagg
|
|
|
27814
27911
|
var Progress = styled.input(_templateObject0$5 || (_templateObject0$5 = _taggedTemplateLiteralLoose(["\n -webkit-appearance: none;\n margin-right: 15px;\n width: 100%;\n height: 4px;\n background: rgba(255, 255, 255, 0.6);\n border-radius: 5px;\n background-image: linear-gradient(#fff, #fff);\n //background-size: 70% 100%;\n background-repeat: no-repeat;\n cursor: pointer;\n\n &::-webkit-slider-thumb {\n -webkit-appearance: none;\n height: 16px;\n width: 16px;\n border-radius: 50%;\n background: #fff;\n cursor: pointer;\n box-shadow: 0 0 2px 0 #555;\n transition: all 0.3s ease-in-out;\n }\n &::-moz-range-thumb {\n -webkit-appearance: none;\n height: 16px;\n width: 16px;\n border-radius: 50%;\n background: #fff;\n cursor: pointer;\n box-shadow: 0 0 2px 0 #555;\n transition: all 0.3s ease-in-out;\n }\n\n &::-ms-thumb {\n -webkit-appearance: none;\n height: 16px;\n width: 16px;\n border-radius: 50%;\n background: #fff;\n cursor: pointer;\n box-shadow: 0 0 2px 0 #555;\n transition: all 0.3s ease-in-out;\n }\n\n &::-webkit-slider-thumb:hover {\n background: #fff;\n }\n &::-moz-range-thumb:hover {\n background: #fff;\n }\n &::-ms-thumb:hover {\n background: #fff;\n }\n\n &::-webkit-slider-runnable-track {\n -webkit-appearance: none;\n box-shadow: none;\n border: none;\n background: transparent;\n transition: all 0.3s ease-in-out;\n }\n\n &::-moz-range-track {\n -webkit-appearance: none;\n box-shadow: none;\n border: none;\n background: transparent;\n transition: all 0.3s ease-in-out;\n }\n &::-ms-track {\n -webkit-appearance: none;\n box-shadow: none;\n border: none;\n background: transparent;\n transition: all 0.3s ease-in-out;\n }\n"])));
|
|
27815
27912
|
var FullScreenWrapper = styled.div(_templateObject1$3 || (_templateObject1$3 = _taggedTemplateLiteralLoose(["\n display: flex;\n margin-left: 16px;\n cursor: pointer;\n @media (max-width: 768px) {\n margin-left: 12px;\n & > svg {\n width: 18px;\n height: 18px;\n }\n }\n @media (max-width: 480px) {\n margin-left: auto;\n & > svg {\n width: 16px;\n height: 16px;\n }\n }\n"])));
|
|
27816
27913
|
|
|
27817
|
-
var _templateObject$n, _templateObject2$k, _templateObject3$
|
|
27914
|
+
var _templateObject$n, _templateObject2$k, _templateObject3$h, _templateObject4$e, _templateObject5$b, _templateObject6$9, _templateObject7$8, _templateObject8$8, _templateObject9$7, _templateObject0$6, _templateObject1$4;
|
|
27818
27915
|
function ForwardMessagePopup(_ref) {
|
|
27819
27916
|
var title = _ref.title,
|
|
27820
27917
|
buttonText = _ref.buttonText,
|
|
@@ -27865,7 +27962,7 @@ function ForwardMessagePopup(_ref) {
|
|
|
27865
27962
|
if (event.target.scrollTop >= event.target.scrollHeight - event.target.offsetHeight - 100) {
|
|
27866
27963
|
if (channelsLoading === LOADING_STATE.LOADED && channelsHasNext && !loadingRef.current) {
|
|
27867
27964
|
loadingRef.current = true;
|
|
27868
|
-
dispatch(loadMoreChannelsForForward(
|
|
27965
|
+
dispatch(loadMoreChannelsForForward(20));
|
|
27869
27966
|
var timeout = setTimeout(function () {
|
|
27870
27967
|
loadingRef.current = false;
|
|
27871
27968
|
clearTimeout(timeout);
|
|
@@ -28138,7 +28235,7 @@ var ForwardChannelsCont = styled.div(_templateObject$n || (_templateObject$n = _
|
|
|
28138
28235
|
var ChannelItem = styled.div(_templateObject2$k || (_templateObject2$k = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n padding: 8px 12px;\n cursor: pointer;\n border-radius: 8px;\n &:hover {\n background-color: ", ";\n }\n &:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n"])), function (props) {
|
|
28139
28236
|
return props.backgroundHover;
|
|
28140
28237
|
});
|
|
28141
|
-
var ChannelInfo$3 = styled.div(_templateObject3$
|
|
28238
|
+
var ChannelInfo$3 = styled.div(_templateObject3$h || (_templateObject3$h = _taggedTemplateLiteralLoose(["\n margin-left: 12px;\n margin-right: auto;\n max-width: calc(100% - 74px);\n"])));
|
|
28142
28239
|
var ChannelsGroupTitle = styled.h4(_templateObject4$e || (_templateObject4$e = _taggedTemplateLiteralLoose(["\n font-weight: 500;\n font-size: 15px;\n line-height: 14px;\n margin: ", ";\n color: ", ";\n"])), function (props) {
|
|
28143
28240
|
return props.margin || '20px 0 12px';
|
|
28144
28241
|
}, function (props) {
|
|
@@ -28334,7 +28431,7 @@ var DeleteOptionItem = styled.div(_templateObject2$m || (_templateObject2$m = _t
|
|
|
28334
28431
|
return props.color;
|
|
28335
28432
|
});
|
|
28336
28433
|
|
|
28337
|
-
var _templateObject$q, _templateObject2$n, _templateObject3$
|
|
28434
|
+
var _templateObject$q, _templateObject2$n, _templateObject3$i, _templateObject4$f, _templateObject5$c, _templateObject6$a, _templateObject7$9, _templateObject8$9, _templateObject9$8, _templateObject0$7, _templateObject1$5, _templateObject10$2, _templateObject11$2, _templateObject12$2, _templateObject13$2;
|
|
28338
28435
|
var SliderPopup = function SliderPopup(_ref) {
|
|
28339
28436
|
var channel = _ref.channel,
|
|
28340
28437
|
setIsSliderOpen = _ref.setIsSliderOpen,
|
|
@@ -28859,7 +28956,7 @@ var SliderPopup = function SliderPopup(_ref) {
|
|
|
28859
28956
|
};
|
|
28860
28957
|
var Container$b = styled.div(_templateObject$q || (_templateObject$q = _taggedTemplateLiteralLoose(["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n height: 100vh;\n z-index: 999;\n"])));
|
|
28861
28958
|
var ProgressWrapper = styled.span(_templateObject2$n || (_templateObject2$n = _taggedTemplateLiteralLoose(["\n display: inline-block;\n width: 35px;\n height: 35px;\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"])));
|
|
28862
|
-
var SliderHeader = styled.div(_templateObject3$
|
|
28959
|
+
var SliderHeader = styled.div(_templateObject3$i || (_templateObject3$i = _taggedTemplateLiteralLoose(["\n height: 60px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 16px;\n background-color: rgba(0, 0, 0, 0.8);\n"])));
|
|
28863
28960
|
var SliderBody = styled.div(_templateObject4$f || (_templateObject4$f = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: calc(100% - 60px);\n background: rgba(0, 0, 0, 0.8);\n display: flex;\n align-items: center;\n justify-content: center;\n\n & .custom_carousel {\n height: 100%;\n\n & .rec.rec-carousel,\n & .rec.rec-slider {\n height: 100% !important;\n }\n }\n\n & .rec-carousel-item {\n display: flex;\n align-items: center;\n }\n"])));
|
|
28864
28961
|
var FileInfo = styled.div(_templateObject5$c || (_templateObject5$c = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n width: 40%;\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n line-height: 14px;\n min-width: 230px;\n"])));
|
|
28865
28962
|
var Info = styled.div(_templateObject6$a || (_templateObject6$a = _taggedTemplateLiteralLoose(["\n margin-left: 12px;\n"])));
|
|
@@ -29052,7 +29149,7 @@ function SvgSelectionIcon(props) {
|
|
|
29052
29149
|
})));
|
|
29053
29150
|
}
|
|
29054
29151
|
|
|
29055
|
-
var _templateObject$s, _templateObject2$o, _templateObject3$
|
|
29152
|
+
var _templateObject$s, _templateObject2$o, _templateObject3$j, _templateObject4$g, _templateObject5$d, _templateObject6$b, _templateObject7$a, _templateObject8$a, _templateObject9$9, _templateObject0$8;
|
|
29056
29153
|
var reactionsPrevLength = 0;
|
|
29057
29154
|
function ReactionsPopup(_ref) {
|
|
29058
29155
|
var messageId = _ref.messageId,
|
|
@@ -29282,7 +29379,7 @@ var Container$d = styled.div(_templateObject$s || (_templateObject$s = _taggedTe
|
|
|
29282
29379
|
return props.backgroundColor;
|
|
29283
29380
|
});
|
|
29284
29381
|
var UserNamePresence$1 = styled.div(_templateObject2$o || (_templateObject2$o = _taggedTemplateLiteralLoose(["\n width: calc(100% - 70px);\n margin-left: 12px;\n"])));
|
|
29285
|
-
var MemberName$1 = styled.h3(_templateObject3$
|
|
29382
|
+
var MemberName$1 = styled.h3(_templateObject3$j || (_templateObject3$j = _taggedTemplateLiteralLoose(["\n margin: 0;\n max-width: calc(100% - 7px);\n font-weight: 500;\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.2px;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n color: ", ";\n & > span {\n color: ", ";\n }\n"])), function (props) {
|
|
29286
29383
|
return props.color;
|
|
29287
29384
|
}, function (props) {
|
|
29288
29385
|
return props.color;
|
|
@@ -29648,7 +29745,7 @@ function SvgInfoAction(props) {
|
|
|
29648
29745
|
})));
|
|
29649
29746
|
}
|
|
29650
29747
|
|
|
29651
|
-
var _templateObject$t, _templateObject2$p, _templateObject3$
|
|
29748
|
+
var _templateObject$t, _templateObject2$p, _templateObject3$k;
|
|
29652
29749
|
function MessageActions(_ref) {
|
|
29653
29750
|
var _ref$isPollMessage = _ref.isPollMessage,
|
|
29654
29751
|
isPollMessage = _ref$isPollMessage === void 0 ? false : _ref$isPollMessage,
|
|
@@ -29908,7 +30005,7 @@ var EditMessageContainer = styled.div(_templateObject2$p || (_templateObject2$p
|
|
|
29908
30005
|
}, function (props) {
|
|
29909
30006
|
return props.backgroundColor;
|
|
29910
30007
|
});
|
|
29911
|
-
var Action = styled.div(_templateObject3$
|
|
30008
|
+
var Action = styled.div(_templateObject3$k || (_templateObject3$k = _taggedTemplateLiteralLoose(["\n position: relative;\n display: flex;\n padding: 4px;\n margin: 8px 6px;\n cursor: pointer;\n transition: all 0.2s;\n order: ", ";\n color: ", ";\n border-radius: 50%;\n\n &:first-child {\n margin-left: 8px;\n }\n\n &:last-child {\n margin-right: 8px;\n }\n\n &:hover {\n color: ", ";\n background-color: ", ";\n\n ", " {\n display: block;\n }\n }\n"])), function (props) {
|
|
29912
30009
|
return props.order || 1;
|
|
29913
30010
|
}, function (props) {
|
|
29914
30011
|
return props.iconColor;
|
|
@@ -30032,7 +30129,7 @@ function SvgPlayVideo(props) {
|
|
|
30032
30129
|
})));
|
|
30033
30130
|
}
|
|
30034
30131
|
|
|
30035
|
-
var _templateObject$u, _templateObject2$q, _templateObject3$
|
|
30132
|
+
var _templateObject$u, _templateObject2$q, _templateObject3$l, _templateObject4$h, _templateObject5$e, _templateObject6$c, _templateObject7$b;
|
|
30036
30133
|
var VideoPreview = /*#__PURE__*/memo(function VideoPreview(_ref) {
|
|
30037
30134
|
var width = _ref.width,
|
|
30038
30135
|
height = _ref.height,
|
|
@@ -30145,7 +30242,7 @@ var VideoPreview = /*#__PURE__*/memo(function VideoPreview(_ref) {
|
|
|
30145
30242
|
preload: 'auto',
|
|
30146
30243
|
id: 'video',
|
|
30147
30244
|
src: file.attachmentUrl || videoUrl
|
|
30148
|
-
}), videoCurrentTime && !isRepliedMessage && (/*#__PURE__*/React__default.createElement(VideoControls, null, !isPreview && !!videoCurrentTime && !isRepliedMessage && !uploading && !isDetailsView && (
|
|
30245
|
+
}), videoCurrentTime && !isRepliedMessage && (!isDetailsView || !loading) && (/*#__PURE__*/React__default.createElement(VideoControls, null, !isPreview && !!videoCurrentTime && !isRepliedMessage && !uploading && !isDetailsView && (
|
|
30149
30246
|
/*#__PURE__*/
|
|
30150
30247
|
React__default.createElement(VideoPlayButton, null, /*#__PURE__*/React__default.createElement(SvgPlayVideo, null))), /*#__PURE__*/React__default.createElement(VideoTime, {
|
|
30151
30248
|
isDetailsView: isDetailsView,
|
|
@@ -30172,7 +30269,7 @@ var VideoTime = styled.div(_templateObject2$q || (_templateObject2$q = _taggedTe
|
|
|
30172
30269
|
}, function (props) {
|
|
30173
30270
|
return props.color;
|
|
30174
30271
|
});
|
|
30175
|
-
var VideoPlayButton = styled.div(_templateObject3$
|
|
30272
|
+
var VideoPlayButton = styled.div(_templateObject3$l || (_templateObject3$l = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n visibility: ", ";\n"])), function (props) {
|
|
30176
30273
|
return props.showOnHover && 'hidden';
|
|
30177
30274
|
});
|
|
30178
30275
|
var Component$1 = styled.div(_templateObject4$h || (_templateObject4$h = _taggedTemplateLiteralLoose(["\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n max-width: 100%;\n max-height: 100%;\n width: ", ";\n height: ", ";\n min-height: ", ";\n\n ", ";\n /*width: 100vw;\n background-color: transparent;\n margin-top: -50vw;\n padding: 0 40px;\n z-index: 20;*/\n\n & > video {\n max-width: 100%;\n max-height: 100%;\n width: ", ";\n height: ", ";\n min-height: ", ";\n border: ", ";\n object-fit: cover;\n box-sizing: border-box;\n border-radius: ", ";\n }\n\n &:hover {\n & ", " {\n visibility: visible;\n }\n }\n"])), function (props) {
|
|
@@ -32139,7 +32236,7 @@ class WaveSurfer extends Player {
|
|
|
32139
32236
|
WaveSurfer.BasePlugin = BasePlugin;
|
|
32140
32237
|
WaveSurfer.dom = dom;
|
|
32141
32238
|
|
|
32142
|
-
var _templateObject$v, _templateObject2$r, _templateObject3$
|
|
32239
|
+
var _templateObject$v, _templateObject2$r, _templateObject3$m, _templateObject4$i, _templateObject5$f, _templateObject6$d;
|
|
32143
32240
|
var AudioPlayer = function AudioPlayer(_ref) {
|
|
32144
32241
|
var url = _ref.url,
|
|
32145
32242
|
file = _ref.file,
|
|
@@ -32359,7 +32456,7 @@ var Container$e = styled.div(_templateObject$v || (_templateObject$v = _taggedTe
|
|
|
32359
32456
|
var PlayPause = styled.div(_templateObject2$r || (_templateObject2$r = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n\n & > svg {\n color: ", ";\n display: flex;\n width: 40px;\n height: 40px;\n }\n"])), function (props) {
|
|
32360
32457
|
return props.iconColor;
|
|
32361
32458
|
});
|
|
32362
|
-
var AudioVisualization = styled.div(_templateObject3$
|
|
32459
|
+
var AudioVisualization = styled.div(_templateObject3$m || (_templateObject3$m = _taggedTemplateLiteralLoose(["\n width: 100%;\n"])));
|
|
32363
32460
|
var AudioRate = styled.div(_templateObject4$i || (_templateObject4$i = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n width: 30px;\n min-width: 30px;\n border-radius: 12px;\n font-weight: 600;\n font-size: 12px;\n line-height: 14px;\n color: ", ";\n height: 18px;\n box-sizing: border-box;\n margin-left: 14px;\n cursor: pointer;\n\n & > span {\n margin-top: auto;\n line-height: 16px;\n font-size: 9px;\n }\n"])), function (props) {
|
|
32364
32461
|
return props.backgroundColor;
|
|
32365
32462
|
}, function (props) {
|
|
@@ -32370,7 +32467,7 @@ var Timer$1 = styled.div(_templateObject6$d || (_templateObject6$d = _taggedTemp
|
|
|
32370
32467
|
return props.color;
|
|
32371
32468
|
});
|
|
32372
32469
|
|
|
32373
|
-
var _templateObject$w, _templateObject2$s, _templateObject3$
|
|
32470
|
+
var _templateObject$w, _templateObject2$s, _templateObject3$n, _templateObject4$j, _templateObject5$g, _templateObject6$e, _templateObject7$c, _templateObject8$b, _templateObject9$a, _templateObject0$9, _templateObject1$6, _templateObject10$3, _templateObject11$3;
|
|
32374
32471
|
var Attachment = function Attachment(_ref) {
|
|
32375
32472
|
var attachment = _ref.attachment,
|
|
32376
32473
|
_ref$isPreview = _ref.isPreview,
|
|
@@ -33028,7 +33125,7 @@ var AttachmentImgCont = styled.div(_templateObject2$s || (_templateObject2$s = _
|
|
|
33028
33125
|
}, DownloadImage, function (props) {
|
|
33029
33126
|
return props.isPreview && "\n width: 48px;\n min-width: 48px;\n height: 48px;\n ";
|
|
33030
33127
|
});
|
|
33031
|
-
var FileThumbnail = styled.img(_templateObject3$
|
|
33128
|
+
var FileThumbnail = styled.img(_templateObject3$n || (_templateObject3$n = _taggedTemplateLiteralLoose(["\n min-width: 40px;\n max-width: 40px;\n height: 40px;\n object-fit: cover;\n border-radius: 8px;\n"])));
|
|
33032
33129
|
var DownloadFile$1 = styled.span(_templateObject4$j || (_templateObject4$j = _taggedTemplateLiteralLoose(["\n display: none;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n background-color: ", ";\n min-width: 40px;\n max-width: 40px;\n height: 40px;\n position: ", ";\n border-radius: ", ";\n\n & > svg {\n width: 20px;\n height: 20px;\n }\n"])), function (props) {
|
|
33033
33130
|
return props.backgroundColor;
|
|
33034
33131
|
}, function (props) {
|
|
@@ -33098,7 +33195,7 @@ var VideoCont = styled.div(_templateObject11$3 || (_templateObject11$3 = _tagged
|
|
|
33098
33195
|
return props.isDetailsView && '100%';
|
|
33099
33196
|
});
|
|
33100
33197
|
|
|
33101
|
-
var _templateObject$x, _templateObject2$t, _templateObject3$
|
|
33198
|
+
var _templateObject$x, _templateObject2$t, _templateObject3$o, _templateObject4$k;
|
|
33102
33199
|
var RepliedMessage = function RepliedMessage(_ref) {
|
|
33103
33200
|
var _message$parentMessag;
|
|
33104
33201
|
var message = _ref.message,
|
|
@@ -33221,7 +33318,7 @@ var ReplyMessageBody = styled.div(_templateObject2$t || (_templateObject2$t = _t
|
|
|
33221
33318
|
}, function (props) {
|
|
33222
33319
|
return props.maxWidth || '100%';
|
|
33223
33320
|
});
|
|
33224
|
-
var MessageStatusDeleted = styled.span(_templateObject3$
|
|
33321
|
+
var MessageStatusDeleted = styled.span(_templateObject3$o || (_templateObject3$o = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-size: ", ";\n font-style: italic;\n"])), function (props) {
|
|
33225
33322
|
return props.color;
|
|
33226
33323
|
}, function (props) {
|
|
33227
33324
|
return props.fontSize;
|
|
@@ -33710,7 +33807,7 @@ var EMOJIS = [{
|
|
|
33710
33807
|
}]
|
|
33711
33808
|
}];
|
|
33712
33809
|
|
|
33713
|
-
var _templateObject$z, _templateObject2$u, _templateObject3$
|
|
33810
|
+
var _templateObject$z, _templateObject2$u, _templateObject3$p, _templateObject4$l, _templateObject5$h, _templateObject6$f, _templateObject7$d, _templateObject8$c;
|
|
33714
33811
|
var EmojiIcon = function EmojiIcon(_ref) {
|
|
33715
33812
|
var collectionName = _ref.collectionName;
|
|
33716
33813
|
switch (collectionName) {
|
|
@@ -33911,7 +34008,7 @@ var EmojiHeader = styled.div(_templateObject2$u || (_templateObject2$u = _tagged
|
|
|
33911
34008
|
}, function (props) {
|
|
33912
34009
|
return props.padding || '6px 18px';
|
|
33913
34010
|
});
|
|
33914
|
-
var EmojiSection = styled.div(_templateObject3$
|
|
34011
|
+
var EmojiSection = styled.div(_templateObject3$p || (_templateObject3$p = _taggedTemplateLiteralLoose(["\n height: 180px;\n overflow-x: hidden;\n\n & ::selection {\n color: inherit;\n background: inherit;\n }\n"])));
|
|
33915
34012
|
var EmojiCollection = styled.span(_templateObject4$l || (_templateObject4$l = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n display: flex;\n justify-content: center;\n align-items: center;\n\n & > * {\n color: ", ";\n }\n"])), function (props) {
|
|
33916
34013
|
return props.iconColor;
|
|
33917
34014
|
});
|
|
@@ -33949,7 +34046,7 @@ function SvgPlus(props) {
|
|
|
33949
34046
|
})));
|
|
33950
34047
|
}
|
|
33951
34048
|
|
|
33952
|
-
var _templateObject$A, _templateObject2$v, _templateObject3$
|
|
34049
|
+
var _templateObject$A, _templateObject2$v, _templateObject3$q;
|
|
33953
34050
|
function FrequentlyEmojis(_ref) {
|
|
33954
34051
|
var handleAddEmoji = _ref.handleAddEmoji,
|
|
33955
34052
|
handleEmojiPopupToggle = _ref.handleEmojiPopupToggle,
|
|
@@ -34086,7 +34183,7 @@ var EmojiItem = styled.span(_templateObject2$v || (_templateObject2$v = _taggedT
|
|
|
34086
34183
|
}, function (props) {
|
|
34087
34184
|
return props.activeBackground;
|
|
34088
34185
|
});
|
|
34089
|
-
var OpenMoreEmojis = styled.span(_templateObject3$
|
|
34186
|
+
var OpenMoreEmojis = styled.span(_templateObject3$q || (_templateObject3$q = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n background-color: ", ";\n cursor: pointer;\n\n & > svg {\n color: ", ";\n height: 18px;\n width: 18px;\n }\n &:hover {\n background-color: ", ";\n & > svg {\n color: ", ";\n }\n }\n border-radius: 50%;\n"])), function (props) {
|
|
34090
34187
|
return props.iconBackgroundColor;
|
|
34091
34188
|
}, function (props) {
|
|
34092
34189
|
return props.iconColor;
|
|
@@ -34096,7 +34193,7 @@ var OpenMoreEmojis = styled.span(_templateObject3$p || (_templateObject3$p = _ta
|
|
|
34096
34193
|
return props.iconHoverColor;
|
|
34097
34194
|
});
|
|
34098
34195
|
|
|
34099
|
-
var _templateObject$B, _templateObject2$w, _templateObject3$
|
|
34196
|
+
var _templateObject$B, _templateObject2$w, _templateObject3$r, _templateObject4$m;
|
|
34100
34197
|
var MessageStatusAndTime = function MessageStatusAndTime(_ref) {
|
|
34101
34198
|
var message = _ref.message,
|
|
34102
34199
|
_ref$messageStatusDis = _ref.messageStatusDisplayingType,
|
|
@@ -34168,7 +34265,7 @@ var HiddenMessageTime = styled.span(_templateObject2$w || (_templateObject2$w =
|
|
|
34168
34265
|
}, function (props) {
|
|
34169
34266
|
return props.color;
|
|
34170
34267
|
});
|
|
34171
|
-
var MessageStatusAndTimeContainer = styled.span(_templateObject3$
|
|
34268
|
+
var MessageStatusAndTimeContainer = styled.span(_templateObject3$r || (_templateObject3$r = _taggedTemplateLiteralLoose(["\n visibility: ", ";\n display: ", ";\n align-items: flex-end;\n border-radius: 16px;\n padding: ", ";\n background-color: ", ";\n float: right;\n line-height: ", ";\n margin-right: ", ";\n margin-left: ", ";\n margin-bottom: ", ";\n direction: ", ";\n transform: translate(0px, 4px);\n white-space: nowrap;\n width: ", ";\n justify-content: ", ";\n z-index: 10;\n\n & > svg {\n margin-left: 4px;\n height: 14px;\n width: 16px;\n }\n\n & > ", " {\n color: ", ";\n }\n\n ", "\n"])), function (props) {
|
|
34172
34269
|
return props.showOnlyOnHover && 'hidden';
|
|
34173
34270
|
}, function (props) {
|
|
34174
34271
|
return props.hide ? 'none' : 'flex';
|
|
@@ -34201,7 +34298,7 @@ var MessageStatusUpdated = styled.span(_templateObject4$m || (_templateObject4$m
|
|
|
34201
34298
|
return props.color;
|
|
34202
34299
|
});
|
|
34203
34300
|
|
|
34204
|
-
var _templateObject$C, _templateObject2$x, _templateObject3$
|
|
34301
|
+
var _templateObject$C, _templateObject2$x, _templateObject3$s, _templateObject4$n, _templateObject5$i, _templateObject6$g, _templateObject7$e, _templateObject8$d, _templateObject9$b, _templateObject0$a, _templateObject1$7, _templateObject10$4;
|
|
34205
34302
|
var POLL_VOTES_LIMIT = 20;
|
|
34206
34303
|
var AllVotesPopup = function AllVotesPopup(_ref) {
|
|
34207
34304
|
var _pollVotesHasMore$key, _poll$voteDetails, _poll$voteDetails$vot, _poll$voteDetails3;
|
|
@@ -34317,7 +34414,7 @@ var AllVotesPopup = function AllVotesPopup(_ref) {
|
|
|
34317
34414
|
};
|
|
34318
34415
|
var VotesList = styled.div(_templateObject$C || (_templateObject$C = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n max-height: 500px;\n padding: 8px 0;\n"])));
|
|
34319
34416
|
var VoterRow = styled.div(_templateObject2$x || (_templateObject2$x = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 6px 0;\n"])));
|
|
34320
|
-
var VoterInfo = styled.div(_templateObject3$
|
|
34417
|
+
var VoterInfo = styled.div(_templateObject3$s || (_templateObject3$s = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n justify-content: space-between;\n"])));
|
|
34321
34418
|
var VoterName = styled.div(_templateObject4$n || (_templateObject4$n = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-weight: 500;\n font-size: 15px;\n line-height: 20px;\n letter-spacing: -0.2px;\n max-width: calc(100% - 120px);\n"])), function (p) {
|
|
34322
34419
|
return p.color;
|
|
34323
34420
|
});
|
|
@@ -34344,7 +34441,7 @@ var Loader = styled.div(_templateObject10$4 || (_templateObject10$4 = _taggedTem
|
|
|
34344
34441
|
return p.color;
|
|
34345
34442
|
});
|
|
34346
34443
|
|
|
34347
|
-
var _templateObject$D, _templateObject2$y, _templateObject3$
|
|
34444
|
+
var _templateObject$D, _templateObject2$y, _templateObject3$t, _templateObject4$o, _templateObject5$j, _templateObject6$h, _templateObject7$f, _templateObject8$e, _templateObject9$c, _templateObject0$b, _templateObject1$8, _templateObject10$5;
|
|
34348
34445
|
var VotesResultsPopup = function VotesResultsPopup(_ref) {
|
|
34349
34446
|
var _poll$voteDetails3, _poll$voteDetails4, _poll$options$find;
|
|
34350
34447
|
var onClose = _ref.onClose,
|
|
@@ -34478,7 +34575,7 @@ var OptionBlock = styled.div(_templateObject2$y || (_templateObject2$y = _tagged
|
|
|
34478
34575
|
}, function (p) {
|
|
34479
34576
|
return p.border;
|
|
34480
34577
|
});
|
|
34481
|
-
var OptionHeader = styled.div(_templateObject3$
|
|
34578
|
+
var OptionHeader = styled.div(_templateObject3$t || (_templateObject3$t = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 8px;\n"])));
|
|
34482
34579
|
var OptionTitle = styled.div(_templateObject4$o || (_templateObject4$o = _taggedTemplateLiteralLoose(["\n color: ", ";\n max-width: calc(100% - 60px);\n font-family: Inter;\n font-weight: 500;\n font-size: 15px;\n line-height: 20px;\n letter-spacing: -0.4px;\n"])), function (p) {
|
|
34483
34580
|
return p.color;
|
|
34484
34581
|
});
|
|
@@ -34523,7 +34620,7 @@ function SvgFilledCheckbox(props) {
|
|
|
34523
34620
|
})));
|
|
34524
34621
|
}
|
|
34525
34622
|
|
|
34526
|
-
var _templateObject$E, _templateObject2$z, _templateObject3$
|
|
34623
|
+
var _templateObject$E, _templateObject2$z, _templateObject3$u, _templateObject4$p, _templateObject5$k, _templateObject6$i, _templateObject7$g, _templateObject8$f, _templateObject9$d, _templateObject0$c, _templateObject1$9, _templateObject10$6, _templateObject11$4, _templateObject12$3;
|
|
34527
34624
|
var PollMessage = function PollMessage(_ref) {
|
|
34528
34625
|
var _poll$voteDetails3, _poll$voteDetails4, _poll$voteDetails5, _poll$voteDetails6, _poll$voteDetails7;
|
|
34529
34626
|
var message = _ref.message;
|
|
@@ -34576,7 +34673,7 @@ var PollMessage = function PollMessage(_ref) {
|
|
|
34576
34673
|
color: textPrimary
|
|
34577
34674
|
}, poll.name), /*#__PURE__*/React__default.createElement(SubTitle$1, {
|
|
34578
34675
|
color: textSecondary
|
|
34579
|
-
}, poll.
|
|
34676
|
+
}, poll.anonymous ? 'Anonymous poll · ' : '', poll.allowMultipleVotes ? 'Multiple Votes' : 'Single Vote'), /*#__PURE__*/React__default.createElement(Options, null, (poll.options || []).map(function (opt) {
|
|
34580
34677
|
var votes = votesPerOption[opt.id] || 0;
|
|
34581
34678
|
var pct = maxVotes > 0 ? Math.round(votes / maxVotes * 100) : 0;
|
|
34582
34679
|
var selected = ownVotedOptionIds.has(opt.id);
|
|
@@ -34654,10 +34751,10 @@ var PollMessage = function PollMessage(_ref) {
|
|
|
34654
34751
|
})));
|
|
34655
34752
|
};
|
|
34656
34753
|
var Container$h = styled.div(_templateObject$E || (_templateObject$E = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n min-width: 250px;\n width: 100%;\n"])));
|
|
34657
|
-
var Question$1 = styled.div(_templateObject2$z || (_templateObject2$z = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-weight: 500;\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.4px;\n"])), function (p) {
|
|
34754
|
+
var Question$1 = styled.div(_templateObject2$z || (_templateObject2$z = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-weight: 500;\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.4px;\n word-break: break-word;\n"])), function (p) {
|
|
34658
34755
|
return p.color;
|
|
34659
34756
|
});
|
|
34660
|
-
var SubTitle$1 = styled.div(_templateObject3$
|
|
34757
|
+
var SubTitle$1 = styled.div(_templateObject3$u || (_templateObject3$u = _taggedTemplateLiteralLoose(["\n color: ", ";\n margin: 4px 0 6px 0;\n font-weight: 400;\n font-size: 13px;\n line-height: 16px;\n letter-spacing: -0.08px;\n word-break: break-word;\n"])), function (p) {
|
|
34661
34758
|
return p.color;
|
|
34662
34759
|
});
|
|
34663
34760
|
var Options = styled.div(_templateObject4$p || (_templateObject4$p = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n margin-top: 4px;\n"])));
|
|
@@ -34678,7 +34775,7 @@ var EmptyCircle = styled.span(_templateObject8$f || (_templateObject8$f = _tagge
|
|
|
34678
34775
|
var StyledCheck = styled(SvgFilledCheckbox)(_templateObject9$d || (_templateObject9$d = _taggedTemplateLiteralLoose(["\n color: ", ";\n width: 18.5px;\n height: 18.5px;\n"])), function (p) {
|
|
34679
34776
|
return p.color;
|
|
34680
34777
|
});
|
|
34681
|
-
var Title$2 = styled.div(_templateObject0$c || (_templateObject0$c = _taggedTemplateLiteralLoose(["\n flex: 1 1 auto;\n color: ", ";\n margin-right: auto;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: -0.2px;\n max-width: calc(100% - 80px);\n"])), function (p) {
|
|
34778
|
+
var Title$2 = styled.div(_templateObject0$c || (_templateObject0$c = _taggedTemplateLiteralLoose(["\n flex: 1 1 auto;\n color: ", ";\n margin-right: auto;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: -0.2px;\n max-width: calc(100% - 80px);\n word-break: break-word;\n"])), function (p) {
|
|
34682
34779
|
return p.color;
|
|
34683
34780
|
});
|
|
34684
34781
|
var Votes = styled.span(_templateObject1$9 || (_templateObject1$9 = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: -0.2px;\n margin-left: 4px;\n"])), function (p) {
|
|
@@ -34692,7 +34789,7 @@ var Bar = styled.div(_templateObject10$6 || (_templateObject10$6 = _taggedTempla
|
|
|
34692
34789
|
var Fill = styled.div(_templateObject11$4 || (_templateObject11$4 = _taggedTemplateLiteralLoose(["\n height: 100%;\n border-radius: 6px;\n transition: width 0.3s ease-in-out;\n"])));
|
|
34693
34790
|
var UsersContainer = styled.div(_templateObject12$3 || (_templateObject12$3 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n margin-left: auto;\n padding-left: 16px;\n height: max-content;\n"])));
|
|
34694
34791
|
|
|
34695
|
-
var _templateObject$F, _templateObject2$A, _templateObject3$
|
|
34792
|
+
var _templateObject$F, _templateObject2$A, _templateObject3$v, _templateObject4$q, _templateObject5$l, _templateObject6$j, _templateObject7$h, _templateObject8$g, _templateObject9$e, _templateObject0$d, _templateObject1$a;
|
|
34696
34793
|
var validateUrl = function validateUrl(url) {
|
|
34697
34794
|
try {
|
|
34698
34795
|
var urlObj = new URL(url);
|
|
@@ -34748,7 +34845,8 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
34748
34845
|
var _useColor = useColors(),
|
|
34749
34846
|
incomingMessageBackgroundX = _useColor[THEME_COLORS.INCOMING_MESSAGE_BACKGROUND_X],
|
|
34750
34847
|
outgoingMessageBackgroundX = _useColor[THEME_COLORS.OUTGOING_MESSAGE_BACKGROUND_X],
|
|
34751
|
-
textSecondary = _useColor[THEME_COLORS.TEXT_SECONDARY]
|
|
34848
|
+
textSecondary = _useColor[THEME_COLORS.TEXT_SECONDARY],
|
|
34849
|
+
textPrimary = _useColor[THEME_COLORS.TEXT_PRIMARY];
|
|
34752
34850
|
var attachment = useMemo(function () {
|
|
34753
34851
|
return attachments.find(function (attachment) {
|
|
34754
34852
|
return attachment.type === attachmentTypes.link;
|
|
@@ -34874,7 +34972,7 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
34874
34972
|
}
|
|
34875
34973
|
}, []);
|
|
34876
34974
|
useEffect(function () {
|
|
34877
|
-
if (attachment !== null && attachment !== void 0 && attachment.id && attachment !== null && attachment !== void 0 && attachment.url && !
|
|
34975
|
+
if (attachment !== null && attachment !== void 0 && attachment.id && attachment !== null && attachment !== void 0 && attachment.url && !(oGMetadata !== null && oGMetadata !== void 0 && oGMetadata[attachment === null || attachment === void 0 ? void 0 : attachment.url])) {
|
|
34878
34976
|
setShouldAnimate(true);
|
|
34879
34977
|
var url = attachment === null || attachment === void 0 ? void 0 : attachment.url;
|
|
34880
34978
|
if (url) {
|
|
@@ -34882,6 +34980,7 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
34882
34980
|
try {
|
|
34883
34981
|
if (cachedMetadata) {
|
|
34884
34982
|
handleMetadata(cachedMetadata);
|
|
34983
|
+
setMetadataLoaded(true);
|
|
34885
34984
|
}
|
|
34886
34985
|
ogMetadataQueryBuilder(url);
|
|
34887
34986
|
return Promise.resolve();
|
|
@@ -34894,7 +34993,7 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
34894
34993
|
});
|
|
34895
34994
|
}
|
|
34896
34995
|
}
|
|
34897
|
-
}, [attachment,
|
|
34996
|
+
}, [attachment, oGMetadata === null || oGMetadata === void 0 ? void 0 : oGMetadata[attachment === null || attachment === void 0 ? void 0 : attachment.url]]);
|
|
34898
34997
|
var ogUrl = useMemo(function () {
|
|
34899
34998
|
var url = attachment === null || attachment === void 0 ? void 0 : attachment.url;
|
|
34900
34999
|
var urlObj = validateUrl(url);
|
|
@@ -34929,18 +35028,23 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
34929
35028
|
link: 4
|
|
34930
35029
|
};
|
|
34931
35030
|
}, [order]);
|
|
35031
|
+
var MIN_IMAGE_HEIGHT = 180;
|
|
35032
|
+
var MAX_IMAGE_HEIGHT = 400;
|
|
35033
|
+
var showImage = useMemo(function () {
|
|
35034
|
+
return hasImage && calculatedImageHeight >= MIN_IMAGE_HEIGHT && calculatedImageHeight <= MAX_IMAGE_HEIGHT;
|
|
35035
|
+
}, [hasImage, calculatedImageHeight]);
|
|
34932
35036
|
useEffect(function () {
|
|
34933
35037
|
if (metadataLoaded || oGMetadata !== null && oGMetadata !== void 0 && oGMetadata[attachment === null || attachment === void 0 ? void 0 : attachment.url]) {
|
|
34934
|
-
if (
|
|
34935
|
-
metadataGetSuccessCallback(attachment === null || attachment === void 0 ? void 0 : attachment.url, true,
|
|
35038
|
+
if (oGMetadata !== null && oGMetadata !== void 0 && oGMetadata[attachment === null || attachment === void 0 ? void 0 : attachment.url] && metadataGetSuccessCallback && metadata) {
|
|
35039
|
+
metadataGetSuccessCallback(attachment === null || attachment === void 0 ? void 0 : attachment.url, true, showImage, metadata);
|
|
34936
35040
|
} else {
|
|
34937
|
-
metadataGetSuccessCallback === null || metadataGetSuccessCallback === void 0 ? void 0 : metadataGetSuccessCallback(attachment === null || attachment === void 0 ? void 0 : attachment.url, false, false);
|
|
35041
|
+
metadataGetSuccessCallback === null || metadataGetSuccessCallback === void 0 ? void 0 : metadataGetSuccessCallback(attachment === null || attachment === void 0 ? void 0 : attachment.url, false, false, metadata);
|
|
34938
35042
|
}
|
|
34939
35043
|
}
|
|
34940
|
-
}, [
|
|
35044
|
+
}, [metadataLoaded, oGMetadata, attachment === null || attachment === void 0 ? void 0 : attachment.url, metadata]);
|
|
34941
35045
|
var elements = useMemo(function () {
|
|
34942
|
-
var _resolvedOrder$image, _metadata$og11, _metadata$og11$image, _metadata$og11$image$, _resolvedOrder$title, _metadata$og12, _metadata$og13, _resolvedOrder$descri, _metadata$og14, _metadata$og15, _resolvedOrder$link;
|
|
34943
|
-
return [
|
|
35046
|
+
var _resolvedOrder$image, _metadata$og11, _metadata$og11$image, _metadata$og11$image$, _resolvedOrder$title, _metadata$og12, _metadata$og13, _metadata$og13$title, _resolvedOrder$descri, _metadata$og14, _metadata$og15, _metadata$og15$descri, _resolvedOrder$link;
|
|
35047
|
+
return [showImage ? {
|
|
34944
35048
|
key: 'image',
|
|
34945
35049
|
order: (_resolvedOrder$image = resolvedOrder === null || resolvedOrder === void 0 ? void 0 : resolvedOrder.image) != null ? _resolvedOrder$image : 1,
|
|
34946
35050
|
render: (/*#__PURE__*/React__default.createElement(ImageContainer, {
|
|
@@ -34961,8 +35065,9 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
34961
35065
|
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, {
|
|
34962
35066
|
maxWidth: maxWidth,
|
|
34963
35067
|
shouldAnimate: shouldAnimate,
|
|
34964
|
-
padding: infoPadding
|
|
34965
|
-
|
|
35068
|
+
padding: infoPadding,
|
|
35069
|
+
color: textPrimary
|
|
35070
|
+
}, /*#__PURE__*/React__default.createElement("span", null, metadata === null || metadata === void 0 ? void 0 : (_metadata$og13 = metadata.og) === null || _metadata$og13 === void 0 ? void 0 : (_metadata$og13$title = _metadata$og13.title) === null || _metadata$og13$title === void 0 ? void 0 : _metadata$og13$title.trim())))
|
|
34966
35071
|
}, {
|
|
34967
35072
|
key: 'description',
|
|
34968
35073
|
order: (_resolvedOrder$descri = resolvedOrder === null || resolvedOrder === void 0 ? void 0 : resolvedOrder.description) != null ? _resolvedOrder$descri : 3,
|
|
@@ -34971,7 +35076,7 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
34971
35076
|
shouldAnimate: shouldAnimate,
|
|
34972
35077
|
color: textSecondary,
|
|
34973
35078
|
padding: infoPadding
|
|
34974
|
-
}, metadata === null || metadata === void 0 ? void 0 : (_metadata$og15 = metadata.og) === null || _metadata$og15 === void 0 ? void 0 : _metadata$og15.description))
|
|
35079
|
+
}, metadata === null || metadata === void 0 ? void 0 : (_metadata$og15 = metadata.og) === null || _metadata$og15 === void 0 ? void 0 : (_metadata$og15$descri = _metadata$og15.description) === null || _metadata$og15$descri === void 0 ? void 0 : _metadata$og15$descri.trim()))
|
|
34975
35080
|
}, {
|
|
34976
35081
|
key: 'link',
|
|
34977
35082
|
order: (_resolvedOrder$link = resolvedOrder === null || resolvedOrder === void 0 ? void 0 : resolvedOrder.link) != null ? _resolvedOrder$link : 4,
|
|
@@ -35029,7 +35134,8 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
35029
35134
|
borderRadius: ogContainerBorderRadius,
|
|
35030
35135
|
padding: ogContainerPadding,
|
|
35031
35136
|
className: ogContainerClassName,
|
|
35032
|
-
containerMargin: ogContainerMargin
|
|
35137
|
+
containerMargin: ogContainerMargin,
|
|
35138
|
+
maxWidth: maxWidth
|
|
35033
35139
|
}, isInviteLink ? {
|
|
35034
35140
|
as: 'div',
|
|
35035
35141
|
onClick: function onClick() {
|
|
@@ -35043,87 +35149,93 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
35043
35149
|
}), content);
|
|
35044
35150
|
};
|
|
35045
35151
|
var sharedKeyframes = "\n @keyframes fadeInSlideUp {\n from {\n opacity: 0;\n transform: translateY(10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes expandHeight {\n from {\n max-height: 0;\n opacity: 0;\n }\n to {\n max-height: 1000px;\n opacity: 1;\n }\n }\n";
|
|
35046
|
-
var OGMetadataContainer = styled.div(_templateObject$F || (_templateObject$F = _taggedTemplateLiteralLoose(["\n min-width: inherit;\n max-width:
|
|
35047
|
-
var
|
|
35048
|
-
|
|
35049
|
-
bgColor = _ref2.bgColor;
|
|
35050
|
-
return showBackground ? customBg != null ? customBg : bgColor : 'transparent';
|
|
35152
|
+
var OGMetadataContainer = styled.div(_templateObject$F || (_templateObject$F = _taggedTemplateLiteralLoose(["\n min-width: inherit;\n max-width: ", ";\n width: 100%;\n display: grid;\n grid-template-columns: 1fr;\n border-radius: 8px;\n background-color: ", ";\n border-radius: ", ";\n margin: ", ";\n // margin-bottom: ", ";\n padding: ", ";\n text-decoration: none;\n // color: inherit;\n &:hover {\n opacity: 0.9;\n cursor: pointer;\n }\n"])), function (_ref2) {
|
|
35153
|
+
var maxWidth = _ref2.maxWidth;
|
|
35154
|
+
return maxWidth ? maxWidth + "px" : 'inherit';
|
|
35051
35155
|
}, function (_ref3) {
|
|
35052
|
-
var
|
|
35053
|
-
|
|
35156
|
+
var showBackground = _ref3.showBackground,
|
|
35157
|
+
customBg = _ref3.customBg,
|
|
35158
|
+
bgColor = _ref3.bgColor;
|
|
35159
|
+
return showBackground ? customBg != null ? customBg : bgColor : 'transparent';
|
|
35054
35160
|
}, function (_ref4) {
|
|
35055
|
-
var
|
|
35056
|
-
return
|
|
35161
|
+
var borderRadius = _ref4.borderRadius;
|
|
35162
|
+
return borderRadius !== undefined ? borderRadius : '8px';
|
|
35057
35163
|
}, function (_ref5) {
|
|
35058
|
-
var
|
|
35059
|
-
return
|
|
35164
|
+
var containerMargin = _ref5.containerMargin;
|
|
35165
|
+
return containerMargin != null ? containerMargin : '0.8rem auto 0';
|
|
35060
35166
|
}, function (_ref6) {
|
|
35061
|
-
var
|
|
35167
|
+
var showOGMetadata = _ref6.showOGMetadata;
|
|
35168
|
+
return showOGMetadata ? '0.4rem' : '0';
|
|
35169
|
+
}, function (_ref7) {
|
|
35170
|
+
var padding = _ref7.padding;
|
|
35062
35171
|
return padding != null ? padding : '0';
|
|
35063
35172
|
});
|
|
35064
|
-
var ImageContainer = styled.div(_templateObject2$A || (_templateObject2$A = _taggedTemplateLiteralLoose(["\n ", "\n width: 100%;\n height: ", ";\n opacity: ", ";\n margin: 0 auto;\n overflow: hidden;\n ", "\n"])), sharedKeyframes, function (
|
|
35065
|
-
var containerHeight =
|
|
35173
|
+
var ImageContainer = styled.div(_templateObject2$A || (_templateObject2$A = _taggedTemplateLiteralLoose(["\n ", "\n width: 100%;\n height: ", ";\n opacity: ", ";\n margin: 0 auto;\n border-radius: 8px 8px 0 0;\n overflow: hidden;\n ", "\n"])), sharedKeyframes, function (_ref8) {
|
|
35174
|
+
var containerHeight = _ref8.containerHeight;
|
|
35066
35175
|
return containerHeight ? containerHeight + "px" : '0px';
|
|
35067
|
-
}, function (_ref8) {
|
|
35068
|
-
var showOGMetadata = _ref8.showOGMetadata,
|
|
35069
|
-
containerHeight = _ref8.containerHeight;
|
|
35070
|
-
return showOGMetadata && containerHeight ? 1 : 0;
|
|
35071
35176
|
}, function (_ref9) {
|
|
35072
|
-
var
|
|
35073
|
-
showOGMetadata = _ref9.showOGMetadata,
|
|
35177
|
+
var showOGMetadata = _ref9.showOGMetadata,
|
|
35074
35178
|
containerHeight = _ref9.containerHeight;
|
|
35179
|
+
return showOGMetadata && containerHeight ? 1 : 0;
|
|
35180
|
+
}, function (_ref0) {
|
|
35181
|
+
var shouldAnimate = _ref0.shouldAnimate,
|
|
35182
|
+
showOGMetadata = _ref0.showOGMetadata,
|
|
35183
|
+
containerHeight = _ref0.containerHeight;
|
|
35075
35184
|
return shouldAnimate && showOGMetadata && containerHeight && "\n animation: expandHeight 0.3s ease-out forwards;\n ";
|
|
35076
35185
|
});
|
|
35077
|
-
var OGText = styled.div(_templateObject3$
|
|
35078
|
-
var shouldAnimate =
|
|
35186
|
+
var OGText = styled.div(_templateObject3$v || (_templateObject3$v = _taggedTemplateLiteralLoose(["\n ", "\n display: flex;\n flex-direction: column;\n gap: 0;\n ", "\n ", ";\n"])), sharedKeyframes, function (_ref1) {
|
|
35187
|
+
var shouldAnimate = _ref1.shouldAnimate;
|
|
35079
35188
|
return shouldAnimate && "\n animation: fadeInSlideUp 0.3s ease-out forwards;\n ";
|
|
35080
|
-
}, function (
|
|
35081
|
-
var margin =
|
|
35189
|
+
}, function (_ref10) {
|
|
35190
|
+
var margin = _ref10.margin;
|
|
35082
35191
|
return margin ? '12px' : '0';
|
|
35083
35192
|
});
|
|
35084
|
-
var Title$3 = styled.p(_templateObject4$q || (_templateObject4$q = _taggedTemplateLiteralLoose(["\n ", "\n font-weight:
|
|
35085
|
-
var
|
|
35193
|
+
var Title$3 = styled.p(_templateObject4$q || (_templateObject4$q = _taggedTemplateLiteralLoose(["\n ", "\n // font-family: Inter;\n font-weight: 500;\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) {
|
|
35194
|
+
var color = _ref11.color;
|
|
35195
|
+
return color;
|
|
35196
|
+
}, function (_ref12) {
|
|
35197
|
+
var padding = _ref12.padding;
|
|
35086
35198
|
return padding != null ? padding : '0';
|
|
35087
|
-
}, function (
|
|
35088
|
-
var maxWidth =
|
|
35199
|
+
}, function (_ref13) {
|
|
35200
|
+
var maxWidth = _ref13.maxWidth;
|
|
35089
35201
|
return maxWidth && "\n max-width: " + maxWidth + "px;\n ";
|
|
35090
|
-
}, function (
|
|
35091
|
-
var shouldAnimate =
|
|
35202
|
+
}, function (_ref14) {
|
|
35203
|
+
var shouldAnimate = _ref14.shouldAnimate;
|
|
35092
35204
|
return shouldAnimate && "\n animation: fadeInSlideUp 0.3s ease-out 0.1s backwards;\n ";
|
|
35093
35205
|
});
|
|
35094
|
-
var Desc = styled.p(_templateObject5$l || (_templateObject5$l = _taggedTemplateLiteralLoose(["\n ", "\n font-weight: normal;\n font-size: 13px;\n line-height: 16px;\n margin:
|
|
35095
|
-
var padding =
|
|
35206
|
+
var Desc = styled.p(_templateObject5$l || (_templateObject5$l = _taggedTemplateLiteralLoose(["\n ", "\n font-weight: normal;\n font-size: 13px;\n line-height: 16px;\n margin: 4px 0 4px 0;\n padding: ", ";\n color: ", ";\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n box-sizing: border-box;\n ", "\n ", "\n"])), sharedKeyframes, function (_ref15) {
|
|
35207
|
+
var padding = _ref15.padding;
|
|
35096
35208
|
return padding != null ? padding : '0';
|
|
35097
|
-
}, function (
|
|
35098
|
-
var color =
|
|
35209
|
+
}, function (_ref16) {
|
|
35210
|
+
var color = _ref16.color;
|
|
35099
35211
|
return color;
|
|
35100
|
-
}, function (
|
|
35101
|
-
var maxWidth =
|
|
35212
|
+
}, function (_ref17) {
|
|
35213
|
+
var maxWidth = _ref17.maxWidth;
|
|
35102
35214
|
return maxWidth && "\n max-width: " + maxWidth + "px;\n ";
|
|
35103
|
-
}, function (
|
|
35104
|
-
var shouldAnimate =
|
|
35215
|
+
}, function (_ref18) {
|
|
35216
|
+
var shouldAnimate = _ref18.shouldAnimate;
|
|
35105
35217
|
return shouldAnimate && "\n animation: fadeInSlideUp 0.3s ease-out 0.2s backwards;\n ";
|
|
35106
35218
|
});
|
|
35107
|
-
var Url = styled.p(_templateObject6$j || (_templateObject6$j = _taggedTemplateLiteralLoose(["\n ", "\n font-weight: normal;\n font-size: 13px;\n line-height: 16px;\n margin: 0 0 12px 0;\n padding: ", ";\n color: gray;\n box-sizing: border-box;\n ", "\n ", "\n"])), sharedKeyframes, function (
|
|
35108
|
-
var padding =
|
|
35219
|
+
var Url = styled.p(_templateObject6$j || (_templateObject6$j = _taggedTemplateLiteralLoose(["\n ", "\n font-weight: normal;\n font-size: 13px;\n line-height: 16px;\n margin: 0 0 12px 0;\n padding: ", ";\n color: gray;\n box-sizing: border-box;\n ", "\n ", "\n"])), sharedKeyframes, function (_ref19) {
|
|
35220
|
+
var padding = _ref19.padding;
|
|
35109
35221
|
return padding != null ? padding : '0';
|
|
35110
|
-
}, function (
|
|
35111
|
-
var maxWidth =
|
|
35222
|
+
}, function (_ref20) {
|
|
35223
|
+
var maxWidth = _ref20.maxWidth;
|
|
35112
35224
|
return maxWidth && "\n max-width: " + maxWidth + "px;\n ";
|
|
35113
|
-
}, function (
|
|
35114
|
-
var shouldAnimate =
|
|
35225
|
+
}, function (_ref21) {
|
|
35226
|
+
var shouldAnimate = _ref21.shouldAnimate;
|
|
35115
35227
|
return shouldAnimate && "\n animation: fadeInSlideUp 0.3s ease-out 0.3s backwards;\n ";
|
|
35116
35228
|
});
|
|
35117
|
-
var Img = styled.img(_templateObject7$h || (_templateObject7$h = _taggedTemplateLiteralLoose(["\n ", "\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n border-radius: inherit;\n ", "\n"])), sharedKeyframes, function (
|
|
35118
|
-
var shouldAnimate =
|
|
35229
|
+
var Img = styled.img(_templateObject7$h || (_templateObject7$h = _taggedTemplateLiteralLoose(["\n ", "\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n // object-fit: cover;\n // object-position: center;\n // image-rendering: auto;\n border-radius: inherit;\n ", "\n"])), sharedKeyframes, function (_ref22) {
|
|
35230
|
+
var shouldAnimate = _ref22.shouldAnimate;
|
|
35119
35231
|
return shouldAnimate && "\n animation: fadeIn 0.4s ease-out forwards;\n ";
|
|
35120
35232
|
});
|
|
35121
|
-
var OGRow = styled.div(_templateObject8$g || (_templateObject8$g = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n"])));
|
|
35233
|
+
var OGRow = styled.div(_templateObject8$g || (_templateObject8$g = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n padding: 0;\n"])));
|
|
35122
35234
|
var OGTextWrapper = styled.div(_templateObject9$e || (_templateObject9$e = _taggedTemplateLiteralLoose(["\n flex: 1 1 auto;\n"])));
|
|
35123
|
-
var FaviconContainer = styled.div(_templateObject0$d || (_templateObject0$d = _taggedTemplateLiteralLoose(["\n width: 52px;\n height: 52px;\n border-radius: 8px;\n overflow: hidden;\n margin:
|
|
35235
|
+
var FaviconContainer = styled.div(_templateObject0$d || (_templateObject0$d = _taggedTemplateLiteralLoose(["\n width: 52px;\n height: 52px;\n border-radius: 8px;\n overflow: hidden;\n margin: 8px;\n flex: 0 0 52px;\n"])));
|
|
35124
35236
|
var FaviconImg = styled.img(_templateObject1$a || (_templateObject1$a = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n"])));
|
|
35125
35237
|
|
|
35126
|
-
var _templateObject$G, _templateObject2$B, _templateObject3$
|
|
35238
|
+
var _templateObject$G, _templateObject2$B, _templateObject3$w, _templateObject4$r, _templateObject5$m;
|
|
35127
35239
|
var MessageBody = function MessageBody(_ref) {
|
|
35128
35240
|
var message = _ref.message,
|
|
35129
35241
|
channel = _ref.channel,
|
|
@@ -35349,6 +35461,41 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
35349
35461
|
var selectionIsActive = useMemo(function () {
|
|
35350
35462
|
return selectedMessagesMap && selectedMessagesMap.size > 0;
|
|
35351
35463
|
}, [selectedMessagesMap]);
|
|
35464
|
+
var hasLongLinkAttachmentUrl = useMemo(function () {
|
|
35465
|
+
if (!linkAttachment || !linkAttachment.url) return false;
|
|
35466
|
+
return linkAttachment.url.length > 100;
|
|
35467
|
+
}, [linkAttachment]);
|
|
35468
|
+
var oGMetadata = useSelector(function (state) {
|
|
35469
|
+
return state.MessageReducer.oGMetadata;
|
|
35470
|
+
});
|
|
35471
|
+
var linkMetadata = useMemo(function () {
|
|
35472
|
+
if (!(linkAttachment !== null && linkAttachment !== void 0 && linkAttachment.url)) return null;
|
|
35473
|
+
return (oGMetadata === null || oGMetadata === void 0 ? void 0 : oGMetadata[linkAttachment.url]) || null;
|
|
35474
|
+
}, [oGMetadata, linkAttachment === null || linkAttachment === void 0 ? void 0 : linkAttachment.url]);
|
|
35475
|
+
var ogMetadataContainerWidth = useMemo(function () {
|
|
35476
|
+
var _linkMetadata$og, _linkMetadata$og$imag, _linkMetadata$og$imag2, _linkMetadata$og2, _linkMetadata$og3, _linkMetadata$og3$fav;
|
|
35477
|
+
if (!linkMetadata || !linkAttachment) return (ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.maxWidth) || 400;
|
|
35478
|
+
if (hasLongLinkAttachmentUrl) {
|
|
35479
|
+
return 400;
|
|
35480
|
+
}
|
|
35481
|
+
var hasImage = (linkMetadata === null || linkMetadata === void 0 ? void 0 : (_linkMetadata$og = linkMetadata.og) === null || _linkMetadata$og === void 0 ? void 0 : (_linkMetadata$og$imag = _linkMetadata$og.image) === null || _linkMetadata$og$imag === void 0 ? void 0 : (_linkMetadata$og$imag2 = _linkMetadata$og$imag[0]) === null || _linkMetadata$og$imag2 === void 0 ? void 0 : _linkMetadata$og$imag2.url) && (linkMetadata === null || linkMetadata === void 0 ? void 0 : linkMetadata.imageWidth) && (linkMetadata === null || linkMetadata === void 0 ? void 0 : linkMetadata.imageHeight);
|
|
35482
|
+
var imageWidth = linkMetadata === null || linkMetadata === void 0 ? void 0 : linkMetadata.imageWidth;
|
|
35483
|
+
var imageHeight = linkMetadata === null || linkMetadata === void 0 ? void 0 : linkMetadata.imageHeight;
|
|
35484
|
+
var calculatedImageHeight = imageWidth && imageHeight ? imageHeight / (imageWidth / ((ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.maxWidth) || 400)) : 0;
|
|
35485
|
+
var showImage = hasImage && calculatedImageHeight >= 180 && calculatedImageHeight <= 400;
|
|
35486
|
+
var hasDescription = linkMetadata === null || linkMetadata === void 0 ? void 0 : (_linkMetadata$og2 = linkMetadata.og) === null || _linkMetadata$og2 === void 0 ? void 0 : _linkMetadata$og2.description;
|
|
35487
|
+
var hasFavicon = (ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.ogShowFavicon) && (linkMetadata === null || linkMetadata === void 0 ? void 0 : linkMetadata.faviconLoaded) && (linkMetadata === null || linkMetadata === void 0 ? void 0 : (_linkMetadata$og3 = linkMetadata.og) === null || _linkMetadata$og3 === void 0 ? void 0 : (_linkMetadata$og3$fav = _linkMetadata$og3.favicon) === null || _linkMetadata$og3$fav === void 0 ? void 0 : _linkMetadata$og3$fav.url);
|
|
35488
|
+
if (showImage) {
|
|
35489
|
+
return 400;
|
|
35490
|
+
}
|
|
35491
|
+
if (hasDescription && hasFavicon) {
|
|
35492
|
+
return 336;
|
|
35493
|
+
}
|
|
35494
|
+
if (hasDescription) {
|
|
35495
|
+
return 356;
|
|
35496
|
+
}
|
|
35497
|
+
return (ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.maxWidth) || 400;
|
|
35498
|
+
}, [linkMetadata, linkAttachment, ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.maxWidth, ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.ogShowFavicon, hasLongLinkAttachmentUrl]);
|
|
35352
35499
|
var handleRemoveFailedAttachment = function handleRemoveFailedAttachment(attachmentId) {
|
|
35353
35500
|
log.info('remove attachment .. ', attachmentId);
|
|
35354
35501
|
};
|
|
@@ -35366,7 +35513,10 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
35366
35513
|
},
|
|
35367
35514
|
borderRadius: borderRadius,
|
|
35368
35515
|
withAttachments: notLinkAttachment,
|
|
35369
|
-
|
|
35516
|
+
hasLinkAttachment: !!linkAttachment,
|
|
35517
|
+
hasLongLinkAttachmentUrl: hasLongLinkAttachmentUrl,
|
|
35518
|
+
attachmentWidth: withAttachments ? mediaAttachment ? attachmentMetas && getSendAttachmentsAsSeparateMessages() && attachmentMetas.szw && calculateRenderedImageWidth(attachmentMetas.szw, attachmentMetas.szh, mediaAttachment.type === attachmentTypes.image ? imageAttachmentMaxWidth : videoAttachmentMaxWidth, mediaAttachment.type === attachmentTypes.image ? imageAttachmentMaxHeight : videoAttachmentMaxHeight)[0] || 400 : message.attachments[0].type === attachmentTypes.voice ? 254 : message.attachments[0].type === attachmentTypes.file ? fileAttachmentsBoxWidth : undefined : undefined,
|
|
35519
|
+
ogMetadataMaxWidth: ogMetadataContainerWidth,
|
|
35370
35520
|
noBody: !message.body && !withAttachments,
|
|
35371
35521
|
onMouseEnter: handleMouseEnter,
|
|
35372
35522
|
onMouseLeave: handleMouseLeave
|
|
@@ -35522,7 +35672,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
35522
35672
|
unsupportedMessage: unsupportedMessage,
|
|
35523
35673
|
unsupportedMessageColor: textSecondary
|
|
35524
35674
|
}, ogContainerFirst && linkAttachment && !mediaAttachment && !withMediaAttachment && !fileAttachment && (/*#__PURE__*/React__default.createElement(OGMetadata, {
|
|
35525
|
-
maxWidth:
|
|
35675
|
+
maxWidth: ogMetadataContainerWidth,
|
|
35526
35676
|
maxHeight: ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.maxHeight,
|
|
35527
35677
|
attachments: [linkAttachment],
|
|
35528
35678
|
state: message.state,
|
|
@@ -35561,7 +35711,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
35561
35711
|
}))), !withAttachments && message.state === MESSAGE_STATUS.DELETE ? (/*#__PURE__*/React__default.createElement(MessageStatusDeleted$1, {
|
|
35562
35712
|
color: textSecondary
|
|
35563
35713
|
}, " Message was deleted. ")) : '', !ogContainerFirst && linkAttachment && !mediaAttachment && !withMediaAttachment && !fileAttachment && (/*#__PURE__*/React__default.createElement(OGMetadata, {
|
|
35564
|
-
maxWidth:
|
|
35714
|
+
maxWidth: ogMetadataContainerWidth,
|
|
35565
35715
|
maxHeight: ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.maxHeight,
|
|
35566
35716
|
attachments: [linkAttachment],
|
|
35567
35717
|
state: message.state,
|
|
@@ -35583,7 +35733,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
35583
35733
|
ogContainerBackground: ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.ogContainerBackground,
|
|
35584
35734
|
infoPadding: ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.infoPadding,
|
|
35585
35735
|
isInviteLink: ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.isInviteLink
|
|
35586
|
-
})), messageStatusAndTimePosition === 'onMessage' && !notLinkAttachment && (messageStatusVisible || messageTimeVisible) ? (/*#__PURE__*/React__default.createElement(MessageStatusAndTime$1, {
|
|
35736
|
+
})), messageStatusAndTimePosition === 'onMessage' && !notLinkAttachment && !!linkAttachment && (messageStatusVisible || messageTimeVisible) ? (/*#__PURE__*/React__default.createElement(MessageStatusAndTime$1, {
|
|
35587
35737
|
message: message,
|
|
35588
35738
|
showMessageTimeAndStatusOnlyOnHover: showMessageTimeAndStatusOnlyOnHover,
|
|
35589
35739
|
messageStatusDisplayingType: messageStatusDisplayingType,
|
|
@@ -35599,25 +35749,31 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
35599
35749
|
messageStatusVisible: !!messageStatusVisible,
|
|
35600
35750
|
leftMargin: true,
|
|
35601
35751
|
messageTimeColorOnAttachment: messageTimeColorOnAttachment || textSecondary
|
|
35602
|
-
})) : null), notLinkAttachment && messageStatusAndTimePosition === 'onMessage' && (messageStatusVisible || messageTimeVisible) && (
|
|
35603
|
-
message
|
|
35604
|
-
|
|
35605
|
-
|
|
35606
|
-
|
|
35607
|
-
|
|
35608
|
-
|
|
35609
|
-
|
|
35610
|
-
|
|
35611
|
-
|
|
35612
|
-
|
|
35613
|
-
|
|
35614
|
-
|
|
35615
|
-
|
|
35616
|
-
|
|
35617
|
-
|
|
35618
|
-
|
|
35619
|
-
|
|
35620
|
-
|
|
35752
|
+
})) : null), notLinkAttachment && messageStatusAndTimePosition === 'onMessage' && (messageStatusVisible || messageTimeVisible) && function () {
|
|
35753
|
+
var nonLinkAttachment = message.attachments.find(function (a) {
|
|
35754
|
+
return a.type !== attachmentTypes.link;
|
|
35755
|
+
});
|
|
35756
|
+
var attachmentType = nonLinkAttachment === null || nonLinkAttachment === void 0 ? void 0 : nonLinkAttachment.type;
|
|
35757
|
+
return /*#__PURE__*/React__default.createElement(MessageStatusAndTime$1, {
|
|
35758
|
+
message: message,
|
|
35759
|
+
showMessageTimeAndStatusOnlyOnHover: showMessageTimeAndStatusOnlyOnHover,
|
|
35760
|
+
messageStatusDisplayingType: messageStatusDisplayingType,
|
|
35761
|
+
messageStatusSize: messageStatusSize,
|
|
35762
|
+
messageStatusColor: attachmentType === 'voice' ? textSecondary : attachmentType === 'image' || attachmentType === 'video' ? textOnPrimary : messageStateColor || textSecondary,
|
|
35763
|
+
messageReadStatusColor: messageReadStatusColor,
|
|
35764
|
+
messageStateFontSize: messageStateFontSize,
|
|
35765
|
+
messageStateColor: messageStateColor,
|
|
35766
|
+
messageTimeFontSize: messageTimeFontSize,
|
|
35767
|
+
messageTimeColor: messageTimeColor,
|
|
35768
|
+
messageStatusAndTimeLineHeight: messageStatusAndTimeLineHeight,
|
|
35769
|
+
messageTimeVisible: !!messageTimeVisible,
|
|
35770
|
+
messageStatusVisible: !!messageStatusVisible,
|
|
35771
|
+
withAttachment: withAttachments,
|
|
35772
|
+
leftMargin: true,
|
|
35773
|
+
fileAttachment: withAttachments && (attachmentType === 'file' || attachmentType === 'voice'),
|
|
35774
|
+
messageTimeColorOnAttachment: attachmentType === 'voice' ? textSecondary : attachmentType === 'image' || attachmentType === 'video' ? textOnPrimary : textSecondary
|
|
35775
|
+
});
|
|
35776
|
+
}(), withAttachments && message.attachments.map(function (attachment) {
|
|
35621
35777
|
return /*#__PURE__*/React__default.createElement(Attachment$1, {
|
|
35622
35778
|
key: attachment.tid || attachment.url,
|
|
35623
35779
|
handleMediaItemClick: selectionIsActive ? undefined : handleMediaItemClick,
|
|
@@ -35690,7 +35846,7 @@ var MessageStatusDeleted$1 = styled.span(_templateObject2$B || (_templateObject2
|
|
|
35690
35846
|
}, function (props) {
|
|
35691
35847
|
return props.fontSize;
|
|
35692
35848
|
});
|
|
35693
|
-
var MessageBodyContainer = styled.div(_templateObject3$
|
|
35849
|
+
var MessageBodyContainer = styled.div(_templateObject3$w || (_templateObject3$w = _taggedTemplateLiteralLoose(["\n position: relative;\n background-color: ", ";\n //display: inline-block;\n border-radius: ", ";\n direction: ", ";\n max-width: ", ";\n width: ", ";\n overflow-wrap: break-word;\n word-break: break-word;\n\n ", "\n padding: ", ";\n //direction: ", ";\n //overflow: ", ";\n transition: all 0.3s;\n transform-origin: right;\n"])), function (props) {
|
|
35694
35850
|
var _props$outgoingMessag, _props$incomingMessag;
|
|
35695
35851
|
return props.isSelfMessage ? (_props$outgoingMessag = props.outgoingMessageStyles) === null || _props$outgoingMessag === void 0 ? void 0 : _props$outgoingMessag.background : (_props$incomingMessag = props.incomingMessageStyles) === null || _props$incomingMessag === void 0 ? void 0 : _props$incomingMessag.background;
|
|
35696
35852
|
}, function (props) {
|
|
@@ -35698,10 +35854,14 @@ var MessageBodyContainer = styled.div(_templateObject3$v || (_templateObject3$v
|
|
|
35698
35854
|
}, function (props) {
|
|
35699
35855
|
return props.rtlDirection ? 'initial' : '';
|
|
35700
35856
|
}, function (props) {
|
|
35701
|
-
return props.withAttachments ? props.attachmentWidth && props.attachmentWidth <
|
|
35857
|
+
return props.hasLinkAttachment && !props.withAttachments ? props.ogMetadataMaxWidth ? props.ogMetadataMaxWidth + "px" : '416px' : props.hasLongLinkAttachmentUrl && !props.withAttachments ? '400px' : props.withAttachments ? props.attachmentWidth && props.attachmentWidth < 400 ? props.attachmentWidth < 165 ? props.isReplyMessage ? '210px' : '165px' : props.attachmentWidth + "px" : '400px' : '100%';
|
|
35858
|
+
}, function (props) {
|
|
35859
|
+
return props.hasLinkAttachment && !props.withAttachments && props.ogMetadataMaxWidth ? props.ogMetadataMaxWidth + "px" : props.hasLongLinkAttachmentUrl && !props.withAttachments ? '416px' : 'max-content';
|
|
35860
|
+
}, function (props) {
|
|
35861
|
+
return props.hasLongLinkAttachmentUrl && "\n & a {\n overflow-wrap: anywhere;\n word-break: break-all;\n white-space: normal;\n max-width: " + (props.withAttachments ? '400px' : props.hasLinkAttachment && props.ogMetadataMaxWidth ? props.ogMetadataMaxWidth + "px" : '416px') + ";\n }\n ";
|
|
35702
35862
|
}, function (props) {
|
|
35703
35863
|
var _props$outgoingMessag2, _props$incomingMessag2;
|
|
35704
|
-
return props.withAttachments ? props.isReplyMessage ? '1px 0 0 ' : '0' : props.isSelfMessage ? ((_props$outgoingMessag2 = props.outgoingMessageStyles) === null || _props$outgoingMessag2 === void 0 ? void 0 : _props$outgoingMessag2.background) === 'inherit' ? '0' : '8px 12px' : ((_props$incomingMessag2 = props.incomingMessageStyles) === null || _props$incomingMessag2 === void 0 ? void 0 : _props$incomingMessag2.background) === 'inherit' ? ' 0' : '8px 12px';
|
|
35864
|
+
return props.withAttachments ? props.isReplyMessage ? '1px 0 0 ' : '0' : props.hasLinkAttachment ? '8px' : props.isSelfMessage ? ((_props$outgoingMessag2 = props.outgoingMessageStyles) === null || _props$outgoingMessag2 === void 0 ? void 0 : _props$outgoingMessag2.background) === 'inherit' ? '0' : '8px 12px' : ((_props$incomingMessag2 = props.incomingMessageStyles) === null || _props$incomingMessag2 === void 0 ? void 0 : _props$incomingMessag2.background) === 'inherit' ? ' 0' : '8px 12px';
|
|
35705
35865
|
}, function (props) {
|
|
35706
35866
|
return props.isSelfMessage ? 'initial' : '';
|
|
35707
35867
|
}, function (props) {
|
|
@@ -35724,7 +35884,7 @@ var FrequentlyEmojisContainer = styled.div(_templateObject5$m || (_templateObjec
|
|
|
35724
35884
|
return props.rtlDirection && '0';
|
|
35725
35885
|
});
|
|
35726
35886
|
|
|
35727
|
-
var _templateObject$H, _templateObject2$C, _templateObject3$
|
|
35887
|
+
var _templateObject$H, _templateObject2$C, _templateObject3$x, _templateObject4$s, _templateObject5$n, _templateObject6$k, _templateObject7$i, _templateObject8$h, _templateObject9$f, _templateObject0$e, _templateObject1$b;
|
|
35728
35888
|
var defaultFormatDate = function defaultFormatDate(date) {
|
|
35729
35889
|
var m = moment(date);
|
|
35730
35890
|
if (m.isSame(moment(), 'day')) {
|
|
@@ -36104,7 +36264,7 @@ var Tab = styled.button(_templateObject2$C || (_templateObject2$C = _taggedTempl
|
|
|
36104
36264
|
}, function (p) {
|
|
36105
36265
|
return p.active ? p.background : p.borderColor;
|
|
36106
36266
|
});
|
|
36107
|
-
var List$1 = styled.div(_templateObject3$
|
|
36267
|
+
var List$1 = styled.div(_templateObject3$x || (_templateObject3$x = _taggedTemplateLiteralLoose(["\n margin-top: 8px;\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n max-height: ", ";\n"])), function (p) {
|
|
36108
36268
|
return p.maxHeight ? p.maxHeight + "px" : 'unset';
|
|
36109
36269
|
});
|
|
36110
36270
|
var Row$2 = styled.div(_templateObject4$s || (_templateObject4$s = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 6px;\n border-radius: 10px;\n cursor: pointer;\n &:hover {\n background-color: ", ";\n }\n"])), function (p) {
|
|
@@ -36158,7 +36318,7 @@ function ConfirmEndPollPopup(_ref) {
|
|
|
36158
36318
|
});
|
|
36159
36319
|
}
|
|
36160
36320
|
|
|
36161
|
-
var _templateObject$I, _templateObject2$D, _templateObject3$
|
|
36321
|
+
var _templateObject$I, _templateObject2$D, _templateObject3$y, _templateObject4$t, _templateObject5$o, _templateObject6$l, _templateObject7$j, _templateObject8$i, _templateObject9$g, _templateObject0$f, _templateObject1$c, _templateObject10$7, _templateObject11$5, _templateObject12$4;
|
|
36162
36322
|
var Message$1 = function Message(_ref) {
|
|
36163
36323
|
var message = _ref.message,
|
|
36164
36324
|
channel = _ref.channel,
|
|
@@ -36368,6 +36528,7 @@ var Message$1 = function Message(_ref) {
|
|
|
36368
36528
|
reactionsPopupHorizontalPosition = _useState10[0],
|
|
36369
36529
|
setReactionsPopupHorizontalPosition = _useState10[1];
|
|
36370
36530
|
var scrollToNewMessage = useSelector(scrollToNewMessageSelector, shallowEqual);
|
|
36531
|
+
var unreadScrollTo = useSelector(unreadScrollToSelector, shallowEqual);
|
|
36371
36532
|
var messageItemRef = useRef();
|
|
36372
36533
|
var isVisible = useOnScreen(messageItemRef);
|
|
36373
36534
|
var reactionsCount = message.reactionTotals && message.reactionTotals.reduce(function (prevValue, currentValue) {
|
|
@@ -36521,20 +36682,20 @@ var Message$1 = function Message(_ref) {
|
|
|
36521
36682
|
setFrequentlyEmojisOpen(false);
|
|
36522
36683
|
};
|
|
36523
36684
|
var handleSendReadMarker = function handleSendReadMarker() {
|
|
36524
|
-
if (isVisible && message.incoming && !(message.userMarkers && message.userMarkers.length && message.userMarkers.find(function (marker) {
|
|
36525
|
-
return marker.name === MESSAGE_DELIVERY_STATUS.READ;
|
|
36526
|
-
})) && channel.newMessageCount && channel.newMessageCount > 0 && connectionStatus === CONNECTION_STATUS.CONNECTED) {
|
|
36527
|
-
dispatch(markMessagesAsReadAC(channel.id, [message.id]));
|
|
36528
|
-
}
|
|
36529
36685
|
if (!message.userMarkers.find(function (marker) {
|
|
36530
36686
|
return marker.name === MESSAGE_DELIVERY_STATUS.DELIVERED;
|
|
36531
36687
|
})) {
|
|
36532
36688
|
if (message.userMarkers && message.userMarkers.length && message.userMarkers.find(function (marker) {
|
|
36533
36689
|
return marker.name === MESSAGE_DELIVERY_STATUS.READ;
|
|
36534
|
-
})) {
|
|
36690
|
+
}) && message.incoming && !unreadScrollTo) {
|
|
36535
36691
|
dispatch(markMessagesAsDeliveredAC(channel.id, [message.id]));
|
|
36536
36692
|
}
|
|
36537
36693
|
}
|
|
36694
|
+
if (isVisible && message.incoming && !(message.userMarkers && message.userMarkers.length && message.userMarkers.find(function (marker) {
|
|
36695
|
+
return marker.name === MESSAGE_DELIVERY_STATUS.READ;
|
|
36696
|
+
})) && channel.newMessageCount && channel.newMessageCount > 0 && connectionStatus === CONNECTION_STATUS.CONNECTED && !unreadScrollTo) {
|
|
36697
|
+
dispatch(markMessagesAsReadAC(channel.id, [message.id]));
|
|
36698
|
+
}
|
|
36538
36699
|
};
|
|
36539
36700
|
var handleForwardMessage = function handleForwardMessage(channelIds) {
|
|
36540
36701
|
if (channelIds && channelIds.length) {
|
|
@@ -36962,7 +37123,7 @@ var MessageReactionKey = styled.span(_templateObject$I || (_templateObject$I = _
|
|
|
36962
37123
|
var ReactionItemCount = styled.span(_templateObject2$D || (_templateObject2$D = _taggedTemplateLiteralLoose(["\n margin-left: 2px;\n font-family: Inter, sans-serif;\n font-weight: 400;\n font-size: 14px;\n line-height: 16px;\n color: ", ";\n"])), function (props) {
|
|
36963
37124
|
return props.color;
|
|
36964
37125
|
});
|
|
36965
|
-
var MessageReaction = styled.span(_templateObject3$
|
|
37126
|
+
var MessageReaction = styled.span(_templateObject3$y || (_templateObject3$y = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n //min-width: 23px;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin: ", ";\n margin-right: ", ";\n border: ", ";\n color: ", ";\n box-sizing: border-box;\n border-radius: ", ";\n font-size: ", ";\n line-height: ", ";\n padding: ", ";\n background-color: ", ";\n white-space: nowrap;\n\n &:last-child {\n margin-right: 0;\n }\n"])), function (props) {
|
|
36966
37127
|
return props.margin || '0 8px 0 0';
|
|
36967
37128
|
}, function (props) {
|
|
36968
37129
|
return props.isLastReaction && '0';
|
|
@@ -37061,7 +37222,7 @@ var MessageItem = styled.div(_templateObject12$4 || (_templateObject12$4 = _tagg
|
|
|
37061
37222
|
return props.hoverBackground || '';
|
|
37062
37223
|
}, HiddenMessageTime$1, MessageStatus$1);
|
|
37063
37224
|
|
|
37064
|
-
var _templateObject$J, _templateObject2$E, _templateObject3$
|
|
37225
|
+
var _templateObject$J, _templateObject2$E, _templateObject3$z, _templateObject4$u, _templateObject5$p, _templateObject6$m, _templateObject7$k, _templateObject8$j, _templateObject9$h, _templateObject0$g, _templateObject1$d;
|
|
37065
37226
|
var CreateMessageDateDivider = function CreateMessageDateDivider(_ref) {
|
|
37066
37227
|
var lastIndex = _ref.lastIndex,
|
|
37067
37228
|
currentMessageDate = _ref.currentMessageDate,
|
|
@@ -37270,6 +37431,9 @@ var MessageList = function MessageList(_ref2) {
|
|
|
37270
37431
|
var dispatch = useDispatch();
|
|
37271
37432
|
var theme = useSelector(themeSelector);
|
|
37272
37433
|
var channel = useSelector(activeChannelSelector);
|
|
37434
|
+
var _useState = useState(false),
|
|
37435
|
+
scrollIntoView = _useState[0],
|
|
37436
|
+
setScrollIntoView = _useState[1];
|
|
37273
37437
|
var contactsMap = useSelector(contactsMapSelector, shallowEqual);
|
|
37274
37438
|
var connectionStatus = useSelector(connectionStatusSelector, shallowEqual);
|
|
37275
37439
|
var openedMessageMenuId = useSelector(openedMessageMenuSelector, shallowEqual);
|
|
@@ -37288,43 +37452,44 @@ var MessageList = function MessageList(_ref2) {
|
|
|
37288
37452
|
var pollPendingPollActions = useSelector(pendingPollActionsSelector, shallowEqual);
|
|
37289
37453
|
var pendingMessagesMap = useSelector(pendingMessagesMapSelector, shallowEqual);
|
|
37290
37454
|
var showScrollToNewMessageButton = useSelector(showScrollToNewMessageButtonSelector, shallowEqual);
|
|
37455
|
+
var unreadScrollTo = useSelector(unreadScrollToSelector, shallowEqual);
|
|
37291
37456
|
var messages = useSelector(activeChannelMessagesSelector, shallowEqual) || [];
|
|
37292
|
-
var
|
|
37293
|
-
unreadMessageId =
|
|
37294
|
-
setUnreadMessageId =
|
|
37295
|
-
var _useState2 = useState(null),
|
|
37296
|
-
mediaFile = _useState2[0],
|
|
37297
|
-
setMediaFile = _useState2[1];
|
|
37457
|
+
var _useState2 = useState(''),
|
|
37458
|
+
unreadMessageId = _useState2[0],
|
|
37459
|
+
setUnreadMessageId = _useState2[1];
|
|
37298
37460
|
var _useState3 = useState(null),
|
|
37299
|
-
|
|
37300
|
-
|
|
37461
|
+
mediaFile = _useState3[0],
|
|
37462
|
+
setMediaFile = _useState3[1];
|
|
37301
37463
|
var _useState4 = useState(null),
|
|
37302
|
-
|
|
37303
|
-
|
|
37304
|
-
var _useState5 = useState(
|
|
37305
|
-
|
|
37306
|
-
|
|
37464
|
+
isDragging = _useState4[0],
|
|
37465
|
+
setIsDragging = _useState4[1];
|
|
37466
|
+
var _useState5 = useState(null),
|
|
37467
|
+
showTopDate = _useState5[0],
|
|
37468
|
+
setShowTopDate = _useState5[1];
|
|
37307
37469
|
var _useState6 = useState(false),
|
|
37308
|
-
|
|
37309
|
-
|
|
37470
|
+
stopScrolling = _useState6[0],
|
|
37471
|
+
setStopScrolling = _useState6[1];
|
|
37472
|
+
var _useState7 = useState(false),
|
|
37473
|
+
isScrolling = _useState7[0],
|
|
37474
|
+
setIsScrolling = _useState7[1];
|
|
37310
37475
|
var hideTopDateTimeout = useRef(null);
|
|
37311
|
-
var
|
|
37312
|
-
lastVisibleMessageId =
|
|
37313
|
-
_setLastVisibleMessageId =
|
|
37314
|
-
var
|
|
37315
|
-
scrollToReply =
|
|
37316
|
-
setScrollToReply =
|
|
37317
|
-
var
|
|
37318
|
-
previousScrollTop =
|
|
37319
|
-
setPreviousScrollTop =
|
|
37320
|
-
var
|
|
37321
|
-
shouldPreserveScroll =
|
|
37322
|
-
setShouldPreserveScroll =
|
|
37476
|
+
var _useState8 = useState(''),
|
|
37477
|
+
lastVisibleMessageId = _useState8[0],
|
|
37478
|
+
_setLastVisibleMessageId = _useState8[1];
|
|
37479
|
+
var _useState9 = useState(null),
|
|
37480
|
+
scrollToReply = _useState9[0],
|
|
37481
|
+
setScrollToReply = _useState9[1];
|
|
37482
|
+
var _useState0 = useState(0),
|
|
37483
|
+
previousScrollTop = _useState0[0],
|
|
37484
|
+
setPreviousScrollTop = _useState0[1];
|
|
37485
|
+
var _useState1 = useState(false),
|
|
37486
|
+
shouldPreserveScroll = _useState1[0],
|
|
37487
|
+
setShouldPreserveScroll = _useState1[1];
|
|
37323
37488
|
var messageForReply = {};
|
|
37324
37489
|
var attachmentsSelected = false;
|
|
37325
|
-
var
|
|
37326
|
-
topDateLabel =
|
|
37327
|
-
setTopDateLabel =
|
|
37490
|
+
var _useState10 = useState(''),
|
|
37491
|
+
topDateLabel = _useState10[0],
|
|
37492
|
+
setTopDateLabel = _useState10[1];
|
|
37328
37493
|
var scrollRef = useRef(null);
|
|
37329
37494
|
var loadFromServerRef = useRef(false);
|
|
37330
37495
|
var loadDirectionRef = useRef('');
|
|
@@ -37619,6 +37784,9 @@ var MessageList = function MessageList(_ref2) {
|
|
|
37619
37784
|
behavior: 'smooth'
|
|
37620
37785
|
});
|
|
37621
37786
|
}
|
|
37787
|
+
setTimeout(function () {
|
|
37788
|
+
dispatch(scrollToNewMessageAC(false, false, false));
|
|
37789
|
+
}, 800);
|
|
37622
37790
|
} else {
|
|
37623
37791
|
nextDisableRef.current = true;
|
|
37624
37792
|
prevDisableRef.current = true;
|
|
@@ -37629,6 +37797,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
37629
37797
|
dispatch(showScrollToNewMessageButtonAC(false));
|
|
37630
37798
|
setTimeout(function () {
|
|
37631
37799
|
prevDisableRef.current = false;
|
|
37800
|
+
dispatch(scrollToNewMessageAC(false, false, false));
|
|
37632
37801
|
}, 800);
|
|
37633
37802
|
}
|
|
37634
37803
|
}
|
|
@@ -37813,6 +37982,8 @@ var MessageList = function MessageList(_ref2) {
|
|
|
37813
37982
|
};
|
|
37814
37983
|
}, [messagesLoading, messages, lastVisibleMessageId]);
|
|
37815
37984
|
useEffect(function () {
|
|
37985
|
+
var interval = null;
|
|
37986
|
+
log.info('connection status is changed.. .... ', connectionStatus, 'channel ... ', channel);
|
|
37816
37987
|
if (connectionStatus === CONNECTION_STATUS.CONNECTED) {
|
|
37817
37988
|
Object.keys(pendingMessagesMap).forEach(function (key) {
|
|
37818
37989
|
pendingMessagesMap[key].forEach(function (msg) {
|
|
@@ -37822,37 +37993,50 @@ var MessageList = function MessageList(_ref2) {
|
|
|
37822
37993
|
if (Object.keys(pollPendingPollActions).length > 0) {
|
|
37823
37994
|
dispatch(resendPendingPollActionsAC(connectionStatus));
|
|
37824
37995
|
}
|
|
37996
|
+
var count = 0;
|
|
37997
|
+
interval = setInterval(function () {
|
|
37998
|
+
if (count > 20) {
|
|
37999
|
+
clearInterval(interval);
|
|
38000
|
+
}
|
|
38001
|
+
count++;
|
|
38002
|
+
if (channel.id && Object.keys(pollPendingPollActions).length === 0 && Object.keys(pendingMessagesMap).length === 0) {
|
|
38003
|
+
clearInterval(interval);
|
|
38004
|
+
loadingRef.current = false;
|
|
38005
|
+
prevDisableRef.current = false;
|
|
38006
|
+
nextDisableRef.current = false;
|
|
38007
|
+
clearMessagesMap();
|
|
38008
|
+
removeAllMessages();
|
|
38009
|
+
dispatch(getMessagesAC(channel));
|
|
38010
|
+
}
|
|
38011
|
+
}, 100);
|
|
37825
38012
|
}
|
|
37826
|
-
|
|
37827
|
-
|
|
37828
|
-
|
|
37829
|
-
if (connectionStatus === CONNECTION_STATUS.CONNECTED) {
|
|
37830
|
-
if (channel.id && Object.keys(pollPendingPollActions).length === 0 && Object.keys(pendingMessagesMap).length === 0) {
|
|
37831
|
-
loadingRef.current = false;
|
|
37832
|
-
prevDisableRef.current = false;
|
|
37833
|
-
nextDisableRef.current = false;
|
|
37834
|
-
clearMessagesMap();
|
|
37835
|
-
removeAllMessages();
|
|
37836
|
-
dispatch(getMessagesAC(channel));
|
|
38013
|
+
return function () {
|
|
38014
|
+
if (interval) {
|
|
38015
|
+
clearInterval(interval);
|
|
37837
38016
|
}
|
|
37838
|
-
}
|
|
37839
|
-
}, [connectionStatus
|
|
38017
|
+
};
|
|
38018
|
+
}, [connectionStatus]);
|
|
37840
38019
|
useEffect(function () {
|
|
37841
|
-
var unreadScrollTo = getUnreadScrollTo();
|
|
37842
38020
|
if (channel.newMessageCount && channel.newMessageCount > 0 && unreadScrollTo) {
|
|
37843
|
-
|
|
37844
|
-
|
|
38021
|
+
var scrollElement = document.getElementById('scrollableDiv');
|
|
38022
|
+
if (scrollElement) {
|
|
38023
|
+
scrollElement.style.scrollBehavior = 'inherit';
|
|
37845
38024
|
}
|
|
38025
|
+
setScrollIntoView(true);
|
|
37846
38026
|
var lastReadMessageNode = document.getElementById(channel.lastDisplayedMessageId);
|
|
37847
|
-
if (lastReadMessageNode) {
|
|
37848
|
-
|
|
37849
|
-
|
|
37850
|
-
|
|
37851
|
-
|
|
37852
|
-
|
|
38027
|
+
if (lastReadMessageNode && scrollElement) {
|
|
38028
|
+
dispatch(scrollToNewMessageAC(false));
|
|
38029
|
+
scrollElement.scrollTo({
|
|
38030
|
+
top: lastReadMessageNode.offsetTop - 200,
|
|
38031
|
+
behavior: 'auto'
|
|
38032
|
+
});
|
|
38033
|
+
setTimeout(function () {
|
|
38034
|
+
dispatch(setUnreadScrollToAC(false));
|
|
38035
|
+
setScrollIntoView(false);
|
|
38036
|
+
}, 100);
|
|
37853
38037
|
}
|
|
37854
38038
|
}
|
|
37855
|
-
}, [channel.id, channel.newMessageCount, channel.lastDisplayedMessageId]);
|
|
38039
|
+
}, [channel.id, channel.newMessageCount, scrollRef.current, unreadScrollTo, channel.lastDisplayedMessageId, scrollIntoView, messages.length]);
|
|
37856
38040
|
useEffect(function () {
|
|
37857
38041
|
return function () {
|
|
37858
38042
|
if (hideTopDateTimeout.current) {
|
|
@@ -38135,7 +38319,7 @@ var Container$i = styled.div(_templateObject$J || (_templateObject$J = _taggedTe
|
|
|
38135
38319
|
return props.thumbColor;
|
|
38136
38320
|
});
|
|
38137
38321
|
var EmptyDiv = styled.div(_templateObject2$E || (_templateObject2$E = _taggedTemplateLiteralLoose(["\n height: 300px;\n"])));
|
|
38138
|
-
var MessagesBox = styled.div(_templateObject3$
|
|
38322
|
+
var MessagesBox = styled.div(_templateObject3$z || (_templateObject3$z = _taggedTemplateLiteralLoose(["\n //height: auto;\n display: flex;\n //flex-direction: column-reverse;\n flex-direction: column;\n padding-bottom: 20px;\n //overflow: auto;\n //scroll-behavior: unset;\n"])));
|
|
38139
38323
|
var MessageTopDate = styled.div(_templateObject4$u || (_templateObject4$u = _taggedTemplateLiteralLoose(["\n position: absolute;\n justify-content: center;\n width: 100%;\n top: ", ";\n left: 0;\n margin-top: ", ";\n margin-bottom: ", ";\n text-align: center;\n z-index: 10;\n background: transparent;\n opacity: ", ";\n transition: all 0.2s ease-in-out;\n width: calc(100% - 8px);\n\n span {\n display: inline-block;\n max-width: 380px;\n font-style: normal;\n font-weight: normal;\n font-size: ", ";\n color: ", ";\n background-color: ", ";\n border: ", ";\n box-sizing: border-box;\n border-radius: ", ";\n padding: 5px 16px;\n box-shadow:\n 0 0 2px rgba(0, 0, 0, 0.08),\n 0 2px 24px rgba(0, 0, 0, 0.08);\n text-overflow: ellipsis;\n overflow: hidden;\n }\n"])), function (props) {
|
|
38140
38324
|
return props.topOffset ? props.topOffset + 22 + "px" : '22px';
|
|
38141
38325
|
}, function (props) {
|
|
@@ -38606,7 +38790,7 @@ function $isMentionNode(node) {
|
|
|
38606
38790
|
return node instanceof MentionNode;
|
|
38607
38791
|
}
|
|
38608
38792
|
|
|
38609
|
-
var _templateObject$K, _templateObject2$F, _templateObject3$
|
|
38793
|
+
var _templateObject$K, _templateObject2$F, _templateObject3$A, _templateObject4$v, _templateObject5$q;
|
|
38610
38794
|
var PUNCTUATION = '\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%\'"~=<>_:;';
|
|
38611
38795
|
var NAME = '\\b[A-Z][^\\s' + PUNCTUATION + ']';
|
|
38612
38796
|
var DocumentMentionsRegex = {
|
|
@@ -38896,7 +39080,7 @@ var MentionsList = styled.ul(_templateObject2$F || (_templateObject2$F = _tagged
|
|
|
38896
39080
|
}, function (props) {
|
|
38897
39081
|
return props.hidden ? 'hidden' : 'visible';
|
|
38898
39082
|
});
|
|
38899
|
-
var MemberItem = styled.li(_templateObject3$
|
|
39083
|
+
var MemberItem = styled.li(_templateObject3$A || (_templateObject3$A = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n font-size: 15px;\n padding: 6px 16px;\n transition: all 0.2s;\n cursor: pointer;\n background-color: ", ";\n\n & ", " {\n width: 10px;\n height: 10px;\n }\n"])), function (props) {
|
|
38900
39084
|
return props.isActiveItem && props.activeBackgroundColor;
|
|
38901
39085
|
}, UserStatus);
|
|
38902
39086
|
var UserNamePresence$2 = styled.div(_templateObject4$v || (_templateObject4$v = _taggedTemplateLiteralLoose(["\n width: calc(100% - 44px);\n margin-left: 12px;\n"])));
|
|
@@ -39740,7 +39924,7 @@ function FormatMessagePlugin(_ref) {
|
|
|
39740
39924
|
return null;
|
|
39741
39925
|
}
|
|
39742
39926
|
|
|
39743
|
-
var _templateObject$M, _templateObject2$H, _templateObject3$
|
|
39927
|
+
var _templateObject$M, _templateObject2$H, _templateObject3$B, _templateObject4$w, _templateObject5$r, _templateObject6$n, _templateObject7$l, _templateObject8$k;
|
|
39744
39928
|
var EmojiIcon$1 = function EmojiIcon(_ref) {
|
|
39745
39929
|
var collectionName = _ref.collectionName;
|
|
39746
39930
|
switch (collectionName) {
|
|
@@ -39961,7 +40145,7 @@ var EmojiHeader$1 = styled.div(_templateObject2$H || (_templateObject2$H = _tagg
|
|
|
39961
40145
|
}, function (props) {
|
|
39962
40146
|
return props.padding || '6px 18px';
|
|
39963
40147
|
});
|
|
39964
|
-
var EmojiSection$1 = styled.div(_templateObject3$
|
|
40148
|
+
var EmojiSection$1 = styled.div(_templateObject3$B || (_templateObject3$B = _taggedTemplateLiteralLoose(["\n height: 180px;\n overflow-x: hidden;\n\n & ::selection {\n color: inherit;\n background: inherit;\n }\n"])));
|
|
39965
40149
|
var EmojiCollection$1 = styled.span(_templateObject4$w || (_templateObject4$w = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n display: flex;\n justify-content: center;\n align-items: center;\n\n & > * {\n color: ", ";\n }\n"])), function (props) {
|
|
39966
40150
|
return props.iconColor;
|
|
39967
40151
|
});
|
|
@@ -40173,7 +40357,7 @@ function SvgRecordButton(props) {
|
|
|
40173
40357
|
})));
|
|
40174
40358
|
}
|
|
40175
40359
|
|
|
40176
|
-
var _templateObject$N, _templateObject2$I, _templateObject3$
|
|
40360
|
+
var _templateObject$N, _templateObject2$I, _templateObject3$C, _templateObject4$x, _templateObject5$s, _templateObject6$o, _templateObject7$m;
|
|
40177
40361
|
var shouldDraw = false;
|
|
40178
40362
|
var DEFAULT_MAX_RECORDING_DURATION = 600;
|
|
40179
40363
|
var AudioRecord = function AudioRecord(_ref) {
|
|
@@ -40763,7 +40947,7 @@ var AudioWrapper = styled.div(_templateObject2$I || (_templateObject2$I = _tagge
|
|
|
40763
40947
|
}, function (props) {
|
|
40764
40948
|
return props.recording ? '0 12px 0 0' : '0';
|
|
40765
40949
|
});
|
|
40766
|
-
var RecordIconWrapper = styled.span(_templateObject3$
|
|
40950
|
+
var RecordIconWrapper = styled.span(_templateObject3$C || (_templateObject3$C = _taggedTemplateLiteralLoose(["\n display: flex;\n cursor: pointer;\n > svg {\n color: ", ";\n }\n"])), function (props) {
|
|
40767
40951
|
return props.iconColor;
|
|
40768
40952
|
});
|
|
40769
40953
|
var AudioVisualization$1 = styled.div(_templateObject4$x || (_templateObject4$x = _taggedTemplateLiteralLoose(["\n position: absolute;\n opacity: ", ";\n z-index: ", ";\n visibility: ", ";\n width: 300px;\n height: 28px;\n max-width: calc(100% - 100px);\n left: 40px;\n background-color: ", ";\n"])), function (_ref5) {
|
|
@@ -40795,10 +40979,10 @@ var Timer$2 = styled.div(_templateObject7$m || (_templateObject7$m = _taggedTemp
|
|
|
40795
40979
|
return props.color;
|
|
40796
40980
|
});
|
|
40797
40981
|
|
|
40798
|
-
var _templateObject$O, _templateObject2$J, _templateObject3$
|
|
40982
|
+
var _templateObject$O, _templateObject2$J, _templateObject3$D;
|
|
40799
40983
|
var wave = keyframes(_templateObject$O || (_templateObject$O = _taggedTemplateLiteralLoose(["\n 0%, 100% {\n transform: scaleY(0.5);\n opacity: 0.6;\n }\n 50% {\n transform: scaleY(1.2);\n opacity: 1;\n }\n"])));
|
|
40800
40984
|
var Wrapper = styled.div(_templateObject2$J || (_templateObject2$J = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-end;\n height: 8px;\n gap: 1.5px;\n"])));
|
|
40801
|
-
var Bar$1 = styled.span(_templateObject3$
|
|
40985
|
+
var Bar$1 = styled.span(_templateObject3$D || (_templateObject3$D = _taggedTemplateLiteralLoose(["\n display: block;\n width: 3px;\n height: 8px;\n border-radius: 2px;\n background: ", ";\n animation: ", " 1s infinite;\n animation-delay: ", "s;\n"])), function (props) {
|
|
40802
40986
|
return props.borderColor;
|
|
40803
40987
|
}, wave, function (_ref) {
|
|
40804
40988
|
var delay = _ref.delay;
|
|
@@ -40846,7 +41030,7 @@ function SvgDotsVertica(props) {
|
|
|
40846
41030
|
})));
|
|
40847
41031
|
}
|
|
40848
41032
|
|
|
40849
|
-
var _templateObject$P, _templateObject2$K, _templateObject3$
|
|
41033
|
+
var _templateObject$P, _templateObject2$K, _templateObject3$E, _templateObject4$y, _templateObject5$t, _templateObject6$p, _templateObject7$n, _templateObject8$l, _templateObject9$i;
|
|
40850
41034
|
var CreatePollPopup = function CreatePollPopup(_ref) {
|
|
40851
41035
|
var togglePopup = _ref.togglePopup,
|
|
40852
41036
|
onCreate = _ref.onCreate;
|
|
@@ -41236,7 +41420,7 @@ var CustomTextArea = styled.textarea(_templateObject2$K || (_templateObject2$K =
|
|
|
41236
41420
|
}, function (props) {
|
|
41237
41421
|
return props.placeholderColor;
|
|
41238
41422
|
});
|
|
41239
|
-
var TextCounter = styled.span(_templateObject3$
|
|
41423
|
+
var TextCounter = styled.span(_templateObject3$E || (_templateObject3$E = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-weight: 500;\n font-size: 13px;\n line-height: 20px;\n margin-left: auto;\n"])), function (props) {
|
|
41240
41424
|
return props.color;
|
|
41241
41425
|
});
|
|
41242
41426
|
var OptionsList$1 = styled.div(_templateObject4$y || (_templateObject4$y = _taggedTemplateLiteralLoose(["\n max-height: 200px;\n overflow-y: auto;\n margin-top: 8px;\n padding-right: 6px;\n"])));
|
|
@@ -41266,7 +41450,7 @@ var SettingItem = styled.div(_templateObject9$i || (_templateObject9$i = _tagged
|
|
|
41266
41450
|
return props.color;
|
|
41267
41451
|
});
|
|
41268
41452
|
|
|
41269
|
-
var _templateObject$Q, _templateObject2$L, _templateObject3$
|
|
41453
|
+
var _templateObject$Q, _templateObject2$L, _templateObject3$F, _templateObject4$z, _templateObject5$u, _templateObject6$q, _templateObject7$o, _templateObject8$m, _templateObject9$j, _templateObject0$h, _templateObject1$e, _templateObject10$8, _templateObject11$6, _templateObject12$5, _templateObject13$3, _templateObject14$2, _templateObject15$2, _templateObject16$2, _templateObject17$2, _templateObject18$2, _templateObject19$2, _templateObject20$2, _templateObject21$1, _templateObject22$1, _templateObject23$1, _templateObject24$1, _templateObject25$1, _templateObject26$1, _templateObject27$1, _templateObject28$1, _templateObject29$1, _templateObject30$1, _templateObject31$1, _templateObject32$1, _templateObject33$1, _templateObject34$1;
|
|
41270
41454
|
function AutoFocusPlugin(_ref) {
|
|
41271
41455
|
var messageForReply = _ref.messageForReply;
|
|
41272
41456
|
var _useLexicalComposerCo = useLexicalComposerContext(),
|
|
@@ -42899,7 +43083,7 @@ var Container$l = styled.div(_templateObject2$L || (_templateObject2$L = _tagged
|
|
|
42899
43083
|
}, function (props) {
|
|
42900
43084
|
return props.mentionColor;
|
|
42901
43085
|
});
|
|
42902
|
-
var EditReplyMessageCont = styled.div(_templateObject3$
|
|
43086
|
+
var EditReplyMessageCont = styled.div(_templateObject3$F || (_templateObject3$F = _taggedTemplateLiteralLoose(["\n position: relative;\n left: ", ";\n bottom: ", ";\n width: ", ";\n border-radius: ", ";\n padding: ", ";\n font-weight: 400;\n font-size: 15px;\n line-height: 20px;\n letter-spacing: -0.2px;\n color: ", ";\n background-color: ", ";\n z-index: 19;\n box-sizing: content-box;\n"])), function (props) {
|
|
42903
43087
|
return props.left || '0';
|
|
42904
43088
|
}, function (props) {
|
|
42905
43089
|
return props.bottom || '0';
|
|
@@ -43266,7 +43450,7 @@ function SvgUnpin(props) {
|
|
|
43266
43450
|
})));
|
|
43267
43451
|
}
|
|
43268
43452
|
|
|
43269
|
-
var _templateObject$R, _templateObject2$M, _templateObject3$
|
|
43453
|
+
var _templateObject$R, _templateObject2$M, _templateObject3$G, _templateObject4$A, _templateObject5$v, _templateObject6$r, _templateObject7$p, _templateObject8$n, _templateObject9$k, _templateObject0$i, _templateObject1$f, _templateObject10$9, _templateObject11$7, _templateObject12$6, _templateObject13$4, _templateObject14$3, _templateObject15$3, _templateObject16$3;
|
|
43270
43454
|
var Actions = function Actions(_ref) {
|
|
43271
43455
|
var setActionsHeight = _ref.setActionsHeight,
|
|
43272
43456
|
channel = _ref.channel,
|
|
@@ -43734,7 +43918,7 @@ var Container$m = styled.div(_templateObject$R || (_templateObject$R = _taggedTe
|
|
|
43734
43918
|
return props.borderColor;
|
|
43735
43919
|
});
|
|
43736
43920
|
var ActionHeader = styled.div(_templateObject2$M || (_templateObject2$M = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 25px 0 22px;\n cursor: pointer;\n"])));
|
|
43737
|
-
var MenuTriggerIcon = styled.span(_templateObject3$
|
|
43921
|
+
var MenuTriggerIcon = styled.span(_templateObject3$G || (_templateObject3$G = _taggedTemplateLiteralLoose(["\n transition: all 0.2s;\n ", "\n"])), function (props) {
|
|
43738
43922
|
return !props.isOpen && ' transform: rotate(-90deg);';
|
|
43739
43923
|
});
|
|
43740
43924
|
var ActionsMenu = styled.ul(_templateObject4$A || (_templateObject4$A = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n list-style: none;\n transition: all 0.2s;\n"])));
|
|
@@ -43824,7 +44008,7 @@ function SvgMoreVert(props) {
|
|
|
43824
44008
|
})));
|
|
43825
44009
|
}
|
|
43826
44010
|
|
|
43827
|
-
var _templateObject$S, _templateObject2$N, _templateObject3$
|
|
44011
|
+
var _templateObject$S, _templateObject2$N, _templateObject3$H;
|
|
43828
44012
|
var ChangeMemberRole = function ChangeMemberRole(_ref) {
|
|
43829
44013
|
var theme = _ref.theme,
|
|
43830
44014
|
channelId = _ref.channelId,
|
|
@@ -43929,7 +44113,7 @@ var RoleLabel = styled.div(_templateObject2$N || (_templateObject2$N = _taggedTe
|
|
|
43929
44113
|
var color = _ref2.color;
|
|
43930
44114
|
return color;
|
|
43931
44115
|
});
|
|
43932
|
-
var RoleSpan = styled.span(_templateObject3$
|
|
44116
|
+
var RoleSpan = styled.span(_templateObject3$H || (_templateObject3$H = _taggedTemplateLiteralLoose(["\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n text-transform: capitalize;\n"])));
|
|
43933
44117
|
|
|
43934
44118
|
function ResetLinkConfirmModal(_ref) {
|
|
43935
44119
|
var _getInviteLinkOptions;
|
|
@@ -43966,7 +44150,7 @@ function ResetLinkConfirmModal(_ref) {
|
|
|
43966
44150
|
});
|
|
43967
44151
|
}
|
|
43968
44152
|
|
|
43969
|
-
var _templateObject$T, _templateObject2$O, _templateObject3$
|
|
44153
|
+
var _templateObject$T, _templateObject2$O, _templateObject3$I, _templateObject4$B, _templateObject5$w, _templateObject6$s, _templateObject7$q, _templateObject8$o, _templateObject9$l, _templateObject0$j, _templateObject1$g, _templateObject10$a, _templateObject11$8, _templateObject12$7, _templateObject13$5;
|
|
43970
44154
|
function InviteLinkModal(_ref) {
|
|
43971
44155
|
var _getInviteLinkOptions, _tabs$link, _tabs$qr, _tabs$link2, _tabs$qr2;
|
|
43972
44156
|
var onClose = _ref.onClose,
|
|
@@ -44456,7 +44640,7 @@ var Tabs$1 = styled.div(_templateObject2$O || (_templateObject2$O = _taggedTempl
|
|
|
44456
44640
|
}, function (p) {
|
|
44457
44641
|
return p.borderColor;
|
|
44458
44642
|
});
|
|
44459
|
-
var TabButton = styled.button(_templateObject3$
|
|
44643
|
+
var TabButton = styled.button(_templateObject3$I || (_templateObject3$I = _taggedTemplateLiteralLoose(["\n height: 36px;\n border: none;\n border-radius: 10px;\n cursor: pointer;\n background-color: ", ";\n ", "\n color: ", ";\n"])), function (p) {
|
|
44460
44644
|
return p.active ? p.activeBackgroundColor : p.backgroundColor;
|
|
44461
44645
|
}, function (p) {
|
|
44462
44646
|
return p.active && "\n box-shadow: 0px 3px 6px -4px #0000001F;\n ";
|
|
@@ -44498,7 +44682,7 @@ var QrHint = styled.p(_templateObject13$5 || (_templateObject13$5 = _taggedTempl
|
|
|
44498
44682
|
return p.color;
|
|
44499
44683
|
});
|
|
44500
44684
|
|
|
44501
|
-
var _templateObject$U, _templateObject2$P, _templateObject3$
|
|
44685
|
+
var _templateObject$U, _templateObject2$P, _templateObject3$J, _templateObject4$C, _templateObject5$x, _templateObject6$t, _templateObject7$r, _templateObject8$p, _templateObject9$m;
|
|
44502
44686
|
var Members = function Members(_ref) {
|
|
44503
44687
|
var _members$find;
|
|
44504
44688
|
var channel = _ref.channel,
|
|
@@ -44822,7 +45006,7 @@ var Members = function Members(_ref) {
|
|
|
44822
45006
|
};
|
|
44823
45007
|
var Container$n = styled.div(_templateObject$U || (_templateObject$U = _taggedTemplateLiteralLoose([""])));
|
|
44824
45008
|
var ActionsMenu$1 = styled.div(_templateObject2$P || (_templateObject2$P = _taggedTemplateLiteralLoose(["\n position: relative;\n transition: all 0.2s;\n"])));
|
|
44825
|
-
var MemberNamePresence = styled.div(_templateObject3$
|
|
45009
|
+
var MemberNamePresence = styled.div(_templateObject3$J || (_templateObject3$J = _taggedTemplateLiteralLoose(["\n margin-left: 12px;\n max-width: calc(100% - 84px);\n\n & > ", " {\n display: block;\n }\n"])), SubTitle);
|
|
44826
45010
|
var MemberNameWrapper = styled.div(_templateObject4$C || (_templateObject4$C = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n"])));
|
|
44827
45011
|
var MemberName$3 = styled.h4(_templateObject5$x || (_templateObject5$x = _taggedTemplateLiteralLoose(["\n margin: 0;\n font-weight: 400;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n color: ", ";\n"])), function (props) {
|
|
44828
45012
|
return props.color;
|
|
@@ -44895,7 +45079,7 @@ var Media = function Media(_ref) {
|
|
|
44895
45079
|
})));
|
|
44896
45080
|
};
|
|
44897
45081
|
var Container$o = styled.div(_templateObject$V || (_templateObject$V = _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"])));
|
|
44898
|
-
var MediaItem = styled.div(_templateObject2$Q || (_templateObject2$Q = _taggedTemplateLiteralLoose(["\n width: calc(33.3333% - 4px);\n
|
|
45082
|
+
var MediaItem = styled.div(_templateObject2$Q || (_templateObject2$Q = _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"])));
|
|
44899
45083
|
|
|
44900
45084
|
var _rect$3, _path$1u;
|
|
44901
45085
|
function _extends$1y() {
|
|
@@ -44951,7 +45135,7 @@ function SvgDownloadFile(props) {
|
|
|
44951
45135
|
})));
|
|
44952
45136
|
}
|
|
44953
45137
|
|
|
44954
|
-
var _templateObject$W, _templateObject2$R, _templateObject3$
|
|
45138
|
+
var _templateObject$W, _templateObject2$R, _templateObject3$K, _templateObject4$D, _templateObject5$y, _templateObject6$u, _templateObject7$s, _templateObject8$q;
|
|
44955
45139
|
var Files = function Files(_ref) {
|
|
44956
45140
|
var channelId = _ref.channelId,
|
|
44957
45141
|
filePreviewIcon = _ref.filePreviewIcon,
|
|
@@ -45075,7 +45259,7 @@ var DownloadWrapper = styled.a(_templateObject2$R || (_templateObject2$R = _tagg
|
|
|
45075
45259
|
}, function (props) {
|
|
45076
45260
|
return props.iconColor;
|
|
45077
45261
|
});
|
|
45078
|
-
var ProgressWrapper$2 = styled.span(_templateObject3$
|
|
45262
|
+
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"])));
|
|
45079
45263
|
var FileIconCont = styled.span(_templateObject4$D || (_templateObject4$D = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n\n & > svg {\n width: 40px;\n height: 40px;\n color: ", ";\n fill: ", ";\n }\n"])), function (props) {
|
|
45080
45264
|
return props.iconColor;
|
|
45081
45265
|
}, function (props) {
|
|
@@ -45129,7 +45313,7 @@ function SvgLinkIcon(props) {
|
|
|
45129
45313
|
})));
|
|
45130
45314
|
}
|
|
45131
45315
|
|
|
45132
|
-
var _templateObject$X, _templateObject2$S, _templateObject3$
|
|
45316
|
+
var _templateObject$X, _templateObject2$S, _templateObject3$L, _templateObject4$E, _templateObject5$z;
|
|
45133
45317
|
var LinkItem = function LinkItem(_ref) {
|
|
45134
45318
|
var link = _ref.link,
|
|
45135
45319
|
linkPreviewIcon = _ref.linkPreviewIcon,
|
|
@@ -45170,7 +45354,7 @@ var LinkHoverIconCont = styled.span(_templateObject2$S || (_templateObject2$S =
|
|
|
45170
45354
|
}, function (props) {
|
|
45171
45355
|
return props.fillColor;
|
|
45172
45356
|
});
|
|
45173
|
-
var LinkInfoCont = styled.div(_templateObject3$
|
|
45357
|
+
var LinkInfoCont = styled.div(_templateObject3$L || (_templateObject3$L = _taggedTemplateLiteralLoose(["\n margin-left: 12px;\n width: calc(100% - 40px);\n"])));
|
|
45174
45358
|
var FileItem$1 = styled.li(_templateObject4$E || (_templateObject4$E = _taggedTemplateLiteralLoose(["\n padding: 9px 16px;\n a {\n display: flex;\n align-items: center;\n text-decoration: none;\n }\n &:hover {\n background-color: ", ";\n & ", " {\n display: none;\n }\n & ", " {\n display: inline-flex;\n }\n }\n"])), function (props) {
|
|
45175
45359
|
return props.hoverBackgroundColor;
|
|
45176
45360
|
}, LinkIconCont, LinkHoverIconCont);
|
|
@@ -45259,7 +45443,7 @@ function SvgVoicePreviewPause(props) {
|
|
|
45259
45443
|
})));
|
|
45260
45444
|
}
|
|
45261
45445
|
|
|
45262
|
-
var _templateObject$Z, _templateObject2$T, _templateObject3$
|
|
45446
|
+
var _templateObject$Z, _templateObject2$T, _templateObject3$M, _templateObject4$F, _templateObject5$A, _templateObject6$v, _templateObject7$t, _templateObject8$r;
|
|
45263
45447
|
var VoiceItem = function VoiceItem(_ref) {
|
|
45264
45448
|
var file = _ref.file,
|
|
45265
45449
|
voicePreviewPlayIcon = _ref.voicePreviewPlayIcon,
|
|
@@ -45394,7 +45578,7 @@ var FileHoverIconCont$1 = styled.span(_templateObject2$T || (_templateObject2$T
|
|
|
45394
45578
|
}, function (props) {
|
|
45395
45579
|
return props.fill || 'transparent';
|
|
45396
45580
|
});
|
|
45397
|
-
var FileItem$2 = styled.li(_templateObject3$
|
|
45581
|
+
var FileItem$2 = styled.li(_templateObject3$M || (_templateObject3$M = _taggedTemplateLiteralLoose(["\n padding: 9px 16px;\n display: flex;\n align-items: center;\n text-decoration: none;\n\n &:hover {\n background-color: ", ";\n }\n div {\n margin-left: 12px;\n width: 100%;\n }\n img {\n width: 42px;\n height: 42px;\n border: 0.5px solid rgba(0, 0, 0, 0.1);\n box-sizing: border-box;\n border-radius: 6px;\n }\n\n &.isHover {\n & ", " {\n display: none;\n }\n & ", " {\n display: inline-flex;\n }\n }\n"])), function (props) {
|
|
45398
45582
|
return props.hoverBackgroundColor;
|
|
45399
45583
|
}, FileIconCont$1, FileHoverIconCont$1);
|
|
45400
45584
|
var AudioInfo = styled.div(_templateObject4$F || (_templateObject4$F = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
|
|
@@ -45612,7 +45796,7 @@ var DetailsTabHeader = styled.div(_templateObject2$U || (_templateObject2$U = _t
|
|
|
45612
45796
|
return props.activeTabColor;
|
|
45613
45797
|
});
|
|
45614
45798
|
|
|
45615
|
-
var _templateObject$10, _templateObject2$V, _templateObject3$
|
|
45799
|
+
var _templateObject$10, _templateObject2$V, _templateObject3$N, _templateObject4$G;
|
|
45616
45800
|
var Container$t = styled.div(_templateObject$10 || (_templateObject$10 = _taggedTemplateLiteralLoose(["\n ", ";\n height: ", ";\n position: absolute;\n padding: 24px 16px;\n background-color: ", ";\n z-index: 25;\n"])), function (props) {
|
|
45617
45801
|
return props.active ? 'display: block' : 'display: none';
|
|
45618
45802
|
}, function (props) {
|
|
@@ -45621,7 +45805,7 @@ var Container$t = styled.div(_templateObject$10 || (_templateObject$10 = _tagged
|
|
|
45621
45805
|
return props.backgroundColor;
|
|
45622
45806
|
});
|
|
45623
45807
|
var AvatarCont = styled.div(_templateObject2$V || (_templateObject2$V = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n margin-bottom: 4px;\n\n &::after {\n content: '';\n position: absolute;\n width: 120px;\n height: 120px;\n border-radius: 50%;\n background-color: rgba(0, 0, 0, 0.4);\n }\n .dropdown-body {\n top: inherit;\n right: inherit;\n bottom: -90px;\n }\n"])));
|
|
45624
|
-
var DropDownWrapper = styled.div(_templateObject3$
|
|
45808
|
+
var DropDownWrapper = styled.div(_templateObject3$N || (_templateObject3$N = _taggedTemplateLiteralLoose(["\n position: absolute;\n z-index: 4;\n width: 40px;\n height: 40px;\n"])));
|
|
45625
45809
|
var EditChannelFooter = styled(ButtonBlock)(_templateObject4$G || (_templateObject4$G = _taggedTemplateLiteralLoose(["\n margin-top: 24px;\n\n & > button {\n margin-left: 12px;\n }\n"])));
|
|
45626
45810
|
var EditChannel = function EditChannel(_ref) {
|
|
45627
45811
|
var channel = _ref.channel,
|
|
@@ -45877,7 +46061,7 @@ var EditChannel = function EditChannel(_ref) {
|
|
|
45877
46061
|
})));
|
|
45878
46062
|
};
|
|
45879
46063
|
|
|
45880
|
-
var _templateObject$11, _templateObject2$W, _templateObject3$
|
|
46064
|
+
var _templateObject$11, _templateObject2$W, _templateObject3$O, _templateObject4$H, _templateObject5$B, _templateObject6$w, _templateObject7$u, _templateObject8$s, _templateObject9$n, _templateObject0$k, _templateObject1$h, _templateObject10$b, _templateObject11$9;
|
|
45881
46065
|
var Details = function Details(_ref) {
|
|
45882
46066
|
var _activeChannel$member;
|
|
45883
46067
|
var detailsTitleText = _ref.detailsTitleText,
|
|
@@ -46317,7 +46501,7 @@ var Container$u = styled.div(_templateObject$11 || (_templateObject$11 = _tagged
|
|
|
46317
46501
|
var ChannelDetailsHeader = styled.div(_templateObject2$W || (_templateObject2$W = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n padding: 16px;\n position: relative;\n height: 64px;\n box-sizing: border-box;\n border-bottom: 1px solid ", ";\n\n & svg {\n cursor: pointer;\n }\n"])), function (props) {
|
|
46318
46502
|
return props.borderColor;
|
|
46319
46503
|
});
|
|
46320
|
-
var ChatDetails = styled.div(_templateObject3$
|
|
46504
|
+
var ChatDetails = styled.div(_templateObject3$O || (_templateObject3$O = _taggedTemplateLiteralLoose(["\n //position: relative;\n width: ", ";\n //height: ", ";\n height: ", ";\n overflow-y: auto;\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n"])), function (props) {
|
|
46321
46505
|
return props.size === 'small' ? '300px' : props.size === 'medium' ? '350px' : '400px';
|
|
46322
46506
|
}, function (props) {
|
|
46323
46507
|
return props.height ? "calc(100vh - " + props.heightOffset + "px)" : '100vh';
|