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