sceyt-chat-react-uikit 1.8.9-beta.5 → 1.8.9-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +214 -388
- package/index.modern.js +214 -388
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -25666,81 +25666,52 @@ function watchForEvents() {
|
|
|
25666
25666
|
}, _marked0$1);
|
|
25667
25667
|
}
|
|
25668
25668
|
|
|
25669
|
-
var READ_MESSAGE_LOG_KEY_ALIASES = {
|
|
25670
|
-
source: 's',
|
|
25671
|
-
channelId: 'ch',
|
|
25672
|
-
readAll: 'ra',
|
|
25673
|
-
messageIds: 'mi',
|
|
25674
|
-
messageId: 'm',
|
|
25675
|
-
connectionStatus: 'cs',
|
|
25676
|
-
attempts: 'at',
|
|
25677
|
-
retryDelayMs: 'rd',
|
|
25678
|
-
requestedMessageIds: 'rq',
|
|
25679
|
-
confirmedMessageIds: 'cf',
|
|
25680
|
-
isVisible: 'iv',
|
|
25681
|
-
alreadyRead: 'ar',
|
|
25682
|
-
disableAutoReadTracking: 'da',
|
|
25683
|
-
isTabActive: 'ta',
|
|
25684
|
-
newMessageCount: 'nm',
|
|
25685
|
-
queued: 'q',
|
|
25686
|
-
localRef: 'lr',
|
|
25687
|
-
visibleCandidateIds: 'vc',
|
|
25688
|
-
unreadScrollTo: 'us',
|
|
25689
|
-
pendingFrameScheduled: 'pf'
|
|
25690
|
-
};
|
|
25691
|
-
var compactReadMessageLogData = function compactReadMessageLogData(data) {
|
|
25692
|
-
return JSON.stringify(Object.fromEntries(Object.entries(data).map(function (_ref) {
|
|
25693
|
-
var key = _ref[0],
|
|
25694
|
-
value = _ref[1];
|
|
25695
|
-
return [READ_MESSAGE_LOG_KEY_ALIASES[key] || key.slice(0, 2), value];
|
|
25696
|
-
})));
|
|
25697
|
-
};
|
|
25698
|
-
|
|
25699
25669
|
var _marked$3 = /*#__PURE__*/_regenerator().m(applyChannelReadProgress),
|
|
25700
|
-
_marked2$3 = /*#__PURE__*/_regenerator().m(
|
|
25701
|
-
_marked3$2 = /*#__PURE__*/_regenerator().m(
|
|
25702
|
-
_marked4$2 = /*#__PURE__*/_regenerator().m(
|
|
25703
|
-
_marked5$2 = /*#__PURE__*/_regenerator().m(
|
|
25704
|
-
_marked6$2 = /*#__PURE__*/_regenerator().m(
|
|
25705
|
-
_marked7$2 = /*#__PURE__*/_regenerator().m(
|
|
25706
|
-
_marked8$2 = /*#__PURE__*/_regenerator().m(
|
|
25707
|
-
_marked9$2 = /*#__PURE__*/_regenerator().m(
|
|
25708
|
-
_marked0$2 = /*#__PURE__*/_regenerator().m(
|
|
25709
|
-
_marked1$1 = /*#__PURE__*/_regenerator().m(
|
|
25710
|
-
_marked10$1 = /*#__PURE__*/_regenerator().m(
|
|
25711
|
-
_marked11$1 = /*#__PURE__*/_regenerator().m(
|
|
25712
|
-
_marked12$1 = /*#__PURE__*/_regenerator().m(
|
|
25713
|
-
_marked13$1 = /*#__PURE__*/_regenerator().m(
|
|
25714
|
-
_marked14$1 = /*#__PURE__*/_regenerator().m(
|
|
25715
|
-
_marked15$1 = /*#__PURE__*/_regenerator().m(
|
|
25716
|
-
_marked16$1 = /*#__PURE__*/_regenerator().m(
|
|
25717
|
-
_marked17$1 = /*#__PURE__*/_regenerator().m(
|
|
25718
|
-
_marked18$1 = /*#__PURE__*/_regenerator().m(
|
|
25719
|
-
_marked19$1 = /*#__PURE__*/_regenerator().m(
|
|
25720
|
-
_marked20$1 = /*#__PURE__*/_regenerator().m(
|
|
25721
|
-
_marked21$1 = /*#__PURE__*/_regenerator().m(
|
|
25722
|
-
_marked22$1 = /*#__PURE__*/_regenerator().m(
|
|
25723
|
-
_marked23$1 = /*#__PURE__*/_regenerator().m(
|
|
25724
|
-
_marked24$1 = /*#__PURE__*/_regenerator().m(
|
|
25725
|
-
_marked25$1 = /*#__PURE__*/_regenerator().m(
|
|
25726
|
-
_marked26$1 = /*#__PURE__*/_regenerator().m(
|
|
25727
|
-
_marked27$1 = /*#__PURE__*/_regenerator().m(
|
|
25728
|
-
_marked28$1 = /*#__PURE__*/_regenerator().m(
|
|
25729
|
-
_marked29$1 = /*#__PURE__*/_regenerator().m(
|
|
25730
|
-
_marked30$1 = /*#__PURE__*/_regenerator().m(
|
|
25731
|
-
_marked31$1 = /*#__PURE__*/_regenerator().m(
|
|
25732
|
-
_marked32$1 = /*#__PURE__*/_regenerator().m(
|
|
25733
|
-
_marked33$1 = /*#__PURE__*/_regenerator().m(
|
|
25734
|
-
_marked34$1 = /*#__PURE__*/_regenerator().m(
|
|
25735
|
-
_marked35$1 = /*#__PURE__*/_regenerator().m(
|
|
25736
|
-
_marked36$1 = /*#__PURE__*/_regenerator().m(
|
|
25737
|
-
_marked37$1 = /*#__PURE__*/_regenerator().m(
|
|
25738
|
-
_marked38$1 = /*#__PURE__*/_regenerator().m(
|
|
25739
|
-
_marked39$1 = /*#__PURE__*/_regenerator().m(
|
|
25740
|
-
_marked40$1 = /*#__PURE__*/_regenerator().m(
|
|
25741
|
-
_marked41$1 = /*#__PURE__*/_regenerator().m(
|
|
25742
|
-
_marked42$1 = /*#__PURE__*/_regenerator().m(
|
|
25743
|
-
_marked43$1 = /*#__PURE__*/_regenerator().m(
|
|
25670
|
+
_marked2$3 = /*#__PURE__*/_regenerator().m(confirmDisplayedRead),
|
|
25671
|
+
_marked3$2 = /*#__PURE__*/_regenerator().m(createChannel),
|
|
25672
|
+
_marked4$2 = /*#__PURE__*/_regenerator().m(getChannels),
|
|
25673
|
+
_marked5$2 = /*#__PURE__*/_regenerator().m(searchChannels),
|
|
25674
|
+
_marked6$2 = /*#__PURE__*/_regenerator().m(getChannelsForForward),
|
|
25675
|
+
_marked7$2 = /*#__PURE__*/_regenerator().m(searchChannelsForForward),
|
|
25676
|
+
_marked8$2 = /*#__PURE__*/_regenerator().m(channelsLoadMore),
|
|
25677
|
+
_marked9$2 = /*#__PURE__*/_regenerator().m(getChannelMentions),
|
|
25678
|
+
_marked0$2 = /*#__PURE__*/_regenerator().m(channelsForForwardLoadMore),
|
|
25679
|
+
_marked1$1 = /*#__PURE__*/_regenerator().m(markMessagesRead),
|
|
25680
|
+
_marked10$1 = /*#__PURE__*/_regenerator().m(markVoiceMessageAsPlayed),
|
|
25681
|
+
_marked11$1 = /*#__PURE__*/_regenerator().m(updateMessageAsOpened),
|
|
25682
|
+
_marked12$1 = /*#__PURE__*/_regenerator().m(markMessageAsOpened),
|
|
25683
|
+
_marked13$1 = /*#__PURE__*/_regenerator().m(markMessagesDelivered),
|
|
25684
|
+
_marked14$1 = /*#__PURE__*/_regenerator().m(switchChannel),
|
|
25685
|
+
_marked15$1 = /*#__PURE__*/_regenerator().m(notificationsTurnOff),
|
|
25686
|
+
_marked16$1 = /*#__PURE__*/_regenerator().m(notificationsTurnOn),
|
|
25687
|
+
_marked17$1 = /*#__PURE__*/_regenerator().m(markChannelAsRead),
|
|
25688
|
+
_marked18$1 = /*#__PURE__*/_regenerator().m(resendPendingChannelReads),
|
|
25689
|
+
_marked19$1 = /*#__PURE__*/_regenerator().m(markChannelAsUnRead),
|
|
25690
|
+
_marked20$1 = /*#__PURE__*/_regenerator().m(pinChannel),
|
|
25691
|
+
_marked21$1 = /*#__PURE__*/_regenerator().m(unpinChannel),
|
|
25692
|
+
_marked22$1 = /*#__PURE__*/_regenerator().m(removeChannelCaches),
|
|
25693
|
+
_marked23$1 = /*#__PURE__*/_regenerator().m(leaveChannel),
|
|
25694
|
+
_marked24$1 = /*#__PURE__*/_regenerator().m(deletePendingDeleteChannels),
|
|
25695
|
+
_marked25$1 = /*#__PURE__*/_regenerator().m(deleteChannel),
|
|
25696
|
+
_marked26$1 = /*#__PURE__*/_regenerator().m(blockChannel),
|
|
25697
|
+
_marked27$1 = /*#__PURE__*/_regenerator().m(updateChannel),
|
|
25698
|
+
_marked28$1 = /*#__PURE__*/_regenerator().m(checkUsersStatus),
|
|
25699
|
+
_marked29$1 = /*#__PURE__*/_regenerator().m(sendTyping),
|
|
25700
|
+
_marked30$1 = /*#__PURE__*/_regenerator().m(sendRecording),
|
|
25701
|
+
_marked31$1 = /*#__PURE__*/_regenerator().m(clearHistory),
|
|
25702
|
+
_marked32$1 = /*#__PURE__*/_regenerator().m(deleteAllMessages),
|
|
25703
|
+
_marked33$1 = /*#__PURE__*/_regenerator().m(joinChannel),
|
|
25704
|
+
_marked34$1 = /*#__PURE__*/_regenerator().m(watchForChannelEvents),
|
|
25705
|
+
_marked35$1 = /*#__PURE__*/_regenerator().m(createChannelInviteKey),
|
|
25706
|
+
_marked36$1 = /*#__PURE__*/_regenerator().m(getChannelInviteKeys),
|
|
25707
|
+
_marked37$1 = /*#__PURE__*/_regenerator().m(regenerateChannelInviteKey),
|
|
25708
|
+
_marked38$1 = /*#__PURE__*/_regenerator().m(updateChannelInviteKey),
|
|
25709
|
+
_marked39$1 = /*#__PURE__*/_regenerator().m(getChannelByInviteKey),
|
|
25710
|
+
_marked40$1 = /*#__PURE__*/_regenerator().m(joinChannelWithInviteKey),
|
|
25711
|
+
_marked41$1 = /*#__PURE__*/_regenerator().m(setMessageRetentionPeriod),
|
|
25712
|
+
_marked42$1 = /*#__PURE__*/_regenerator().m(getChannelsWithUser),
|
|
25713
|
+
_marked43$1 = /*#__PURE__*/_regenerator().m(loadMoreMutualChannels),
|
|
25714
|
+
_marked44$1 = /*#__PURE__*/_regenerator().m(ChannelsSaga);
|
|
25744
25715
|
var getUniqueMessageIds = function getUniqueMessageIds(messageIds) {
|
|
25745
25716
|
if (messageIds === void 0) {
|
|
25746
25717
|
messageIds = [];
|
|
@@ -25842,104 +25813,80 @@ function applyChannelReadProgress(channelId, updateData) {
|
|
|
25842
25813
|
var shouldKeepQueuedPendingRead = function shouldKeepQueuedPendingRead(error) {
|
|
25843
25814
|
return isResendableError(error === null || error === void 0 ? void 0 : error.type);
|
|
25844
25815
|
};
|
|
25845
|
-
|
|
25846
|
-
|
|
25847
|
-
|
|
25848
|
-
|
|
25849
|
-
|
|
25850
|
-
|
|
25851
|
-
|
|
25852
|
-
|
|
25853
|
-
|
|
25854
|
-
|
|
25855
|
-
source = 'initial';
|
|
25856
|
-
}
|
|
25857
|
-
return /*#__PURE__*/_regenerator().m(function _callee() {
|
|
25858
|
-
var messageIds, logContext, attempt, connectionStatus, messageListMarker, _t;
|
|
25859
|
-
return _regenerator().w(function (_context2) {
|
|
25860
|
-
while (1) switch (_context2.p = _context2.n) {
|
|
25861
|
-
case 0:
|
|
25862
|
-
messageIds = getUniqueMessageIds(pendingRead.messageIds);
|
|
25863
|
-
logContext = getReadMarkerLogContext(pendingRead, source, messageIds);
|
|
25864
|
-
attempt = 0;
|
|
25865
|
-
case 1:
|
|
25866
|
-
if (!(attempt <= READ_MARKER_RETRY_DELAYS_MS.length)) {
|
|
25867
|
-
_context2.n = 10;
|
|
25868
|
-
break;
|
|
25869
|
-
}
|
|
25870
|
-
connectionStatus = store.getState().UserReducer.connectionStatus;
|
|
25871
|
-
if (!(connectionStatus !== CONNECTION_STATUS.CONNECTED)) {
|
|
25872
|
-
_context2.n = 2;
|
|
25873
|
-
break;
|
|
25874
|
-
}
|
|
25875
|
-
log.warn('[READ_MESSAGE] Queued read marker because connection is not ready', compactReadMessageLogData(_extends({}, logContext, {
|
|
25876
|
-
connectionStatus: connectionStatus
|
|
25877
|
-
})));
|
|
25878
|
-
return _context2.a(2, {
|
|
25879
|
-
status: 'queued'
|
|
25880
|
-
});
|
|
25881
|
-
case 2:
|
|
25882
|
-
_context2.p = 2;
|
|
25883
|
-
if (!pendingRead.readAll) {
|
|
25884
|
-
_context2.n = 4;
|
|
25885
|
-
break;
|
|
25886
|
-
}
|
|
25887
|
-
_context2.n = 3;
|
|
25888
|
-
return effects.call(channel.markAsRead);
|
|
25889
|
-
case 3:
|
|
25890
|
-
return _context2.a(2, {
|
|
25891
|
-
status: 'success'
|
|
25892
|
-
});
|
|
25893
|
-
case 4:
|
|
25894
|
-
_context2.n = 5;
|
|
25895
|
-
return effects.call(channel.markMessagesAsDisplayed, messageIds);
|
|
25896
|
-
case 5:
|
|
25897
|
-
messageListMarker = _context2.v;
|
|
25898
|
-
return _context2.a(2, {
|
|
25899
|
-
status: 'success',
|
|
25900
|
-
messageListMarker: messageListMarker
|
|
25901
|
-
});
|
|
25902
|
-
case 6:
|
|
25903
|
-
_context2.p = 6;
|
|
25904
|
-
_t = _context2.v;
|
|
25905
|
-
if (shouldKeepQueuedPendingRead(_t)) {
|
|
25906
|
-
_context2.n = 7;
|
|
25907
|
-
break;
|
|
25908
|
-
}
|
|
25909
|
-
log.error(_t, '[READ_MESSAGE] Dropping read marker after non-resendable error', compactReadMessageLogData(logContext));
|
|
25910
|
-
return _context2.a(2, {
|
|
25911
|
-
status: 'drop',
|
|
25912
|
-
error: _t
|
|
25913
|
-
});
|
|
25914
|
-
case 7:
|
|
25915
|
-
if (!(attempt === READ_MARKER_RETRY_DELAYS_MS.length)) {
|
|
25916
|
-
_context2.n = 8;
|
|
25917
|
-
break;
|
|
25918
|
-
}
|
|
25919
|
-
log.error(_t, '[READ_MESSAGE] Exhausted read marker retries; keeping queued for replay', compactReadMessageLogData(_extends({}, logContext, {
|
|
25920
|
-
attempts: attempt + 1
|
|
25921
|
-
})));
|
|
25922
|
-
return _context2.a(2, {
|
|
25923
|
-
status: 'queued',
|
|
25924
|
-
error: _t
|
|
25925
|
-
});
|
|
25926
|
-
case 8:
|
|
25927
|
-
log.warn(_t, "[READ_MESSAGE] Retrying read marker (" + (attempt + 1) + "/" + READ_MARKER_RETRY_DELAYS_MS.length + ")", compactReadMessageLogData(_extends({}, logContext, {
|
|
25928
|
-
retryDelayMs: READ_MARKER_RETRY_DELAYS_MS[attempt]
|
|
25929
|
-
})));
|
|
25930
|
-
_context2.n = 9;
|
|
25931
|
-
return effects.call(waitForReadMarkerRetry, READ_MARKER_RETRY_DELAYS_MS[attempt]);
|
|
25932
|
-
case 9:
|
|
25933
|
-
attempt++;
|
|
25934
|
-
_context2.n = 1;
|
|
25816
|
+
function confirmDisplayedRead(channel, pendingRead) {
|
|
25817
|
+
var messageIds, attempt, connectionStatus, messageListMarker, _t;
|
|
25818
|
+
return _regenerator().w(function (_context2) {
|
|
25819
|
+
while (1) switch (_context2.p = _context2.n) {
|
|
25820
|
+
case 0:
|
|
25821
|
+
messageIds = getUniqueMessageIds(pendingRead.messageIds);
|
|
25822
|
+
attempt = 0;
|
|
25823
|
+
case 1:
|
|
25824
|
+
if (!(attempt <= READ_MARKER_RETRY_DELAYS_MS.length)) {
|
|
25825
|
+
_context2.n = 10;
|
|
25935
25826
|
break;
|
|
25936
|
-
|
|
25937
|
-
|
|
25938
|
-
|
|
25939
|
-
|
|
25940
|
-
|
|
25941
|
-
|
|
25942
|
-
|
|
25827
|
+
}
|
|
25828
|
+
connectionStatus = store.getState().UserReducer.connectionStatus;
|
|
25829
|
+
if (!(connectionStatus !== CONNECTION_STATUS.CONNECTED)) {
|
|
25830
|
+
_context2.n = 2;
|
|
25831
|
+
break;
|
|
25832
|
+
}
|
|
25833
|
+
return _context2.a(2, {
|
|
25834
|
+
status: 'queued'
|
|
25835
|
+
});
|
|
25836
|
+
case 2:
|
|
25837
|
+
_context2.p = 2;
|
|
25838
|
+
if (!pendingRead.readAll) {
|
|
25839
|
+
_context2.n = 4;
|
|
25840
|
+
break;
|
|
25841
|
+
}
|
|
25842
|
+
_context2.n = 3;
|
|
25843
|
+
return effects.call(channel.markAsRead);
|
|
25844
|
+
case 3:
|
|
25845
|
+
return _context2.a(2, {
|
|
25846
|
+
status: 'success'
|
|
25847
|
+
});
|
|
25848
|
+
case 4:
|
|
25849
|
+
_context2.n = 5;
|
|
25850
|
+
return effects.call(channel.markMessagesAsDisplayed, messageIds);
|
|
25851
|
+
case 5:
|
|
25852
|
+
messageListMarker = _context2.v;
|
|
25853
|
+
return _context2.a(2, {
|
|
25854
|
+
status: 'success',
|
|
25855
|
+
messageListMarker: messageListMarker
|
|
25856
|
+
});
|
|
25857
|
+
case 6:
|
|
25858
|
+
_context2.p = 6;
|
|
25859
|
+
_t = _context2.v;
|
|
25860
|
+
if (shouldKeepQueuedPendingRead(_t)) {
|
|
25861
|
+
_context2.n = 7;
|
|
25862
|
+
break;
|
|
25863
|
+
}
|
|
25864
|
+
return _context2.a(2, {
|
|
25865
|
+
status: 'drop',
|
|
25866
|
+
error: _t
|
|
25867
|
+
});
|
|
25868
|
+
case 7:
|
|
25869
|
+
if (!(attempt === READ_MARKER_RETRY_DELAYS_MS.length)) {
|
|
25870
|
+
_context2.n = 8;
|
|
25871
|
+
break;
|
|
25872
|
+
}
|
|
25873
|
+
return _context2.a(2, {
|
|
25874
|
+
status: 'queued',
|
|
25875
|
+
error: _t
|
|
25876
|
+
});
|
|
25877
|
+
case 8:
|
|
25878
|
+
_context2.n = 9;
|
|
25879
|
+
return effects.call(waitForReadMarkerRetry, READ_MARKER_RETRY_DELAYS_MS[attempt]);
|
|
25880
|
+
case 9:
|
|
25881
|
+
attempt++;
|
|
25882
|
+
_context2.n = 1;
|
|
25883
|
+
break;
|
|
25884
|
+
case 10:
|
|
25885
|
+
return _context2.a(2, {
|
|
25886
|
+
status: 'queued'
|
|
25887
|
+
});
|
|
25888
|
+
}
|
|
25889
|
+
}, _marked2$3, null, [[2, 6]]);
|
|
25943
25890
|
}
|
|
25944
25891
|
function createChannel(action) {
|
|
25945
25892
|
var payload, channelData, dontCreateIfNotExists, callback, SceytChatClient, createChannelData, fileToUpload, isSelfChannel, channelIsExistOnAllChannels, createdChannel, allChannels, memberId, whoDoesNotAdded, checkChannelExist, messageToSend, _allChannels, _memberId, _t2;
|
|
@@ -26137,7 +26084,7 @@ function createChannel(action) {
|
|
|
26137
26084
|
case 19:
|
|
26138
26085
|
return _context3.a(2);
|
|
26139
26086
|
}
|
|
26140
|
-
},
|
|
26087
|
+
}, _marked3$2, null, [[0, 18]]);
|
|
26141
26088
|
}
|
|
26142
26089
|
function getChannels(action) {
|
|
26143
26090
|
var _params$filter, _types, _activeChannel, _mappedChannels, _mappedChannels3, _mappedChannels4, payload, params, SceytChatClient, connectionStatus, channelQueryBuilder, channelTypesFilter, types, limit, channelQuery, channelsData, channelList, channelId, activeChannel, pendingLastMessages, _yield$call, mappedChannels, channelsForUpdateLastReactionMessage, _loop, _i, _Object$keys, _Object$keys2, _Object$keys3, _mappedChannels2, channelMessageMap, _iterator, _step, _lastMsg$userMarkers, ch, lastMsg, _activeChannel2, _activeChannel3, hiddenList, allChannelsQueryBuilder, allChannelsQuery, hasNext, totalAllChannelsAdded, i, _connectionStatus, allChannelsData, allChannelList, _t3, _t4, _t5;
|
|
@@ -26235,7 +26182,7 @@ function getChannels(action) {
|
|
|
26235
26182
|
_yield$call = _context5.v;
|
|
26236
26183
|
mappedChannels = _yield$call.channels;
|
|
26237
26184
|
channelsForUpdateLastReactionMessage = _yield$call.channelsForUpdateLastReactionMessage;
|
|
26238
|
-
_loop = /*#__PURE__*/_regenerator().m(function
|
|
26185
|
+
_loop = /*#__PURE__*/_regenerator().m(function _callee() {
|
|
26239
26186
|
var _store$getState$Chann;
|
|
26240
26187
|
var channelId, pendingLastMessage, currentReduxLastMessage, resolvedLastMessage, mappedChannel, mapEntry;
|
|
26241
26188
|
return _regenerator().w(function (_context4) {
|
|
@@ -26262,7 +26209,7 @@ function getChannels(action) {
|
|
|
26262
26209
|
case 1:
|
|
26263
26210
|
return _context4.a(2);
|
|
26264
26211
|
}
|
|
26265
|
-
},
|
|
26212
|
+
}, _callee);
|
|
26266
26213
|
});
|
|
26267
26214
|
_i = 0, _Object$keys = Object.keys(pendingLastMessages);
|
|
26268
26215
|
case 14:
|
|
@@ -26456,7 +26403,7 @@ function getChannels(action) {
|
|
|
26456
26403
|
case 38:
|
|
26457
26404
|
return _context5.a(2);
|
|
26458
26405
|
}
|
|
26459
|
-
},
|
|
26406
|
+
}, _marked4$2, null, [[27, 30], [1, 37]]);
|
|
26460
26407
|
}
|
|
26461
26408
|
function searchChannels(action) {
|
|
26462
26409
|
var payload, params, contactsMap, SceytChatClient, getFromContacts, searchBy, _params$filter2, _types2, channelQueryBuilder, channelTypesFilter, types, allChannels, publicChannels, chatsGroups, contactsList, contactsWithChannelsMap, lowerCaseSearchBy, handleChannels, channelsMap, _iterator2, _step2, channel, channelQuery, channelsData, _iterator3, _step3, _channel, channelsToAdd, _t6;
|
|
@@ -26589,7 +26536,7 @@ function searchChannels(action) {
|
|
|
26589
26536
|
case 8:
|
|
26590
26537
|
return _context6.a(2);
|
|
26591
26538
|
}
|
|
26592
|
-
},
|
|
26539
|
+
}, _marked5$2, null, [[0, 7]]);
|
|
26593
26540
|
}
|
|
26594
26541
|
function getChannelsForForward() {
|
|
26595
26542
|
var _SceytChatClient, channelQueryBuilder, channelTypesFilter, channelQuery, channelsData, channelsToAdd, _yield$call2, mappedChannels, _t7;
|
|
@@ -26647,7 +26594,7 @@ function getChannelsForForward() {
|
|
|
26647
26594
|
case 9:
|
|
26648
26595
|
return _context7.a(2);
|
|
26649
26596
|
}
|
|
26650
|
-
},
|
|
26597
|
+
}, _marked6$2, null, [[0, 8]]);
|
|
26651
26598
|
}
|
|
26652
26599
|
function searchChannelsForForward(action) {
|
|
26653
26600
|
var payload, params, _contactsMap, _SceytChatClient2, _getFromContacts, searchBy, _params$filter3, _types3, channelQueryBuilder, channelTypesFilter, types, allChannels, _publicChannels, _chatsGroups, contactsList, _contactsWithChannelsMap, _lowerCaseSearchBy, handleChannels, channelsMap, _iterator4, _step4, channel, channelQuery, channelsData, _iterator5, _step5, _channel2, channelsToAdd, _t8;
|
|
@@ -26779,7 +26726,7 @@ function searchChannelsForForward(action) {
|
|
|
26779
26726
|
case 8:
|
|
26780
26727
|
return _context8.a(2);
|
|
26781
26728
|
}
|
|
26782
|
-
},
|
|
26729
|
+
}, _marked7$2, null, [[0, 7]]);
|
|
26783
26730
|
}
|
|
26784
26731
|
function channelsLoadMore(action) {
|
|
26785
26732
|
var _mappedChannels5, _mappedChannels7, _mappedChannels8, payload, limit, channelQuery, channelsData, channelList, _yield$call3, mappedChannels, channelsForUpdateLastReactionMessage, _Object$keys4, _mappedChannels6, channelMessageMap, _t9;
|
|
@@ -26900,7 +26847,7 @@ function channelsLoadMore(action) {
|
|
|
26900
26847
|
case 13:
|
|
26901
26848
|
return _context9.a(2);
|
|
26902
26849
|
}
|
|
26903
|
-
},
|
|
26850
|
+
}, _marked8$2, null, [[1, 12]]);
|
|
26904
26851
|
}
|
|
26905
26852
|
function getChannelMentions(action) {
|
|
26906
26853
|
var payload, channelId, _SceytChatClient3, mentionsQueryBuilder, mentionsQuery, mentions, _t0;
|
|
@@ -26937,7 +26884,7 @@ function getChannelMentions(action) {
|
|
|
26937
26884
|
case 5:
|
|
26938
26885
|
return _context0.a(2);
|
|
26939
26886
|
}
|
|
26940
|
-
},
|
|
26887
|
+
}, _marked9$2, null, [[0, 4]]);
|
|
26941
26888
|
}
|
|
26942
26889
|
function channelsForForwardLoadMore(action) {
|
|
26943
26890
|
var payload, limit, _SceytChatClient4, channelQueryForward, channelsData, channelsToAdd, _yield$call4, mappedChannels, _t1;
|
|
@@ -26988,10 +26935,10 @@ function channelsForForwardLoadMore(action) {
|
|
|
26988
26935
|
case 8:
|
|
26989
26936
|
return _context1.a(2);
|
|
26990
26937
|
}
|
|
26991
|
-
},
|
|
26938
|
+
}, _marked0$2, null, [[0, 7]]);
|
|
26992
26939
|
}
|
|
26993
26940
|
function markMessagesRead(action) {
|
|
26994
|
-
var payload, channelId, messageIds, requestedMessageIds, _confirmation$message, channel, optimisticUpdate, pendingRead, confirmation, queuedPendingRead, _queuedPendingRead, readMessageIds, _iterator6, _step6, _confirmation$message2, _confirmation$message3, messageId, updateParams
|
|
26941
|
+
var payload, channelId, messageIds, requestedMessageIds, _confirmation$message, channel, optimisticUpdate, pendingRead, confirmation, queuedPendingRead, _queuedPendingRead, readMessageIds, _iterator6, _step6, _confirmation$message2, _confirmation$message3, messageId, updateParams;
|
|
26995
26942
|
return _regenerator().w(function (_context10) {
|
|
26996
26943
|
while (1) switch (_context10.p = _context10.n) {
|
|
26997
26944
|
case 0:
|
|
@@ -27002,21 +26949,9 @@ function markMessagesRead(action) {
|
|
|
27002
26949
|
_context10.n = 1;
|
|
27003
26950
|
break;
|
|
27004
26951
|
}
|
|
27005
|
-
log.warn('[READ_MESSAGE] Skipping read marker because message id list is empty', compactReadMessageLogData({
|
|
27006
|
-
source: 'initial',
|
|
27007
|
-
channelId: channelId,
|
|
27008
|
-
readAll: false,
|
|
27009
|
-
messageIds: messageIds
|
|
27010
|
-
}));
|
|
27011
26952
|
return _context10.a(2);
|
|
27012
26953
|
case 1:
|
|
27013
26954
|
_context10.p = 1;
|
|
27014
|
-
log.info('[READ_MESSAGE] Received markMessagesRead action', compactReadMessageLogData({
|
|
27015
|
-
source: 'initial',
|
|
27016
|
-
channelId: channelId,
|
|
27017
|
-
readAll: false,
|
|
27018
|
-
messageIds: requestedMessageIds
|
|
27019
|
-
}));
|
|
27020
26955
|
_context10.n = 2;
|
|
27021
26956
|
return effects.call(getStoredChannel$2, channelId);
|
|
27022
26957
|
case 2:
|
|
@@ -27025,10 +26960,6 @@ function markMessagesRead(action) {
|
|
|
27025
26960
|
_context10.n = 3;
|
|
27026
26961
|
break;
|
|
27027
26962
|
}
|
|
27028
|
-
log.warn('[READ_MESSAGE] Cannot mark messages as read because channel was not found', compactReadMessageLogData({
|
|
27029
|
-
channelId: channelId,
|
|
27030
|
-
messageIds: requestedMessageIds
|
|
27031
|
-
}));
|
|
27032
26963
|
return _context10.a(2);
|
|
27033
26964
|
case 3:
|
|
27034
26965
|
optimisticUpdate = deriveChannelReadProgressUpdate({
|
|
@@ -27043,7 +26974,7 @@ function markMessagesRead(action) {
|
|
|
27043
26974
|
messageIds: requestedMessageIds
|
|
27044
26975
|
});
|
|
27045
26976
|
_context10.n = 5;
|
|
27046
|
-
return effects.call(confirmDisplayedRead, channel, pendingRead
|
|
26977
|
+
return effects.call(confirmDisplayedRead, channel, pendingRead);
|
|
27047
26978
|
case 5:
|
|
27048
26979
|
confirmation = _context10.v;
|
|
27049
26980
|
if (!(confirmation.status === 'success')) {
|
|
@@ -27070,13 +27001,6 @@ function markMessagesRead(action) {
|
|
|
27070
27001
|
return _context10.a(2);
|
|
27071
27002
|
case 8:
|
|
27072
27003
|
readMessageIds = getUniqueMessageIds(((_confirmation$message = confirmation.messageListMarker) === null || _confirmation$message === void 0 ? void 0 : _confirmation$message.messageIds) || requestedMessageIds);
|
|
27073
|
-
log.info('[READ_MESSAGE] Confirmed read marker', compactReadMessageLogData({
|
|
27074
|
-
source: 'initial',
|
|
27075
|
-
channelId: channel.id,
|
|
27076
|
-
readAll: false,
|
|
27077
|
-
requestedMessageIds: requestedMessageIds,
|
|
27078
|
-
confirmedMessageIds: readMessageIds
|
|
27079
|
-
}));
|
|
27080
27004
|
_iterator6 = _createForOfIteratorHelperLoose(readMessageIds);
|
|
27081
27005
|
case 9:
|
|
27082
27006
|
if ((_step6 = _iterator6()).done) {
|
|
@@ -27108,12 +27032,10 @@ function markMessagesRead(action) {
|
|
|
27108
27032
|
break;
|
|
27109
27033
|
case 13:
|
|
27110
27034
|
_context10.p = 13;
|
|
27111
|
-
_t10 = _context10.v;
|
|
27112
|
-
log.error(_t10, '[READ_MESSAGE] Error on mark messages read');
|
|
27113
27035
|
case 14:
|
|
27114
27036
|
return _context10.a(2);
|
|
27115
27037
|
}
|
|
27116
|
-
},
|
|
27038
|
+
}, _marked1$1, null, [[1, 13]]);
|
|
27117
27039
|
}
|
|
27118
27040
|
function markVoiceMessageAsPlayed(action) {
|
|
27119
27041
|
var payload, channelId, messageIds, connectionStatus, channel, messageListMarker, _iterator7, _step7, messageId, updateParams, _t11;
|
|
@@ -27184,7 +27106,7 @@ function markVoiceMessageAsPlayed(action) {
|
|
|
27184
27106
|
case 9:
|
|
27185
27107
|
return _context11.a(2);
|
|
27186
27108
|
}
|
|
27187
|
-
},
|
|
27109
|
+
}, _marked10$1, null, [[1, 8]]);
|
|
27188
27110
|
}
|
|
27189
27111
|
function updateMessageAsOpened(action) {
|
|
27190
27112
|
var payload, channelId, messageListMarker, connectionStatus, channel, _iterator8, _step8, messageId, updateParams;
|
|
@@ -27243,7 +27165,7 @@ function updateMessageAsOpened(action) {
|
|
|
27243
27165
|
case 6:
|
|
27244
27166
|
return _context12.a(2);
|
|
27245
27167
|
}
|
|
27246
|
-
},
|
|
27168
|
+
}, _marked11$1);
|
|
27247
27169
|
}
|
|
27248
27170
|
function markMessageAsOpened(action) {
|
|
27249
27171
|
var payload, channelId, messageIds, shouldUpdateMessage, connectionStatus, channel, messageListMarker, _t12;
|
|
@@ -27294,7 +27216,7 @@ function markMessageAsOpened(action) {
|
|
|
27294
27216
|
case 6:
|
|
27295
27217
|
return _context13.a(2);
|
|
27296
27218
|
}
|
|
27297
|
-
},
|
|
27219
|
+
}, _marked12$1, null, [[1, 5]]);
|
|
27298
27220
|
}
|
|
27299
27221
|
function markMessagesDelivered(action) {
|
|
27300
27222
|
var payload, channelId, messageIds, connectionStatus, channel, messageListMarker, _iterator9, _step9, messageId, updateParams, _t13;
|
|
@@ -27365,7 +27287,7 @@ function markMessagesDelivered(action) {
|
|
|
27365
27287
|
case 9:
|
|
27366
27288
|
return _context14.a(2);
|
|
27367
27289
|
}
|
|
27368
|
-
},
|
|
27290
|
+
}, _marked13$1, null, [[1, 8]]);
|
|
27369
27291
|
}
|
|
27370
27292
|
function switchChannel(action) {
|
|
27371
27293
|
var payload, channel, updateActiveChannel, channelToSwitch, existingChannel, addChannel, _SceytChatClient5, fetchedChannel, channelFromMap, currentActiveChannel, _t14;
|
|
@@ -27461,7 +27383,7 @@ function switchChannel(action) {
|
|
|
27461
27383
|
case 17:
|
|
27462
27384
|
return _context15.a(2);
|
|
27463
27385
|
}
|
|
27464
|
-
},
|
|
27386
|
+
}, _marked14$1, null, [[0, 16]]);
|
|
27465
27387
|
}
|
|
27466
27388
|
function notificationsTurnOff(action) {
|
|
27467
27389
|
var expireTime, activeChannelId, channel, updatedChannel, _t15;
|
|
@@ -27501,7 +27423,7 @@ function notificationsTurnOff(action) {
|
|
|
27501
27423
|
case 7:
|
|
27502
27424
|
return _context16.a(2);
|
|
27503
27425
|
}
|
|
27504
|
-
},
|
|
27426
|
+
}, _marked15$1, null, [[3, 6]]);
|
|
27505
27427
|
}
|
|
27506
27428
|
function notificationsTurnOn() {
|
|
27507
27429
|
var activeChannelId, channel, updatedChannel, _t16;
|
|
@@ -27540,21 +27462,15 @@ function notificationsTurnOn() {
|
|
|
27540
27462
|
case 7:
|
|
27541
27463
|
return _context17.a(2);
|
|
27542
27464
|
}
|
|
27543
|
-
},
|
|
27465
|
+
}, _marked16$1, null, [[3, 6]]);
|
|
27544
27466
|
}
|
|
27545
27467
|
function markChannelAsRead(action) {
|
|
27546
|
-
var channelId, channel, optimisticUpdate, pendingRead, confirmation, queuedPendingRead, _queuedPendingRead2
|
|
27468
|
+
var channelId, channel, optimisticUpdate, pendingRead, confirmation, queuedPendingRead, _queuedPendingRead2;
|
|
27547
27469
|
return _regenerator().w(function (_context18) {
|
|
27548
27470
|
while (1) switch (_context18.p = _context18.n) {
|
|
27549
27471
|
case 0:
|
|
27550
27472
|
_context18.p = 0;
|
|
27551
27473
|
channelId = action.payload.channelId;
|
|
27552
|
-
log.info('[READ_MESSAGE] Received markChannelAsRead action', compactReadMessageLogData({
|
|
27553
|
-
source: 'initial',
|
|
27554
|
-
channelId: channelId,
|
|
27555
|
-
readAll: true,
|
|
27556
|
-
messageIds: []
|
|
27557
|
-
}));
|
|
27558
27474
|
_context18.n = 1;
|
|
27559
27475
|
return effects.call(getStoredChannel$2, channelId);
|
|
27560
27476
|
case 1:
|
|
@@ -27563,9 +27479,6 @@ function markChannelAsRead(action) {
|
|
|
27563
27479
|
_context18.n = 2;
|
|
27564
27480
|
break;
|
|
27565
27481
|
}
|
|
27566
|
-
log.warn('[READ_MESSAGE] Cannot mark channel as read because channel was not found', compactReadMessageLogData({
|
|
27567
|
-
channelId: channelId
|
|
27568
|
-
}));
|
|
27569
27482
|
return _context18.a(2);
|
|
27570
27483
|
case 2:
|
|
27571
27484
|
optimisticUpdate = deriveChannelReadProgressUpdate({
|
|
@@ -27580,7 +27493,7 @@ function markChannelAsRead(action) {
|
|
|
27580
27493
|
readAll: true
|
|
27581
27494
|
});
|
|
27582
27495
|
_context18.n = 4;
|
|
27583
|
-
return effects.call(confirmDisplayedRead, channel, pendingRead
|
|
27496
|
+
return effects.call(confirmDisplayedRead, channel, pendingRead);
|
|
27584
27497
|
case 4:
|
|
27585
27498
|
confirmation = _context18.v;
|
|
27586
27499
|
if (!(confirmation.status === 'success')) {
|
|
@@ -27591,13 +27504,6 @@ function markChannelAsRead(action) {
|
|
|
27591
27504
|
if ((queuedPendingRead === null || queuedPendingRead === void 0 ? void 0 : queuedPendingRead.queuedAt) === (pendingRead === null || pendingRead === void 0 ? void 0 : pendingRead.queuedAt)) {
|
|
27592
27505
|
removePendingChannelRead(channel.id);
|
|
27593
27506
|
}
|
|
27594
|
-
log.info('[READ_MESSAGE] Confirmed read marker', compactReadMessageLogData({
|
|
27595
|
-
source: 'initial',
|
|
27596
|
-
channelId: channel.id,
|
|
27597
|
-
readAll: true,
|
|
27598
|
-
requestedMessageIds: [],
|
|
27599
|
-
confirmedMessageIds: []
|
|
27600
|
-
}));
|
|
27601
27507
|
return _context18.a(2);
|
|
27602
27508
|
case 5:
|
|
27603
27509
|
if (confirmation.status === 'drop') {
|
|
@@ -27610,15 +27516,13 @@ function markChannelAsRead(action) {
|
|
|
27610
27516
|
break;
|
|
27611
27517
|
case 6:
|
|
27612
27518
|
_context18.p = 6;
|
|
27613
|
-
_t17 = _context18.v;
|
|
27614
|
-
log.error(_t17, '[READ_MESSAGE] Error on mark channel as read');
|
|
27615
27519
|
case 7:
|
|
27616
27520
|
return _context18.a(2);
|
|
27617
27521
|
}
|
|
27618
|
-
},
|
|
27522
|
+
}, _marked17$1, null, [[0, 6]]);
|
|
27619
27523
|
}
|
|
27620
27524
|
function resendPendingChannelReads(action) {
|
|
27621
|
-
var connectionState, pendingReads, _iterator0, _step0, pendingRead, currentPendingRead, channel, confirmation, latestPendingRead, _confirmation$message4, readMessageIds, _iterator1, _step1, _confirmation$message5, _confirmation$message6, messageId, updateParams
|
|
27525
|
+
var connectionState, pendingReads, _iterator0, _step0, pendingRead, currentPendingRead, channel, confirmation, latestPendingRead, _confirmation$message4, readMessageIds, _iterator1, _step1, _confirmation$message5, _confirmation$message6, messageId, updateParams;
|
|
27622
27526
|
return _regenerator().w(function (_context19) {
|
|
27623
27527
|
while (1) switch (_context19.p = _context19.n) {
|
|
27624
27528
|
case 0:
|
|
@@ -27636,7 +27540,7 @@ function resendPendingChannelReads(action) {
|
|
|
27636
27540
|
_iterator0 = _createForOfIteratorHelperLoose(pendingReads);
|
|
27637
27541
|
case 2:
|
|
27638
27542
|
if ((_step0 = _iterator0()).done) {
|
|
27639
|
-
_context19.n =
|
|
27543
|
+
_context19.n = 14;
|
|
27640
27544
|
break;
|
|
27641
27545
|
}
|
|
27642
27546
|
pendingRead = _step0.value;
|
|
@@ -27651,20 +27555,14 @@ function resendPendingChannelReads(action) {
|
|
|
27651
27555
|
_context19.n = 4;
|
|
27652
27556
|
break;
|
|
27653
27557
|
}
|
|
27654
|
-
return _context19.a(3,
|
|
27558
|
+
return _context19.a(3, 13);
|
|
27655
27559
|
case 4:
|
|
27656
27560
|
if (!(!pendingRead.readAll && !pendingRead.messageIds.length)) {
|
|
27657
27561
|
_context19.n = 5;
|
|
27658
27562
|
break;
|
|
27659
27563
|
}
|
|
27660
|
-
log.warn('[READ_MESSAGE] Dropping queued replay because it has no message ids', compactReadMessageLogData({
|
|
27661
|
-
source: 'replay',
|
|
27662
|
-
channelId: pendingRead.channelId,
|
|
27663
|
-
readAll: pendingRead.readAll,
|
|
27664
|
-
messageIds: pendingRead.messageIds
|
|
27665
|
-
}));
|
|
27666
27564
|
removePendingChannelRead(pendingRead.channelId);
|
|
27667
|
-
return _context19.a(3,
|
|
27565
|
+
return _context19.a(3, 13);
|
|
27668
27566
|
case 5:
|
|
27669
27567
|
_context19.n = 6;
|
|
27670
27568
|
return effects.call(getStoredChannel$2, pendingRead.channelId);
|
|
@@ -27674,18 +27572,11 @@ function resendPendingChannelReads(action) {
|
|
|
27674
27572
|
_context19.n = 7;
|
|
27675
27573
|
break;
|
|
27676
27574
|
}
|
|
27677
|
-
log.warn('[READ_MESSAGE] Dropping queued replay because channel was not found', compactReadMessageLogData({
|
|
27678
|
-
source: 'replay',
|
|
27679
|
-
channelId: pendingRead.channelId,
|
|
27680
|
-
readAll: pendingRead.readAll,
|
|
27681
|
-
messageIds: pendingRead.messageIds
|
|
27682
|
-
}));
|
|
27683
27575
|
removePendingChannelRead(pendingRead.channelId);
|
|
27684
|
-
return _context19.a(3,
|
|
27576
|
+
return _context19.a(3, 13);
|
|
27685
27577
|
case 7:
|
|
27686
|
-
log.info('[READ_MESSAGE] Replaying queued read marker', compactReadMessageLogData(getReadMarkerLogContext(pendingRead, 'replay', pendingRead.messageIds)));
|
|
27687
27578
|
_context19.n = 8;
|
|
27688
|
-
return effects.call(confirmDisplayedRead, channel, pendingRead
|
|
27579
|
+
return effects.call(confirmDisplayedRead, channel, pendingRead);
|
|
27689
27580
|
case 8:
|
|
27690
27581
|
confirmation = _context19.v;
|
|
27691
27582
|
latestPendingRead = getPendingChannelRead(pendingRead.channelId);
|
|
@@ -27693,23 +27584,16 @@ function resendPendingChannelReads(action) {
|
|
|
27693
27584
|
_context19.n = 9;
|
|
27694
27585
|
break;
|
|
27695
27586
|
}
|
|
27696
|
-
return _context19.a(3,
|
|
27587
|
+
return _context19.a(3, 13);
|
|
27697
27588
|
case 9:
|
|
27698
27589
|
if (confirmation.status === 'success' || confirmation.status === 'drop') {
|
|
27699
27590
|
removePendingChannelRead(pendingRead.channelId);
|
|
27700
27591
|
}
|
|
27701
27592
|
if (!(confirmation.status === 'success' && !pendingRead.readAll)) {
|
|
27702
|
-
_context19.n =
|
|
27593
|
+
_context19.n = 13;
|
|
27703
27594
|
break;
|
|
27704
27595
|
}
|
|
27705
27596
|
readMessageIds = getUniqueMessageIds(((_confirmation$message4 = confirmation.messageListMarker) === null || _confirmation$message4 === void 0 ? void 0 : _confirmation$message4.messageIds) || pendingRead.messageIds);
|
|
27706
|
-
log.info('[READ_MESSAGE] Confirmed read marker', compactReadMessageLogData({
|
|
27707
|
-
source: 'replay',
|
|
27708
|
-
channelId: channel.id,
|
|
27709
|
-
readAll: false,
|
|
27710
|
-
requestedMessageIds: pendingRead.messageIds,
|
|
27711
|
-
confirmedMessageIds: readMessageIds
|
|
27712
|
-
}));
|
|
27713
27597
|
_iterator1 = _createForOfIteratorHelperLoose(readMessageIds);
|
|
27714
27598
|
case 10:
|
|
27715
27599
|
if ((_step1 = _iterator1()).done) {
|
|
@@ -27737,32 +27621,17 @@ function resendPendingChannelReads(action) {
|
|
|
27737
27621
|
_context19.n = 10;
|
|
27738
27622
|
break;
|
|
27739
27623
|
case 13:
|
|
27740
|
-
_context19.n =
|
|
27624
|
+
_context19.n = 2;
|
|
27741
27625
|
break;
|
|
27742
27626
|
case 14:
|
|
27743
|
-
|
|
27744
|
-
log.info('[READ_MESSAGE] Confirmed read marker', compactReadMessageLogData({
|
|
27745
|
-
source: 'replay',
|
|
27746
|
-
channelId: channel.id,
|
|
27747
|
-
readAll: true,
|
|
27748
|
-
requestedMessageIds: [],
|
|
27749
|
-
confirmedMessageIds: []
|
|
27750
|
-
}));
|
|
27751
|
-
}
|
|
27752
|
-
case 15:
|
|
27753
|
-
_context19.n = 2;
|
|
27627
|
+
_context19.n = 16;
|
|
27754
27628
|
break;
|
|
27629
|
+
case 15:
|
|
27630
|
+
_context19.p = 15;
|
|
27755
27631
|
case 16:
|
|
27756
|
-
_context19.n = 18;
|
|
27757
|
-
break;
|
|
27758
|
-
case 17:
|
|
27759
|
-
_context19.p = 17;
|
|
27760
|
-
_t18 = _context19.v;
|
|
27761
|
-
log.error(_t18, '[READ_MESSAGE] Error on resend pending channel reads');
|
|
27762
|
-
case 18:
|
|
27763
27632
|
return _context19.a(2);
|
|
27764
27633
|
}
|
|
27765
|
-
},
|
|
27634
|
+
}, _marked18$1, null, [[0, 15]]);
|
|
27766
27635
|
}
|
|
27767
27636
|
function markChannelAsUnRead(action) {
|
|
27768
27637
|
var channelId, channel, _t19;
|
|
@@ -27798,7 +27667,7 @@ function markChannelAsUnRead(action) {
|
|
|
27798
27667
|
case 5:
|
|
27799
27668
|
return _context20.a(2);
|
|
27800
27669
|
}
|
|
27801
|
-
},
|
|
27670
|
+
}, _marked19$1, null, [[0, 4]]);
|
|
27802
27671
|
}
|
|
27803
27672
|
function pinChannel(action) {
|
|
27804
27673
|
var channelId, channel, updatedChannel, _t20;
|
|
@@ -27835,7 +27704,7 @@ function pinChannel(action) {
|
|
|
27835
27704
|
case 5:
|
|
27836
27705
|
return _context21.a(2);
|
|
27837
27706
|
}
|
|
27838
|
-
},
|
|
27707
|
+
}, _marked20$1, null, [[0, 4]]);
|
|
27839
27708
|
}
|
|
27840
27709
|
function unpinChannel(action) {
|
|
27841
27710
|
var channelId, channel, updatedChannel, _t21;
|
|
@@ -27872,7 +27741,7 @@ function unpinChannel(action) {
|
|
|
27872
27741
|
case 5:
|
|
27873
27742
|
return _context22.a(2);
|
|
27874
27743
|
}
|
|
27875
|
-
},
|
|
27744
|
+
}, _marked21$1, null, [[0, 4]]);
|
|
27876
27745
|
}
|
|
27877
27746
|
function removeChannelCaches(action) {
|
|
27878
27747
|
var payload, channelId, activeChannelId, activeChannel;
|
|
@@ -27907,7 +27776,7 @@ function removeChannelCaches(action) {
|
|
|
27907
27776
|
case 4:
|
|
27908
27777
|
return _context23.a(2);
|
|
27909
27778
|
}
|
|
27910
|
-
},
|
|
27779
|
+
}, _marked22$1);
|
|
27911
27780
|
}
|
|
27912
27781
|
function leaveChannel(action) {
|
|
27913
27782
|
var payload, channelId, channel, messageBuilder, messageToSend, _t22;
|
|
@@ -27966,7 +27835,7 @@ function leaveChannel(action) {
|
|
|
27966
27835
|
case 8:
|
|
27967
27836
|
return _context24.a(2);
|
|
27968
27837
|
}
|
|
27969
|
-
},
|
|
27838
|
+
}, _marked23$1, null, [[0, 7]]);
|
|
27970
27839
|
}
|
|
27971
27840
|
function deletePendingDeleteChannels() {
|
|
27972
27841
|
var pendingDeleteChannels, _iterator10, _step10, channel, resendableError, _t23;
|
|
@@ -28010,7 +27879,7 @@ function deletePendingDeleteChannels() {
|
|
|
28010
27879
|
case 9:
|
|
28011
27880
|
return _context25.a(2);
|
|
28012
27881
|
}
|
|
28013
|
-
},
|
|
27882
|
+
}, _marked24$1, null, [[2, 7]]);
|
|
28014
27883
|
}
|
|
28015
27884
|
function deleteChannel(action) {
|
|
28016
27885
|
var payload, channelId, channel, activeChannelId, lastChannel, _t24;
|
|
@@ -28104,7 +27973,7 @@ function deleteChannel(action) {
|
|
|
28104
27973
|
case 19:
|
|
28105
27974
|
return _context26.a(2);
|
|
28106
27975
|
}
|
|
28107
|
-
},
|
|
27976
|
+
}, _marked25$1, null, [[0, 18]]);
|
|
28108
27977
|
}
|
|
28109
27978
|
function blockChannel(action) {
|
|
28110
27979
|
var payload, channelId, channel, _t25;
|
|
@@ -28143,7 +28012,7 @@ function blockChannel(action) {
|
|
|
28143
28012
|
case 6:
|
|
28144
28013
|
return _context27.a(2);
|
|
28145
28014
|
}
|
|
28146
|
-
},
|
|
28015
|
+
}, _marked26$1, null, [[0, 5]]);
|
|
28147
28016
|
}
|
|
28148
28017
|
function updateChannel(action) {
|
|
28149
28018
|
var payload, channelId, config, _SceytChatClient6, channel, paramsToUpdate, fileToUpload, _yield$call5, subject, avatarUrl, metadata, onUpdateChannel, _channel3, _channel4, _channel5, fields, updatedChannel, _t26;
|
|
@@ -28240,7 +28109,7 @@ function updateChannel(action) {
|
|
|
28240
28109
|
case 9:
|
|
28241
28110
|
return _context28.a(2);
|
|
28242
28111
|
}
|
|
28243
|
-
},
|
|
28112
|
+
}, _marked27$1, null, [[0, 8]]);
|
|
28244
28113
|
}
|
|
28245
28114
|
function checkUsersStatus() {
|
|
28246
28115
|
var _SceytChatClient7, usersForUpdate, updatedUsers, usersToUpdateMap, update, updateData, _t27;
|
|
@@ -28291,7 +28160,7 @@ function checkUsersStatus() {
|
|
|
28291
28160
|
case 7:
|
|
28292
28161
|
return _context29.a(2);
|
|
28293
28162
|
}
|
|
28294
|
-
},
|
|
28163
|
+
}, _marked28$1, null, [[0, 6]]);
|
|
28295
28164
|
}
|
|
28296
28165
|
function sendTyping(action) {
|
|
28297
28166
|
var state, activeChannelId, channel, _t28;
|
|
@@ -28334,7 +28203,7 @@ function sendTyping(action) {
|
|
|
28334
28203
|
case 8:
|
|
28335
28204
|
return _context30.a(2);
|
|
28336
28205
|
}
|
|
28337
|
-
},
|
|
28206
|
+
}, _marked29$1, null, [[3, 7]]);
|
|
28338
28207
|
}
|
|
28339
28208
|
function sendRecording(action) {
|
|
28340
28209
|
var _action$payload, state, channelId, channel, _t29;
|
|
@@ -28377,7 +28246,7 @@ function sendRecording(action) {
|
|
|
28377
28246
|
case 7:
|
|
28378
28247
|
return _context31.a(2);
|
|
28379
28248
|
}
|
|
28380
|
-
},
|
|
28249
|
+
}, _marked30$1, null, [[2, 6]]);
|
|
28381
28250
|
}
|
|
28382
28251
|
function clearHistory(action) {
|
|
28383
28252
|
var payload, channelId, channel, activeChannelId, groupName, _t30;
|
|
@@ -28447,7 +28316,7 @@ function clearHistory(action) {
|
|
|
28447
28316
|
case 10:
|
|
28448
28317
|
return _context32.a(2);
|
|
28449
28318
|
}
|
|
28450
|
-
},
|
|
28319
|
+
}, _marked31$1, null, [[0, 9]]);
|
|
28451
28320
|
}
|
|
28452
28321
|
function deleteAllMessages(action) {
|
|
28453
28322
|
var payload, channelId, channel, activeChannelId, groupName, _t31;
|
|
@@ -28520,7 +28389,7 @@ function deleteAllMessages(action) {
|
|
|
28520
28389
|
case 11:
|
|
28521
28390
|
return _context33.a(2);
|
|
28522
28391
|
}
|
|
28523
|
-
},
|
|
28392
|
+
}, _marked32$1, null, [[0, 10]]);
|
|
28524
28393
|
}
|
|
28525
28394
|
function joinChannel(action) {
|
|
28526
28395
|
var payload, channelId, _SceytChatClient8, channel, joinedChannel, _t32;
|
|
@@ -28573,7 +28442,7 @@ function joinChannel(action) {
|
|
|
28573
28442
|
case 10:
|
|
28574
28443
|
return _context34.a(2);
|
|
28575
28444
|
}
|
|
28576
|
-
},
|
|
28445
|
+
}, _marked33$1, null, [[0, 9]]);
|
|
28577
28446
|
}
|
|
28578
28447
|
function watchForChannelEvents() {
|
|
28579
28448
|
return _regenerator().w(function (_context35) {
|
|
@@ -28584,7 +28453,7 @@ function watchForChannelEvents() {
|
|
|
28584
28453
|
case 1:
|
|
28585
28454
|
return _context35.a(2);
|
|
28586
28455
|
}
|
|
28587
|
-
},
|
|
28456
|
+
}, _marked34$1);
|
|
28588
28457
|
}
|
|
28589
28458
|
function createChannelInviteKey(action) {
|
|
28590
28459
|
var payload, channelId, _SceytChatClient9, channel, inviteKey, _t33;
|
|
@@ -28626,7 +28495,7 @@ function createChannelInviteKey(action) {
|
|
|
28626
28495
|
case 5:
|
|
28627
28496
|
return _context36.a(2);
|
|
28628
28497
|
}
|
|
28629
|
-
},
|
|
28498
|
+
}, _marked35$1, null, [[0, 4]]);
|
|
28630
28499
|
}
|
|
28631
28500
|
function getChannelInviteKeys(action) {
|
|
28632
28501
|
var payload, channelId, channel, inviteKeys, _t34;
|
|
@@ -28663,7 +28532,7 @@ function getChannelInviteKeys(action) {
|
|
|
28663
28532
|
case 5:
|
|
28664
28533
|
return _context37.a(2);
|
|
28665
28534
|
}
|
|
28666
|
-
},
|
|
28535
|
+
}, _marked36$1, null, [[0, 4]]);
|
|
28667
28536
|
}
|
|
28668
28537
|
function regenerateChannelInviteKey(action) {
|
|
28669
28538
|
var payload, channelId, key, deletePermanently, channel, inviteKey, _t35;
|
|
@@ -28704,7 +28573,7 @@ function regenerateChannelInviteKey(action) {
|
|
|
28704
28573
|
case 5:
|
|
28705
28574
|
return _context38.a(2);
|
|
28706
28575
|
}
|
|
28707
|
-
},
|
|
28576
|
+
}, _marked37$1, null, [[0, 4]]);
|
|
28708
28577
|
}
|
|
28709
28578
|
function updateChannelInviteKey(action) {
|
|
28710
28579
|
var channelInviteKeys, channelId, payload, payloadChannelId, key, accessPriorHistory, expiresAt, maxUses, channel, copiedChannelInviteKeys, _t36;
|
|
@@ -28764,7 +28633,7 @@ function updateChannelInviteKey(action) {
|
|
|
28764
28633
|
case 6:
|
|
28765
28634
|
return _context39.a(2);
|
|
28766
28635
|
}
|
|
28767
|
-
},
|
|
28636
|
+
}, _marked38$1, null, [[1, 5]]);
|
|
28768
28637
|
}
|
|
28769
28638
|
function getChannelByInviteKey(action) {
|
|
28770
28639
|
var _channel$, _channel$2, payload, key, _SceytChatClient0, channel, _t37;
|
|
@@ -28815,7 +28684,7 @@ function getChannelByInviteKey(action) {
|
|
|
28815
28684
|
case 8:
|
|
28816
28685
|
return _context40.a(2);
|
|
28817
28686
|
}
|
|
28818
|
-
},
|
|
28687
|
+
}, _marked39$1, null, [[0, 6]]);
|
|
28819
28688
|
}
|
|
28820
28689
|
function joinChannelWithInviteKey(action) {
|
|
28821
28690
|
var payload, key, _SceytChatClient1, user, channel, messageToSend, _t38;
|
|
@@ -28859,7 +28728,7 @@ function joinChannelWithInviteKey(action) {
|
|
|
28859
28728
|
case 7:
|
|
28860
28729
|
return _context41.a(2);
|
|
28861
28730
|
}
|
|
28862
|
-
},
|
|
28731
|
+
}, _marked40$1, null, [[0, 6]]);
|
|
28863
28732
|
}
|
|
28864
28733
|
function setMessageRetentionPeriod(action) {
|
|
28865
28734
|
var payload, channelId, periodInMilliseconds, channel, messageToSend, _t39;
|
|
@@ -28912,7 +28781,7 @@ function setMessageRetentionPeriod(action) {
|
|
|
28912
28781
|
case 6:
|
|
28913
28782
|
return _context42.a(2);
|
|
28914
28783
|
}
|
|
28915
|
-
},
|
|
28784
|
+
}, _marked41$1, null, [[0, 5]]);
|
|
28916
28785
|
}
|
|
28917
28786
|
function getChannelsWithUser(action) {
|
|
28918
28787
|
var payload, userId, _SceytChatClient10, channelsQueryBuilder, channelsQuery, channelsData, channels, _t40;
|
|
@@ -28975,7 +28844,7 @@ function getChannelsWithUser(action) {
|
|
|
28975
28844
|
case 12:
|
|
28976
28845
|
return _context43.a(2);
|
|
28977
28846
|
}
|
|
28978
|
-
},
|
|
28847
|
+
}, _marked42$1, null, [[2, 9, 10, 12]]);
|
|
28979
28848
|
}
|
|
28980
28849
|
function loadMoreMutualChannels(action) {
|
|
28981
28850
|
var payload, limit, mutualChannelsQuery, channelsData, _t41;
|
|
@@ -29033,7 +28902,7 @@ function loadMoreMutualChannels(action) {
|
|
|
29033
28902
|
case 11:
|
|
29034
28903
|
return _context44.a(2);
|
|
29035
28904
|
}
|
|
29036
|
-
},
|
|
28905
|
+
}, _marked43$1, null, [[1, 8, 9, 11]]);
|
|
29037
28906
|
}
|
|
29038
28907
|
function ChannelsSaga() {
|
|
29039
28908
|
return _regenerator().w(function (_context45) {
|
|
@@ -29167,7 +29036,7 @@ function ChannelsSaga() {
|
|
|
29167
29036
|
case 42:
|
|
29168
29037
|
return _context45.a(2);
|
|
29169
29038
|
}
|
|
29170
|
-
},
|
|
29039
|
+
}, _marked44$1);
|
|
29171
29040
|
}
|
|
29172
29041
|
|
|
29173
29042
|
var _marked$4 = /*#__PURE__*/_regenerator().m(getMembers),
|
|
@@ -39918,6 +39787,10 @@ var Attachment = function Attachment(_ref) {
|
|
|
39918
39787
|
var _useState3 = React.useState(attachmentUrlFromMap),
|
|
39919
39788
|
attachmentUrl = _useState3[0],
|
|
39920
39789
|
setAttachmentUrl = _useState3[1];
|
|
39790
|
+
var attachmentIdentity = attachment.id || attachment.tid || 'unknown-attachment';
|
|
39791
|
+
var attachmentKey = (channelId || 'unknown-channel') + ":" + attachmentIdentity + ":" + (attachment.url || '');
|
|
39792
|
+
var currentAttachmentKeyRef = React.useRef(attachmentKey);
|
|
39793
|
+
currentAttachmentKeyRef.current = attachmentKey;
|
|
39921
39794
|
var _useState4 = React.useState(false),
|
|
39922
39795
|
imageLoaded = _useState4[0],
|
|
39923
39796
|
setImageLoaded = _useState4[1];
|
|
@@ -39977,6 +39850,18 @@ var Attachment = function Attachment(_ref) {
|
|
|
39977
39850
|
log.error('error on get attachmentThumb', e);
|
|
39978
39851
|
}
|
|
39979
39852
|
}
|
|
39853
|
+
React.useEffect(function () {
|
|
39854
|
+
if (attachment.type !== attachmentTypes.image) return;
|
|
39855
|
+
log.info('[MEDIA_ISSUE] image thumbnail source', JSON.stringify({
|
|
39856
|
+
channelId: channelId || null,
|
|
39857
|
+
attachmentId: attachment.id || attachment.tid || null,
|
|
39858
|
+
attachmentUrl: attachment.url || null,
|
|
39859
|
+
mapUrl: attachmentUrlFromMap || null,
|
|
39860
|
+
propUrl: attachment.attachmentUrl || null,
|
|
39861
|
+
localUrl: attachmentUrl || null,
|
|
39862
|
+
renderedSource: attachmentUrlFromMap || attachment.attachmentUrl || attachmentUrl || attachmentThumb || null
|
|
39863
|
+
}));
|
|
39864
|
+
}, [attachment.id, attachment.tid, attachment.type, attachment.url, attachment.attachmentUrl, attachmentUrlFromMap, attachmentUrl, channelId]);
|
|
39980
39865
|
React.useEffect(function () {
|
|
39981
39866
|
var currentSrc = attachment.attachmentUrl || attachmentUrlFromMap || attachmentUrl || attachmentThumb;
|
|
39982
39867
|
var wasThumbnail = previousImageSrcRef.current === attachmentThumb;
|
|
@@ -40266,12 +40151,23 @@ var Attachment = function Attachment(_ref) {
|
|
|
40266
40151
|
}, [attachmentUrl]);
|
|
40267
40152
|
React.useEffect(function () {
|
|
40268
40153
|
if (!attachment.attachmentUrl && connectionStatus === CONNECTION_STATUS.CONNECTED && attachment.id && !attachmentUrlFromMap && !(attachment.type === attachmentTypes.file || attachment.type === attachmentTypes.link)) {
|
|
40154
|
+
var requestAttachmentKey = attachmentKey;
|
|
40155
|
+
log.info('[MEDIA_ISSUE] image thumbnail load started', JSON.stringify({
|
|
40156
|
+
channelId: channelId || null,
|
|
40157
|
+
attachmentId: attachment.id || attachment.tid || null,
|
|
40158
|
+
url: attachment.url
|
|
40159
|
+
}));
|
|
40269
40160
|
getAttachmentUrlFromCache(attachment.url).then(function (cachedUrl) {
|
|
40270
40161
|
try {
|
|
40271
40162
|
var _temp16 = function () {
|
|
40272
40163
|
if (attachment.type === attachmentTypes.image && !isPreview) {
|
|
40273
40164
|
var _temp15 = function () {
|
|
40274
40165
|
if (cachedUrl) {
|
|
40166
|
+
log.info('[MEDIA_ISSUE] image thumbnail cache resolved', JSON.stringify({
|
|
40167
|
+
requestAttachmentKey: requestAttachmentKey,
|
|
40168
|
+
currentAttachmentKey: currentAttachmentKeyRef.current,
|
|
40169
|
+
cachedUrl: cachedUrl
|
|
40170
|
+
}));
|
|
40275
40171
|
setAttachmentUrl(cachedUrl);
|
|
40276
40172
|
dispatch(setUpdateMessageAttachmentAC(attachment.url, cachedUrl));
|
|
40277
40173
|
setIsCached(true);
|
|
@@ -40292,6 +40188,12 @@ var Attachment = function Attachment(_ref) {
|
|
|
40292
40188
|
try {
|
|
40293
40189
|
return Promise.resolve(compressAndCacheImage(url, attachment.url, renderWidth, renderHeight)).then(function (compressedUrl) {
|
|
40294
40190
|
if (compressedUrl) {
|
|
40191
|
+
log.info('[MEDIA_ISSUE] image thumbnail download resolved', JSON.stringify({
|
|
40192
|
+
requestAttachmentKey: requestAttachmentKey,
|
|
40193
|
+
currentAttachmentKey: currentAttachmentKeyRef.current,
|
|
40194
|
+
sourceUrl: url,
|
|
40195
|
+
cachedUrl: compressedUrl
|
|
40196
|
+
}));
|
|
40295
40197
|
setAttachmentUrl(compressedUrl);
|
|
40296
40198
|
}
|
|
40297
40199
|
downloadImage(compressedUrl || url);
|
|
@@ -45358,48 +45260,10 @@ var Message$1 = function Message(_ref) {
|
|
|
45358
45260
|
return marker.name === MESSAGE_DELIVERY_STATUS.READ;
|
|
45359
45261
|
}));
|
|
45360
45262
|
var shouldSendReadMarker = isVisible && message.incoming && !alreadyRead && !disableAutoReadTracking && isTabActive && !!channel.newMessageCount && channel.newMessageCount > 0 && connectionStatus === CONNECTION_STATUS.CONNECTED;
|
|
45361
|
-
if (message.incoming && isVisible) {
|
|
45362
|
-
if (shouldSendReadMarker) {
|
|
45363
|
-
log.info('[READ_MESSAGE] Message auto-read gate passed', compactReadMessageLogData({
|
|
45364
|
-
source: 'message',
|
|
45365
|
-
channelId: channel.id,
|
|
45366
|
-
messageId: message.id,
|
|
45367
|
-
isVisible: isVisible,
|
|
45368
|
-
alreadyRead: alreadyRead,
|
|
45369
|
-
disableAutoReadTracking: disableAutoReadTracking,
|
|
45370
|
-
isTabActive: isTabActive,
|
|
45371
|
-
newMessageCount: channel.newMessageCount || 0,
|
|
45372
|
-
connectionStatus: connectionStatus,
|
|
45373
|
-
queued: !!queueReadMarker
|
|
45374
|
-
}));
|
|
45375
|
-
} else {
|
|
45376
|
-
log.info('[READ_MESSAGE] Message auto-read gate blocked', compactReadMessageLogData({
|
|
45377
|
-
source: 'message',
|
|
45378
|
-
channelId: channel.id,
|
|
45379
|
-
messageId: message.id,
|
|
45380
|
-
isVisible: isVisible,
|
|
45381
|
-
alreadyRead: alreadyRead,
|
|
45382
|
-
disableAutoReadTracking: disableAutoReadTracking,
|
|
45383
|
-
isTabActive: isTabActive,
|
|
45384
|
-
newMessageCount: channel.newMessageCount || 0,
|
|
45385
|
-
connectionStatus: connectionStatus
|
|
45386
|
-
}));
|
|
45387
|
-
}
|
|
45388
|
-
}
|
|
45389
45263
|
if (shouldSendReadMarker) {
|
|
45390
45264
|
if (queueReadMarker) {
|
|
45391
|
-
log.info('[READ_MESSAGE] Queueing read marker from Message component', compactReadMessageLogData({
|
|
45392
|
-
source: 'message',
|
|
45393
|
-
channelId: channel.id,
|
|
45394
|
-
messageId: message.id
|
|
45395
|
-
}));
|
|
45396
45265
|
queueReadMarker(channel.id, message.id);
|
|
45397
45266
|
} else {
|
|
45398
|
-
log.info('[READ_MESSAGE] Dispatching read marker directly from Message component', compactReadMessageLogData({
|
|
45399
|
-
source: 'message',
|
|
45400
|
-
channelId: channel.id,
|
|
45401
|
-
messageId: message.id
|
|
45402
|
-
}));
|
|
45403
45267
|
dispatch(markMessagesAsReadAC(channel.id, [message.id]));
|
|
45404
45268
|
}
|
|
45405
45269
|
}
|
|
@@ -45442,14 +45306,6 @@ var Message$1 = function Message(_ref) {
|
|
|
45442
45306
|
}, [dispatch, selectionIsActive]);
|
|
45443
45307
|
React.useEffect(function () {
|
|
45444
45308
|
if (isVisible) {
|
|
45445
|
-
if (message.incoming) {
|
|
45446
|
-
log.info('[READ_MESSAGE] Message row became visible', compactReadMessageLogData({
|
|
45447
|
-
source: 'message',
|
|
45448
|
-
channelId: channel.id,
|
|
45449
|
-
messageId: message.id,
|
|
45450
|
-
localRef: message.tid || message.id || ''
|
|
45451
|
-
}));
|
|
45452
|
-
}
|
|
45453
45309
|
if (setLastVisibleMessageId) {
|
|
45454
45310
|
setLastVisibleMessageId(message);
|
|
45455
45311
|
}
|
|
@@ -46460,14 +46316,6 @@ function useChatController(_ref5) {
|
|
|
46460
46316
|
}, [clearJumpScrollingLock]);
|
|
46461
46317
|
var queueVisibleUnreadCheck = React.useCallback(function () {
|
|
46462
46318
|
if (pendingVisibleUnreadFrameRef.current !== null || unreadScrollTo || !tabIsActive) {
|
|
46463
|
-
if (!tabIsActive) {
|
|
46464
|
-
log.info('[READ_MESSAGE] Visible unread scan skipped because tab is inactive', compactReadMessageLogData({
|
|
46465
|
-
source: 'controller',
|
|
46466
|
-
channelId: channel.id,
|
|
46467
|
-
unreadScrollTo: unreadScrollTo,
|
|
46468
|
-
pendingFrameScheduled: pendingVisibleUnreadFrameRef.current !== null
|
|
46469
|
-
}));
|
|
46470
|
-
}
|
|
46471
46319
|
return;
|
|
46472
46320
|
}
|
|
46473
46321
|
pendingVisibleUnreadFrameRef.current = requestAnimationFrame(function () {
|
|
@@ -46502,35 +46350,13 @@ function useChatController(_ref5) {
|
|
|
46502
46350
|
var ids = visibleUnreadMessages.filter(isUnreadIncomingMessage).map(function (message) {
|
|
46503
46351
|
return message.id;
|
|
46504
46352
|
});
|
|
46505
|
-
if (visibleUnreadMessages.length && !ids.length) {
|
|
46506
|
-
log.info('[READ_MESSAGE] Visible unread scan found messages, but none were unread incoming', compactReadMessageLogData({
|
|
46507
|
-
source: 'controller',
|
|
46508
|
-
channelId: channel.id,
|
|
46509
|
-
visibleCandidateIds: visibleUnreadMessages.map(function (message) {
|
|
46510
|
-
return message.id;
|
|
46511
|
-
})
|
|
46512
|
-
}));
|
|
46513
|
-
}
|
|
46514
46353
|
if (!ids.length || !channel.id || !channel.newMessageCount) {
|
|
46515
|
-
if (ids.length && (!channel.id || !channel.newMessageCount)) {
|
|
46516
|
-
log.info('[READ_MESSAGE] Visible unread scan blocked before dispatch', compactReadMessageLogData({
|
|
46517
|
-
source: 'controller',
|
|
46518
|
-
channelId: channel.id,
|
|
46519
|
-
messageIds: ids,
|
|
46520
|
-
newMessageCount: channel.newMessageCount || 0
|
|
46521
|
-
}));
|
|
46522
|
-
}
|
|
46523
46354
|
return;
|
|
46524
46355
|
}
|
|
46525
46356
|
ids.forEach(function (id) {
|
|
46526
46357
|
visibleUnreadReportedRef.current.add(id);
|
|
46527
46358
|
});
|
|
46528
46359
|
registerLocallyReadUnreadMessages(ids.length);
|
|
46529
|
-
log.info('[READ_MESSAGE] Dispatching read marker from visible unread scan', compactReadMessageLogData({
|
|
46530
|
-
source: 'controller',
|
|
46531
|
-
channelId: channel.id,
|
|
46532
|
-
messageIds: ids
|
|
46533
|
-
}));
|
|
46534
46360
|
dispatch(markMessagesAsReadAC(channel.id, ids));
|
|
46535
46361
|
});
|
|
46536
46362
|
}, [channel.id, channel.lastDisplayedMessageId, channel.newMessageCount, dispatch, hasNext, messages, registerLocallyReadUnreadMessages, unreadScrollTo, tabIsActive]);
|
|
@@ -54066,7 +53892,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
54066
53892
|
viewOnce: false
|
|
54067
53893
|
});
|
|
54068
53894
|
} else if (draftMessage) {
|
|
54069
|
-
if (restoredDraftChannelIdRef.current !== activeChannel.id) {
|
|
53895
|
+
if (restoredDraftChannelIdRef.current && restoredDraftChannelIdRef.current !== activeChannel.id) {
|
|
54070
53896
|
return;
|
|
54071
53897
|
}
|
|
54072
53898
|
removeDraftMessageFromMap(activeChannel.id);
|