sceyt-chat-react-uikit 1.7.8-beta.7 → 1.7.8-beta.9
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/AudioRecord/index.d.ts +2 -2
- package/index.js +51 -15
- package/index.modern.js +51 -15
- package/package.json +1 -1
|
@@ -11,5 +11,5 @@ interface AudioPlayerProps {
|
|
|
11
11
|
channelId: string;
|
|
12
12
|
maxRecordingDuration?: number;
|
|
13
13
|
}
|
|
14
|
-
declare const
|
|
15
|
-
export default
|
|
14
|
+
declare const _default: React.NamedExoticComponent<AudioPlayerProps>;
|
|
15
|
+
export default _default;
|
package/index.js
CHANGED
|
@@ -12824,12 +12824,13 @@ var getChannelInviteKeysAC = function getChannelInviteKeysAC(channelId) {
|
|
|
12824
12824
|
}
|
|
12825
12825
|
};
|
|
12826
12826
|
};
|
|
12827
|
-
var regenerateChannelInviteKeyAC = function regenerateChannelInviteKeyAC(channelId, key) {
|
|
12827
|
+
var regenerateChannelInviteKeyAC = function regenerateChannelInviteKeyAC(channelId, key, deletePermanently) {
|
|
12828
12828
|
return {
|
|
12829
12829
|
type: REGENERATE_CHANNEL_INVITE_KEY,
|
|
12830
12830
|
payload: {
|
|
12831
12831
|
channelId: channelId,
|
|
12832
|
-
key: key
|
|
12832
|
+
key: key,
|
|
12833
|
+
deletePermanently: deletePermanently
|
|
12833
12834
|
}
|
|
12834
12835
|
};
|
|
12835
12836
|
};
|
|
@@ -16370,7 +16371,7 @@ function getChannels(action) {
|
|
|
16370
16371
|
try {
|
|
16371
16372
|
return Promise.resolve(new Promise(function (resolve) {
|
|
16372
16373
|
channel.getMessagesById([channel.newReactions[0].messageId]).then(function (messages) {
|
|
16373
|
-
channelMessageMap[channel.id] = messages[0];
|
|
16374
|
+
channelMessageMap[channel === null || channel === void 0 ? void 0 : channel.id] = messages[0];
|
|
16374
16375
|
log.info('[getChannels] successfully fetched reaction message for channel:', channel === null || channel === void 0 ? void 0 : channel.id);
|
|
16375
16376
|
resolve(true);
|
|
16376
16377
|
})["catch"](function (e) {
|
|
@@ -16389,8 +16390,8 @@ function getChannels(action) {
|
|
|
16389
16390
|
case 13:
|
|
16390
16391
|
log.info('[getChannels] reaction messages fetched:', channelMessageMap ? (_Object$keys = Object.keys(channelMessageMap)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length : 0);
|
|
16391
16392
|
mappedChannels = mappedChannels.map(function (channel) {
|
|
16392
|
-
if (channelMessageMap[channel.id]) {
|
|
16393
|
-
channel.lastReactedMessage = channelMessageMap[channel.id];
|
|
16393
|
+
if (channelMessageMap[channel === null || channel === void 0 ? void 0 : channel.id]) {
|
|
16394
|
+
channel.lastReactedMessage = channelMessageMap[channel === null || channel === void 0 ? void 0 : channel.id];
|
|
16394
16395
|
}
|
|
16395
16396
|
return channel;
|
|
16396
16397
|
});
|
|
@@ -18171,13 +18172,13 @@ function getChannelInviteKeys(action) {
|
|
|
18171
18172
|
}, _marked30, null, [[0, 4]]);
|
|
18172
18173
|
}
|
|
18173
18174
|
function regenerateChannelInviteKey(action) {
|
|
18174
|
-
var payload, channelId, key, channel, inviteKey, _t31;
|
|
18175
|
+
var payload, channelId, key, deletePermanently, channel, inviteKey, _t31;
|
|
18175
18176
|
return _regenerator().w(function (_context31) {
|
|
18176
18177
|
while (1) switch (_context31.p = _context31.n) {
|
|
18177
18178
|
case 0:
|
|
18178
18179
|
_context31.p = 0;
|
|
18179
18180
|
payload = action.payload;
|
|
18180
|
-
channelId = payload.channelId, key = payload.key;
|
|
18181
|
+
channelId = payload.channelId, key = payload.key, deletePermanently = payload.deletePermanently;
|
|
18181
18182
|
_context31.n = 1;
|
|
18182
18183
|
return effects.call(getChannelFromMap, channelId);
|
|
18183
18184
|
case 1:
|
|
@@ -18192,7 +18193,8 @@ function regenerateChannelInviteKey(action) {
|
|
|
18192
18193
|
_context31.n = 2;
|
|
18193
18194
|
return effects.call(channel.regenerateInviteKey, {
|
|
18194
18195
|
key: key,
|
|
18195
|
-
channelId: channelId
|
|
18196
|
+
channelId: channelId,
|
|
18197
|
+
deletePermanently: deletePermanently
|
|
18196
18198
|
});
|
|
18197
18199
|
case 2:
|
|
18198
18200
|
inviteKey = _context31.v;
|
|
@@ -41312,6 +41314,13 @@ function SvgRecordButton(props) {
|
|
|
41312
41314
|
}
|
|
41313
41315
|
|
|
41314
41316
|
var _templateObject$O, _templateObject2$J, _templateObject3$C, _templateObject4$x, _templateObject5$s, _templateObject6$o, _templateObject7$n;
|
|
41317
|
+
var fieldsObject = {
|
|
41318
|
+
channelId: '',
|
|
41319
|
+
currentRecordedFile: null,
|
|
41320
|
+
recording: null,
|
|
41321
|
+
recorder: null,
|
|
41322
|
+
wavesurferContainer: null
|
|
41323
|
+
};
|
|
41315
41324
|
var shouldDraw = false;
|
|
41316
41325
|
var DEFAULT_MAX_RECORDING_DURATION = 600;
|
|
41317
41326
|
var AudioRecord = function AudioRecord(_ref) {
|
|
@@ -41645,7 +41654,7 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
41645
41654
|
handleStopRecording();
|
|
41646
41655
|
shouldDraw = false;
|
|
41647
41656
|
var id = cId || channelId;
|
|
41648
|
-
recorder.stop().getMp3().then(function (_ref4) {
|
|
41657
|
+
recorder === null || recorder === void 0 ? void 0 : recorder.stop().getMp3().then(function (_ref4) {
|
|
41649
41658
|
var buffer = _ref4[0],
|
|
41650
41659
|
blob = _ref4[1];
|
|
41651
41660
|
var file = new File(buffer, 'record.mp3', {
|
|
@@ -41765,6 +41774,30 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
41765
41774
|
}
|
|
41766
41775
|
};
|
|
41767
41776
|
}, [recording, maxRecordingDuration]);
|
|
41777
|
+
React.useEffect(function () {
|
|
41778
|
+
fieldsObject.channelId = channelId;
|
|
41779
|
+
}, [channelId]);
|
|
41780
|
+
React.useEffect(function () {
|
|
41781
|
+
fieldsObject.recorder = recorder;
|
|
41782
|
+
}, [recorder]);
|
|
41783
|
+
React.useEffect(function () {
|
|
41784
|
+
fieldsObject.currentRecordedFile = currentRecordedFile;
|
|
41785
|
+
}, [currentRecordedFile]);
|
|
41786
|
+
React.useEffect(function () {
|
|
41787
|
+
fieldsObject.recording = recording;
|
|
41788
|
+
}, [recording]);
|
|
41789
|
+
React.useEffect(function () {
|
|
41790
|
+
fieldsObject.wavesurferContainer = wavesurferContainer.current;
|
|
41791
|
+
}, [wavesurferContainer.current]);
|
|
41792
|
+
React.useEffect(function () {
|
|
41793
|
+
return function () {
|
|
41794
|
+
var _fieldsObject$current;
|
|
41795
|
+
if (fieldsObject.channelId && (!fieldsObject.currentRecordedFile || !((_fieldsObject$current = fieldsObject.currentRecordedFile) !== null && _fieldsObject$current !== void 0 && _fieldsObject$current.file)) && fieldsObject.recorder && fieldsObject.recording) {
|
|
41796
|
+
stopRecording(false, fieldsObject.channelId, true, fieldsObject.recorder, fieldsObject.wavesurferContainer);
|
|
41797
|
+
handleStopRecording();
|
|
41798
|
+
}
|
|
41799
|
+
};
|
|
41800
|
+
}, []);
|
|
41768
41801
|
React.useEffect(function () {
|
|
41769
41802
|
if (currentRecordedFile) {
|
|
41770
41803
|
_initWaveSurfer();
|
|
@@ -41889,6 +41922,9 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
41889
41922
|
iconColor: accentColor
|
|
41890
41923
|
}, showRecording || currentRecordedFile ? /*#__PURE__*/React__default.createElement(SvgSend, null) : /*#__PURE__*/React__default.createElement(SvgRecordButton, null)));
|
|
41891
41924
|
};
|
|
41925
|
+
var AudioRecord$1 = /*#__PURE__*/React.memo(AudioRecord, function (prevProps, nextProps) {
|
|
41926
|
+
return prevProps.channelId === nextProps.channelId && prevProps.showRecording === nextProps.showRecording && prevProps.maxRecordingDuration === nextProps.maxRecordingDuration;
|
|
41927
|
+
});
|
|
41892
41928
|
var Container$l = styled__default.div(_templateObject$O || (_templateObject$O = _taggedTemplateLiteralLoose(["\n width: 32px;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n ", ";\n transition: all 0.3s ease-in-out;\n"])), function (props) {
|
|
41893
41929
|
return props.recording && "width: 400px";
|
|
41894
41930
|
});
|
|
@@ -42467,7 +42503,7 @@ function onError(error) {
|
|
|
42467
42503
|
var prevActiveChannelId;
|
|
42468
42504
|
var attachmentsUpdate = [];
|
|
42469
42505
|
var SendMessageInput = function SendMessageInput(_ref3) {
|
|
42470
|
-
var _pollOptions$choosePo;
|
|
42506
|
+
var _pollOptions$choosePo, _getAudioRecordingFro;
|
|
42471
42507
|
var handleAttachmentSelected = _ref3.handleAttachmentSelected,
|
|
42472
42508
|
handleSendMessage = _ref3.handleSendMessage,
|
|
42473
42509
|
_ref3$disabled = _ref3.disabled,
|
|
@@ -43583,7 +43619,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
43583
43619
|
document.body.removeAttribute('onbeforeunload');
|
|
43584
43620
|
}
|
|
43585
43621
|
}
|
|
43586
|
-
}, [messageText, attachments, editMessageText, readyVideoAttachments, messageBodyAttributes]);
|
|
43622
|
+
}, [messageText, attachments, editMessageText, readyVideoAttachments, messageBodyAttributes, messageToEdit]);
|
|
43587
43623
|
useDidUpdate(function () {
|
|
43588
43624
|
if (mentionedUsers && mentionedUsers.length) {
|
|
43589
43625
|
setDraftMessageToMap(activeChannel.id, {
|
|
@@ -43898,7 +43934,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
43898
43934
|
onChange: handleFileUpload,
|
|
43899
43935
|
multiple: true,
|
|
43900
43936
|
type: 'file'
|
|
43901
|
-
}), showRecording || getAudioRecordingFromMap(activeChannel.id) ? (/*#__PURE__*/React__default.createElement(AudioCont, null)) : (/*#__PURE__*/React__default.createElement(MessageInputWrapper, {
|
|
43937
|
+
}), (showRecording || getAudioRecordingFromMap(activeChannel.id)) && !messageToEdit ? (/*#__PURE__*/React__default.createElement(AudioCont, null)) : (/*#__PURE__*/React__default.createElement(MessageInputWrapper, {
|
|
43902
43938
|
className: 'message_input_wrapper',
|
|
43903
43939
|
borderRadius: messageForReply || messageToEdit ? borderRadiusOnOpenedEditReplyMessage : borderRadius,
|
|
43904
43940
|
ref: inputWrapperRef,
|
|
@@ -44021,7 +44057,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
44021
44057
|
ErrorBoundary: LexicalErrorBoundary
|
|
44022
44058
|
}), floatingAnchorElem && !isSmallWidthViewport && allowTextEdit && (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(FloatingTextFormatToolbarPlugin, {
|
|
44023
44059
|
anchorElem: floatingAnchorElem
|
|
44024
|
-
})))))))), sendMessageIsActive || !voiceMessage || messageToEdit ? (/*#__PURE__*/React__default.createElement(SendMessageButton, {
|
|
44060
|
+
})))))))), sendMessageIsActive || !voiceMessage && !((_getAudioRecordingFro = getAudioRecordingFromMap(activeChannel === null || activeChannel === void 0 ? void 0 : activeChannel.id)) !== null && _getAudioRecordingFro !== void 0 && _getAudioRecordingFro.file) || messageToEdit ? (/*#__PURE__*/React__default.createElement(SendMessageButton, {
|
|
44025
44061
|
isCustomButton: CustomSendMessageButton,
|
|
44026
44062
|
isActive: sendMessageIsActive,
|
|
44027
44063
|
order: sendIconOrder,
|
|
@@ -44037,7 +44073,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
44037
44073
|
color: accentColor,
|
|
44038
44074
|
iconColor: accentColor,
|
|
44039
44075
|
activeColor: accentColor
|
|
44040
|
-
}, /*#__PURE__*/React__default.createElement(AudioRecord, {
|
|
44076
|
+
}, /*#__PURE__*/React__default.createElement(AudioRecord$1, {
|
|
44041
44077
|
sendRecordedFile: sendRecordedFile,
|
|
44042
44078
|
setShowRecording: setShowRecording,
|
|
44043
44079
|
showRecording: showRecording,
|
|
@@ -45851,7 +45887,7 @@ function InviteLinkModal(_ref) {
|
|
|
45851
45887
|
var handleConfirmReset = function handleConfirmReset() {
|
|
45852
45888
|
var _channelInviteKeys$;
|
|
45853
45889
|
setShowResetConfirm(false);
|
|
45854
|
-
dispatch(regenerateChannelInviteKeyAC(channelId, (channelInviteKeys === null || channelInviteKeys === void 0 ? void 0 : (_channelInviteKeys$ = channelInviteKeys[0]) === null || _channelInviteKeys$ === void 0 ? void 0 : _channelInviteKeys$.key) || ''));
|
|
45890
|
+
dispatch(regenerateChannelInviteKeyAC(channelId, (channelInviteKeys === null || channelInviteKeys === void 0 ? void 0 : (_channelInviteKeys$ = channelInviteKeys[0]) === null || _channelInviteKeys$ === void 0 ? void 0 : _channelInviteKeys$.key) || '', true));
|
|
45855
45891
|
};
|
|
45856
45892
|
React.useEffect(function () {
|
|
45857
45893
|
if (channelId) {
|
package/index.modern.js
CHANGED
|
@@ -12823,12 +12823,13 @@ var getChannelInviteKeysAC = function getChannelInviteKeysAC(channelId) {
|
|
|
12823
12823
|
}
|
|
12824
12824
|
};
|
|
12825
12825
|
};
|
|
12826
|
-
var regenerateChannelInviteKeyAC = function regenerateChannelInviteKeyAC(channelId, key) {
|
|
12826
|
+
var regenerateChannelInviteKeyAC = function regenerateChannelInviteKeyAC(channelId, key, deletePermanently) {
|
|
12827
12827
|
return {
|
|
12828
12828
|
type: REGENERATE_CHANNEL_INVITE_KEY,
|
|
12829
12829
|
payload: {
|
|
12830
12830
|
channelId: channelId,
|
|
12831
|
-
key: key
|
|
12831
|
+
key: key,
|
|
12832
|
+
deletePermanently: deletePermanently
|
|
12832
12833
|
}
|
|
12833
12834
|
};
|
|
12834
12835
|
};
|
|
@@ -16369,7 +16370,7 @@ function getChannels(action) {
|
|
|
16369
16370
|
try {
|
|
16370
16371
|
return Promise.resolve(new Promise(function (resolve) {
|
|
16371
16372
|
channel.getMessagesById([channel.newReactions[0].messageId]).then(function (messages) {
|
|
16372
|
-
channelMessageMap[channel.id] = messages[0];
|
|
16373
|
+
channelMessageMap[channel === null || channel === void 0 ? void 0 : channel.id] = messages[0];
|
|
16373
16374
|
log.info('[getChannels] successfully fetched reaction message for channel:', channel === null || channel === void 0 ? void 0 : channel.id);
|
|
16374
16375
|
resolve(true);
|
|
16375
16376
|
})["catch"](function (e) {
|
|
@@ -16388,8 +16389,8 @@ function getChannels(action) {
|
|
|
16388
16389
|
case 13:
|
|
16389
16390
|
log.info('[getChannels] reaction messages fetched:', channelMessageMap ? (_Object$keys = Object.keys(channelMessageMap)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length : 0);
|
|
16390
16391
|
mappedChannels = mappedChannels.map(function (channel) {
|
|
16391
|
-
if (channelMessageMap[channel.id]) {
|
|
16392
|
-
channel.lastReactedMessage = channelMessageMap[channel.id];
|
|
16392
|
+
if (channelMessageMap[channel === null || channel === void 0 ? void 0 : channel.id]) {
|
|
16393
|
+
channel.lastReactedMessage = channelMessageMap[channel === null || channel === void 0 ? void 0 : channel.id];
|
|
16393
16394
|
}
|
|
16394
16395
|
return channel;
|
|
16395
16396
|
});
|
|
@@ -18170,13 +18171,13 @@ function getChannelInviteKeys(action) {
|
|
|
18170
18171
|
}, _marked30, null, [[0, 4]]);
|
|
18171
18172
|
}
|
|
18172
18173
|
function regenerateChannelInviteKey(action) {
|
|
18173
|
-
var payload, channelId, key, channel, inviteKey, _t31;
|
|
18174
|
+
var payload, channelId, key, deletePermanently, channel, inviteKey, _t31;
|
|
18174
18175
|
return _regenerator().w(function (_context31) {
|
|
18175
18176
|
while (1) switch (_context31.p = _context31.n) {
|
|
18176
18177
|
case 0:
|
|
18177
18178
|
_context31.p = 0;
|
|
18178
18179
|
payload = action.payload;
|
|
18179
|
-
channelId = payload.channelId, key = payload.key;
|
|
18180
|
+
channelId = payload.channelId, key = payload.key, deletePermanently = payload.deletePermanently;
|
|
18180
18181
|
_context31.n = 1;
|
|
18181
18182
|
return call(getChannelFromMap, channelId);
|
|
18182
18183
|
case 1:
|
|
@@ -18191,7 +18192,8 @@ function regenerateChannelInviteKey(action) {
|
|
|
18191
18192
|
_context31.n = 2;
|
|
18192
18193
|
return call(channel.regenerateInviteKey, {
|
|
18193
18194
|
key: key,
|
|
18194
|
-
channelId: channelId
|
|
18195
|
+
channelId: channelId,
|
|
18196
|
+
deletePermanently: deletePermanently
|
|
18195
18197
|
});
|
|
18196
18198
|
case 2:
|
|
18197
18199
|
inviteKey = _context31.v;
|
|
@@ -41311,6 +41313,13 @@ function SvgRecordButton(props) {
|
|
|
41311
41313
|
}
|
|
41312
41314
|
|
|
41313
41315
|
var _templateObject$O, _templateObject2$J, _templateObject3$C, _templateObject4$x, _templateObject5$s, _templateObject6$o, _templateObject7$n;
|
|
41316
|
+
var fieldsObject = {
|
|
41317
|
+
channelId: '',
|
|
41318
|
+
currentRecordedFile: null,
|
|
41319
|
+
recording: null,
|
|
41320
|
+
recorder: null,
|
|
41321
|
+
wavesurferContainer: null
|
|
41322
|
+
};
|
|
41314
41323
|
var shouldDraw = false;
|
|
41315
41324
|
var DEFAULT_MAX_RECORDING_DURATION = 600;
|
|
41316
41325
|
var AudioRecord = function AudioRecord(_ref) {
|
|
@@ -41644,7 +41653,7 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
41644
41653
|
handleStopRecording();
|
|
41645
41654
|
shouldDraw = false;
|
|
41646
41655
|
var id = cId || channelId;
|
|
41647
|
-
recorder.stop().getMp3().then(function (_ref4) {
|
|
41656
|
+
recorder === null || recorder === void 0 ? void 0 : recorder.stop().getMp3().then(function (_ref4) {
|
|
41648
41657
|
var buffer = _ref4[0],
|
|
41649
41658
|
blob = _ref4[1];
|
|
41650
41659
|
var file = new File(buffer, 'record.mp3', {
|
|
@@ -41764,6 +41773,30 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
41764
41773
|
}
|
|
41765
41774
|
};
|
|
41766
41775
|
}, [recording, maxRecordingDuration]);
|
|
41776
|
+
useEffect(function () {
|
|
41777
|
+
fieldsObject.channelId = channelId;
|
|
41778
|
+
}, [channelId]);
|
|
41779
|
+
useEffect(function () {
|
|
41780
|
+
fieldsObject.recorder = recorder;
|
|
41781
|
+
}, [recorder]);
|
|
41782
|
+
useEffect(function () {
|
|
41783
|
+
fieldsObject.currentRecordedFile = currentRecordedFile;
|
|
41784
|
+
}, [currentRecordedFile]);
|
|
41785
|
+
useEffect(function () {
|
|
41786
|
+
fieldsObject.recording = recording;
|
|
41787
|
+
}, [recording]);
|
|
41788
|
+
useEffect(function () {
|
|
41789
|
+
fieldsObject.wavesurferContainer = wavesurferContainer.current;
|
|
41790
|
+
}, [wavesurferContainer.current]);
|
|
41791
|
+
useEffect(function () {
|
|
41792
|
+
return function () {
|
|
41793
|
+
var _fieldsObject$current;
|
|
41794
|
+
if (fieldsObject.channelId && (!fieldsObject.currentRecordedFile || !((_fieldsObject$current = fieldsObject.currentRecordedFile) !== null && _fieldsObject$current !== void 0 && _fieldsObject$current.file)) && fieldsObject.recorder && fieldsObject.recording) {
|
|
41795
|
+
stopRecording(false, fieldsObject.channelId, true, fieldsObject.recorder, fieldsObject.wavesurferContainer);
|
|
41796
|
+
handleStopRecording();
|
|
41797
|
+
}
|
|
41798
|
+
};
|
|
41799
|
+
}, []);
|
|
41767
41800
|
useEffect(function () {
|
|
41768
41801
|
if (currentRecordedFile) {
|
|
41769
41802
|
_initWaveSurfer();
|
|
@@ -41888,6 +41921,9 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
41888
41921
|
iconColor: accentColor
|
|
41889
41922
|
}, showRecording || currentRecordedFile ? /*#__PURE__*/React__default.createElement(SvgSend, null) : /*#__PURE__*/React__default.createElement(SvgRecordButton, null)));
|
|
41890
41923
|
};
|
|
41924
|
+
var AudioRecord$1 = /*#__PURE__*/memo(AudioRecord, function (prevProps, nextProps) {
|
|
41925
|
+
return prevProps.channelId === nextProps.channelId && prevProps.showRecording === nextProps.showRecording && prevProps.maxRecordingDuration === nextProps.maxRecordingDuration;
|
|
41926
|
+
});
|
|
41891
41927
|
var Container$l = styled.div(_templateObject$O || (_templateObject$O = _taggedTemplateLiteralLoose(["\n width: 32px;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n ", ";\n transition: all 0.3s ease-in-out;\n"])), function (props) {
|
|
41892
41928
|
return props.recording && "width: 400px";
|
|
41893
41929
|
});
|
|
@@ -42466,7 +42502,7 @@ function onError(error) {
|
|
|
42466
42502
|
var prevActiveChannelId;
|
|
42467
42503
|
var attachmentsUpdate = [];
|
|
42468
42504
|
var SendMessageInput = function SendMessageInput(_ref3) {
|
|
42469
|
-
var _pollOptions$choosePo;
|
|
42505
|
+
var _pollOptions$choosePo, _getAudioRecordingFro;
|
|
42470
42506
|
var handleAttachmentSelected = _ref3.handleAttachmentSelected,
|
|
42471
42507
|
handleSendMessage = _ref3.handleSendMessage,
|
|
42472
42508
|
_ref3$disabled = _ref3.disabled,
|
|
@@ -43582,7 +43618,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
43582
43618
|
document.body.removeAttribute('onbeforeunload');
|
|
43583
43619
|
}
|
|
43584
43620
|
}
|
|
43585
|
-
}, [messageText, attachments, editMessageText, readyVideoAttachments, messageBodyAttributes]);
|
|
43621
|
+
}, [messageText, attachments, editMessageText, readyVideoAttachments, messageBodyAttributes, messageToEdit]);
|
|
43586
43622
|
useDidUpdate(function () {
|
|
43587
43623
|
if (mentionedUsers && mentionedUsers.length) {
|
|
43588
43624
|
setDraftMessageToMap(activeChannel.id, {
|
|
@@ -43897,7 +43933,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
43897
43933
|
onChange: handleFileUpload,
|
|
43898
43934
|
multiple: true,
|
|
43899
43935
|
type: 'file'
|
|
43900
|
-
}), showRecording || getAudioRecordingFromMap(activeChannel.id) ? (/*#__PURE__*/React__default.createElement(AudioCont, null)) : (/*#__PURE__*/React__default.createElement(MessageInputWrapper, {
|
|
43936
|
+
}), (showRecording || getAudioRecordingFromMap(activeChannel.id)) && !messageToEdit ? (/*#__PURE__*/React__default.createElement(AudioCont, null)) : (/*#__PURE__*/React__default.createElement(MessageInputWrapper, {
|
|
43901
43937
|
className: 'message_input_wrapper',
|
|
43902
43938
|
borderRadius: messageForReply || messageToEdit ? borderRadiusOnOpenedEditReplyMessage : borderRadius,
|
|
43903
43939
|
ref: inputWrapperRef,
|
|
@@ -44020,7 +44056,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
44020
44056
|
ErrorBoundary: LexicalErrorBoundary
|
|
44021
44057
|
}), floatingAnchorElem && !isSmallWidthViewport && allowTextEdit && (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(FloatingTextFormatToolbarPlugin, {
|
|
44022
44058
|
anchorElem: floatingAnchorElem
|
|
44023
|
-
})))))))), sendMessageIsActive || !voiceMessage || messageToEdit ? (/*#__PURE__*/React__default.createElement(SendMessageButton, {
|
|
44059
|
+
})))))))), sendMessageIsActive || !voiceMessage && !((_getAudioRecordingFro = getAudioRecordingFromMap(activeChannel === null || activeChannel === void 0 ? void 0 : activeChannel.id)) !== null && _getAudioRecordingFro !== void 0 && _getAudioRecordingFro.file) || messageToEdit ? (/*#__PURE__*/React__default.createElement(SendMessageButton, {
|
|
44024
44060
|
isCustomButton: CustomSendMessageButton,
|
|
44025
44061
|
isActive: sendMessageIsActive,
|
|
44026
44062
|
order: sendIconOrder,
|
|
@@ -44036,7 +44072,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
44036
44072
|
color: accentColor,
|
|
44037
44073
|
iconColor: accentColor,
|
|
44038
44074
|
activeColor: accentColor
|
|
44039
|
-
}, /*#__PURE__*/React__default.createElement(AudioRecord, {
|
|
44075
|
+
}, /*#__PURE__*/React__default.createElement(AudioRecord$1, {
|
|
44040
44076
|
sendRecordedFile: sendRecordedFile,
|
|
44041
44077
|
setShowRecording: setShowRecording,
|
|
44042
44078
|
showRecording: showRecording,
|
|
@@ -45850,7 +45886,7 @@ function InviteLinkModal(_ref) {
|
|
|
45850
45886
|
var handleConfirmReset = function handleConfirmReset() {
|
|
45851
45887
|
var _channelInviteKeys$;
|
|
45852
45888
|
setShowResetConfirm(false);
|
|
45853
|
-
dispatch(regenerateChannelInviteKeyAC(channelId, (channelInviteKeys === null || channelInviteKeys === void 0 ? void 0 : (_channelInviteKeys$ = channelInviteKeys[0]) === null || _channelInviteKeys$ === void 0 ? void 0 : _channelInviteKeys$.key) || ''));
|
|
45889
|
+
dispatch(regenerateChannelInviteKeyAC(channelId, (channelInviteKeys === null || channelInviteKeys === void 0 ? void 0 : (_channelInviteKeys$ = channelInviteKeys[0]) === null || _channelInviteKeys$ === void 0 ? void 0 : _channelInviteKeys$.key) || '', true));
|
|
45854
45890
|
};
|
|
45855
45891
|
useEffect(function () {
|
|
45856
45892
|
if (channelId) {
|