sceyt-chat-react-uikit 1.8.0-beta.12 → 1.8.0-beta.13

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.
Files changed (3) hide show
  1. package/index.js +30 -20
  2. package/index.modern.js +30 -20
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -10603,10 +10603,11 @@ function updateMessageAC(messageId, params, addIfNotExists, voteDetails) {
10603
10603
  voteDetails: voteDetails
10604
10604
  });
10605
10605
  }
10606
- function updateMessagesStatusAC(name, markersMap) {
10606
+ function updateMessagesStatusAC(name, markersMap, isOwnMarker) {
10607
10607
  return updateMessagesStatus({
10608
10608
  name: name,
10609
- markersMap: markersMap
10609
+ markersMap: markersMap,
10610
+ isOwnMarker: isOwnMarker
10610
10611
  });
10611
10612
  }
10612
10613
  function clearMessagesAC() {
@@ -10923,8 +10924,7 @@ var shouldSkipDeliveryStatusUpdate = function shouldSkipDeliveryStatusUpdate(mar
10923
10924
  }
10924
10925
  return false;
10925
10926
  };
10926
- var updateMessageDeliveryStatusAndMarkers = function updateMessageDeliveryStatusAndMarkers(message, markerName) {
10927
- var isOwnMarker = message.user.id !== getClient().user.id;
10927
+ var updateMessageDeliveryStatusAndMarkers = function updateMessageDeliveryStatusAndMarkers(message, markerName, isOwnMarker) {
10928
10928
  if (shouldSkipDeliveryStatusUpdate(markerName, message.deliveryStatus)) {
10929
10929
  return {
10930
10930
  markerTotals: message.markerTotals,
@@ -10993,10 +10993,10 @@ var updateMessageOnAllMessages = function updateMessageOnAllMessages(messageId,
10993
10993
  return message;
10994
10994
  });
10995
10995
  };
10996
- var updateMessageStatusOnAllMessages = function updateMessageStatusOnAllMessages(name, markersMap) {
10996
+ var updateMessageStatusOnAllMessages = function updateMessageStatusOnAllMessages(name, markersMap, isOwnMarker) {
10997
10997
  activeChannelAllMessages = activeChannelAllMessages.map(function (message) {
10998
10998
  if (markersMap[message.id]) {
10999
- var statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(message, name);
10999
+ var statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(message, name, isOwnMarker);
11000
11000
  return _extends({}, message, statusUpdatedMessage);
11001
11001
  }
11002
11002
  return message;
@@ -11007,12 +11007,12 @@ var removeMessageFromAllMessages = function removeMessageFromAllMessages(message
11007
11007
  return !(msg.id === messageId || msg.tid === messageId);
11008
11008
  });
11009
11009
  };
11010
- var updateMarkersOnAllMessages = function updateMarkersOnAllMessages(markersMap, name) {
11010
+ var updateMarkersOnAllMessages = function updateMarkersOnAllMessages(markersMap, name, isOwnMarker) {
11011
11011
  activeChannelAllMessages = activeChannelAllMessages.map(function (message) {
11012
11012
  if (!markersMap[message.id]) {
11013
11013
  return message;
11014
11014
  }
11015
- var statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(message, name);
11015
+ var statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(message, name, isOwnMarker);
11016
11016
  return _extends({}, message, statusUpdatedMessage);
11017
11017
  });
11018
11018
  };
@@ -11579,7 +11579,8 @@ var messageSlice = createSlice({
11579
11579
  updateMessagesStatus: function updateMessagesStatus(state, action) {
11580
11580
  var _action$payload2 = action.payload,
11581
11581
  name = _action$payload2.name,
11582
- markersMap = _action$payload2.markersMap;
11582
+ markersMap = _action$payload2.markersMap,
11583
+ isOwnMarker = _action$payload2.isOwnMarker;
11583
11584
  var markerName = name;
11584
11585
  for (var index = 0; index < state.activeChannelMessages.length; index++) {
11585
11586
  if (!markersMap[state.activeChannelMessages[index].id]) {
@@ -11587,7 +11588,7 @@ var messageSlice = createSlice({
11587
11588
  }
11588
11589
  if (state.activeChannelMessages[index].state !== 'Deleted') {
11589
11590
  var message = state.activeChannelMessages[index];
11590
- var statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(message, markerName);
11591
+ var statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(message, markerName, isOwnMarker);
11591
11592
  state.activeChannelMessages[index] = _extends({}, message, statusUpdatedMessage);
11592
11593
  }
11593
11594
  }
@@ -15151,7 +15152,7 @@ function watchForEvents() {
15151
15152
  };
15152
15153
  });
15153
15154
  _loop = /*#__PURE__*/_regenerator().m(function _callee() {
15154
- var _yield$take, type, args, createdChannel, channelFilterTypes, getFromContacts, channelExists, _chan, channel, joinedMember, _chan2, customLoadMembersFunctions, joinMembersEvent, membersList, updateChannelData, _channel, member, _channelExists, activeChannelId, groupName, _updateChannelData, _channel2, _channelExists2, _channel3, removedMembers, _activeChannelId, _channelExists3, activeChannel, _updateChannelData2, _groupName, _channel4, addedMembers, _activeChannelId2, _channelExists4, _updateChannelData3, _customLoadMembersFunctions, addMembersEvent, _membersList, _groupName2, onUpdateChannel, updatedChannel, _channelExists5, subject, avatarUrl, muted, mutedTill, metadata, _channel5, fields, _activeChannelId3, _groupName3, _channel6, message, messageToHandle, _channelFilterTypes, _activeChannelId4, _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, _channel7, _activeChannelId5, updateLastMessage, markersMap, activeChannelMessages, _iterator, _step, messageId, isPendingMessage, lastMessage, _channelId, _channel8, _channel9, deletedMessage, _activeChannelId6, _channelExists7, _channel0, _message, _activeChannelId7, _channelExists8, _channel1, user, _message2, reaction, isSelf, _activeChannelId8, _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, _channel10, pollDetails, _messageId, pollDetailsData, _activeChannelId9, addedVotes, deletedVotes, objs, _iterator2, _step2, vote, _iterator3, _step3, _vote, _i, _objs, obj, _store$getState$Messa, key, hasNext, _i2, _objs2, _obj, _pollDetailsData$chan3, _channel11, _pollDetails, _messageId2, _pollDetailsData, _activeChannelId0, _deletedVotes, _objs3, _iterator4, _step4, _vote2, _i3, _objs4, _obj2, _i4, _objs5, _obj3, _pollDetailsData2$cha, _channel12, _pollDetails2, _messageId3, _activeChannelId1, _pollDetailsData2, retractedVotes, _objs6, _iterator5, _step5, _vote4, _i5, _objs7, _obj4, _iterator6, _step6, _vote3, _channel13, _messageId4, _activeChannelId10, _obj5, _channel14, _user, _message3, _reaction, channelFromMap, _isSelf, _activeChannelId11, _channelUpdateParams, _channel15, _updatedChannel, _channel16, _activeChannelId12, channelExist, _channel17, _channel18, _channel19, _channel20, _channel21, _channel22, _channel23, _groupName5, _channel24, _groupName6, _channel25, members, _activeChannelId13, _customLoadMembersFunctions2, updateMembersEvent, _membersList2, i, _channel26, _channel27, _channelId2, from, name, status, _t, _t2, _t3, _t4;
15155
+ var _yield$take, type, args, createdChannel, channelFilterTypes, getFromContacts, channelExists, _chan, channel, joinedMember, _chan2, customLoadMembersFunctions, joinMembersEvent, membersList, updateChannelData, _channel, member, _channelExists, activeChannelId, groupName, _updateChannelData, _channel2, _channelExists2, _channel3, removedMembers, _activeChannelId, _channelExists3, activeChannel, _updateChannelData2, _groupName, _channel4, addedMembers, _activeChannelId2, _channelExists4, _updateChannelData3, _customLoadMembersFunctions, addMembersEvent, _membersList, _groupName2, onUpdateChannel, updatedChannel, _channelExists5, subject, avatarUrl, muted, mutedTill, metadata, _channel5, fields, _activeChannelId3, _groupName3, _channel6, message, messageToHandle, _channelFilterTypes, _activeChannelId4, _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, _channel7, _markerList$user, isOwnMarker, _activeChannelId5, updateLastMessage, markersMap, activeChannelMessages, _iterator, _step, messageId, isPendingMessage, lastMessage, _channelId, _channel8, _channel9, deletedMessage, _activeChannelId6, _channelExists7, _channel0, _message, _activeChannelId7, _channelExists8, _channel1, user, _message2, reaction, isSelf, _activeChannelId8, _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, _channel10, pollDetails, _messageId, pollDetailsData, _activeChannelId9, addedVotes, deletedVotes, objs, _iterator2, _step2, vote, _iterator3, _step3, _vote, _i, _objs, obj, _store$getState$Messa, key, hasNext, _i2, _objs2, _obj, _pollDetailsData$chan3, _channel11, _pollDetails, _messageId2, _pollDetailsData, _activeChannelId0, _deletedVotes, _objs3, _iterator4, _step4, _vote2, _i3, _objs4, _obj2, _i4, _objs5, _obj3, _pollDetailsData2$cha, _channel12, _pollDetails2, _messageId3, _activeChannelId1, _pollDetailsData2, retractedVotes, _objs6, _iterator5, _step5, _vote4, _i5, _objs7, _obj4, _iterator6, _step6, _vote3, _channel13, _messageId4, _activeChannelId10, _obj5, _channel14, _user, _message3, _reaction, channelFromMap, _isSelf, _activeChannelId11, _channelUpdateParams, _channel15, _updatedChannel, _channel16, _activeChannelId12, channelExist, _channel17, _channel18, _channel19, _channel20, _channel21, _channel22, _channel23, _groupName5, _channel24, _groupName6, _channel25, members, _activeChannelId13, _customLoadMembersFunctions2, updateMembersEvent, _membersList2, i, _channel26, _channel27, _channelId2, from, name, status, _t, _t2, _t3, _t4;
15155
15156
  return _regenerator().w(function (_context) {
15156
15157
  while (1) switch (_context.p = _context.n) {
15157
15158
  case 0:
@@ -15736,6 +15737,7 @@ function watchForEvents() {
15736
15737
  _context.n = 91;
15737
15738
  break;
15738
15739
  }
15740
+ isOwnMarker = ((_markerList$user = markerList.user) === null || _markerList$user === void 0 ? void 0 : _markerList$user.id) === SceytChatClient.user.id;
15739
15741
  _context.n = 81;
15740
15742
  return effects.call(getActiveChannelId);
15741
15743
  case 81:
@@ -15785,7 +15787,7 @@ function watchForEvents() {
15785
15787
  _context.n = 88;
15786
15788
  break;
15787
15789
  }
15788
- lastMessage = _extends({}, _channel7.lastMessage, updateMessageDeliveryStatusAndMarkers(_channel7.lastMessage, markerList.name));
15790
+ lastMessage = _extends({}, _channel7.lastMessage, updateMessageDeliveryStatusAndMarkers(_channel7.lastMessage, markerList.name, isOwnMarker));
15789
15791
  updateChannelLastMessageOnAllChannels(_channel7.id, lastMessage);
15790
15792
  _context.n = 88;
15791
15793
  return effects.put(updateChannelLastMessageStatusAC(lastMessage, _channel7));
@@ -15795,15 +15797,19 @@ function watchForEvents() {
15795
15797
  break;
15796
15798
  }
15797
15799
  _context.n = 89;
15798
- return effects.put(updateMessagesStatusAC(markerList.name, markersMap));
15800
+ return effects.put(updateMessagesStatusAC(markerList.name, markersMap, isOwnMarker));
15799
15801
  case 89:
15800
- updateMarkersOnAllMessages(markersMap, markerList.name);
15802
+ updateMarkersOnAllMessages(markersMap, markerList.name, isOwnMarker);
15801
15803
  case 90:
15802
15804
  updateMessageStatusOnMap(_channel7.id, {
15803
15805
  name: markerList.name,
15804
15806
  markersMap: markersMap
15805
15807
  });
15806
- updateMessageStatusOnAllMessages(markerList.name, markersMap);
15808
+ updateMessageStatusOnAllMessages(markerList.name, markersMap, isOwnMarker);
15809
+ if (isOwnMarker) {
15810
+ _context.n = 91;
15811
+ break;
15812
+ }
15807
15813
  _context.n = 91;
15808
15814
  return effects.put(updateMessagesMarkersAC(channelId, markerList.name, markerList));
15809
15815
  case 91:
@@ -20347,7 +20353,7 @@ function sendMessage(action) {
20347
20353
  messagesToSend.push(messageToSend);
20348
20354
  case 12:
20349
20355
  _loop2 = /*#__PURE__*/_regenerator().m(function _callee3() {
20350
- var messageAttachment, messageToSend, messageCopy, _attachmentsToSend, linkAttachmentToSend, linkAttachmentBuilder, messageResponse, k, pendingAttachment, attachmentsToUpdate, currentAttachmentsMap, messageUpdateData, stringifiedMessageUpdateData, activeChannelId, messageToUpdate, channelUpdateParam, _channel, _messageToSend2, _channel2, isErrorResendable, _t;
20356
+ var messageAttachment, messageToSend, messageCopy, _attachmentsToSend, linkAttachmentToSend, linkAttachmentBuilder, messageResponse, k, pendingAttachment, attachmentsToUpdate, currentAttachmentsMap, messageUpdateData, activeChannelId, messageToUpdate, channelUpdateParam, _channel, _messageToSend2, _channel2, isErrorResendable, _t;
20351
20357
  return _regenerator().w(function (_context3) {
20352
20358
  while (1) switch (_context3.p = _context3.n) {
20353
20359
  case 0:
@@ -20424,11 +20430,15 @@ function sendMessage(action) {
20424
20430
  currentAttachmentsMap[attachment.tid] = attachment;
20425
20431
  });
20426
20432
  attachmentsToUpdate = messageResponse.attachments.map(function (attachment) {
20427
- if (currentAttachmentsMap[attachment.tid]) {
20433
+ if (currentAttachmentsMap[attachment.tid] && attachment.type !== attachmentTypes.voice) {
20428
20434
  log.info('set at');
20429
20435
  return _extends({}, attachment, {
20430
20436
  attachmentUrl: currentAttachmentsMap[attachment.tid].attachmentUrl
20431
20437
  });
20438
+ } else if (attachment.type === attachmentTypes.voice) {
20439
+ return _extends({}, attachment, {
20440
+ attachmentUrl: null
20441
+ });
20432
20442
  }
20433
20443
  return attachment;
20434
20444
  });
@@ -20437,14 +20447,13 @@ function sendMessage(action) {
20437
20447
  attachments: attachmentsToUpdate,
20438
20448
  channelId: channel.id
20439
20449
  });
20440
- stringifiedMessageUpdateData = JSON.parse(JSON.stringify(messageResponse));
20441
20450
  activeChannelId = getActiveChannelId();
20442
20451
  if (!(activeChannelId === channel.id)) {
20443
20452
  _context3.n = 9;
20444
20453
  break;
20445
20454
  }
20446
20455
  _context3.n = 9;
20447
- return effects.put(updateMessageAC(messageToSend.tid, stringifiedMessageUpdateData, true));
20456
+ return effects.put(updateMessageAC(messageToSend.tid, messageUpdateData, true));
20448
20457
  case 9:
20449
20458
  _context3.n = 10;
20450
20459
  return effects.put(removePendingMessageAC(channel.id, messageToSend.tid));
@@ -45607,7 +45616,8 @@ var SendMessageInput = function SendMessageInput(_ref3) {
45607
45616
  viewOnce: viewOnce || false,
45608
45617
  parentMessage: messageForReply || null
45609
45618
  };
45610
- dispatch(sendMessageAC(messageToSend, id, connectionStatus));
45619
+ var sendAttachmentsAsSeparateMessage = getSendAttachmentsAsSeparateMessages();
45620
+ dispatch(sendMessageAC(messageToSend, id, connectionStatus, connectionStatus, sendAttachmentsAsSeparateMessage));
45611
45621
  setViewOnce(false);
45612
45622
  setAttachments([]);
45613
45623
  handleCloseReply();
package/index.modern.js CHANGED
@@ -10602,10 +10602,11 @@ function updateMessageAC(messageId, params, addIfNotExists, voteDetails) {
10602
10602
  voteDetails: voteDetails
10603
10603
  });
10604
10604
  }
10605
- function updateMessagesStatusAC(name, markersMap) {
10605
+ function updateMessagesStatusAC(name, markersMap, isOwnMarker) {
10606
10606
  return updateMessagesStatus({
10607
10607
  name: name,
10608
- markersMap: markersMap
10608
+ markersMap: markersMap,
10609
+ isOwnMarker: isOwnMarker
10609
10610
  });
10610
10611
  }
10611
10612
  function clearMessagesAC() {
@@ -10922,8 +10923,7 @@ var shouldSkipDeliveryStatusUpdate = function shouldSkipDeliveryStatusUpdate(mar
10922
10923
  }
10923
10924
  return false;
10924
10925
  };
10925
- var updateMessageDeliveryStatusAndMarkers = function updateMessageDeliveryStatusAndMarkers(message, markerName) {
10926
- var isOwnMarker = message.user.id !== getClient().user.id;
10926
+ var updateMessageDeliveryStatusAndMarkers = function updateMessageDeliveryStatusAndMarkers(message, markerName, isOwnMarker) {
10927
10927
  if (shouldSkipDeliveryStatusUpdate(markerName, message.deliveryStatus)) {
10928
10928
  return {
10929
10929
  markerTotals: message.markerTotals,
@@ -10992,10 +10992,10 @@ var updateMessageOnAllMessages = function updateMessageOnAllMessages(messageId,
10992
10992
  return message;
10993
10993
  });
10994
10994
  };
10995
- var updateMessageStatusOnAllMessages = function updateMessageStatusOnAllMessages(name, markersMap) {
10995
+ var updateMessageStatusOnAllMessages = function updateMessageStatusOnAllMessages(name, markersMap, isOwnMarker) {
10996
10996
  activeChannelAllMessages = activeChannelAllMessages.map(function (message) {
10997
10997
  if (markersMap[message.id]) {
10998
- var statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(message, name);
10998
+ var statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(message, name, isOwnMarker);
10999
10999
  return _extends({}, message, statusUpdatedMessage);
11000
11000
  }
11001
11001
  return message;
@@ -11006,12 +11006,12 @@ var removeMessageFromAllMessages = function removeMessageFromAllMessages(message
11006
11006
  return !(msg.id === messageId || msg.tid === messageId);
11007
11007
  });
11008
11008
  };
11009
- var updateMarkersOnAllMessages = function updateMarkersOnAllMessages(markersMap, name) {
11009
+ var updateMarkersOnAllMessages = function updateMarkersOnAllMessages(markersMap, name, isOwnMarker) {
11010
11010
  activeChannelAllMessages = activeChannelAllMessages.map(function (message) {
11011
11011
  if (!markersMap[message.id]) {
11012
11012
  return message;
11013
11013
  }
11014
- var statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(message, name);
11014
+ var statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(message, name, isOwnMarker);
11015
11015
  return _extends({}, message, statusUpdatedMessage);
11016
11016
  });
11017
11017
  };
@@ -11578,7 +11578,8 @@ var messageSlice = createSlice({
11578
11578
  updateMessagesStatus: function updateMessagesStatus(state, action) {
11579
11579
  var _action$payload2 = action.payload,
11580
11580
  name = _action$payload2.name,
11581
- markersMap = _action$payload2.markersMap;
11581
+ markersMap = _action$payload2.markersMap,
11582
+ isOwnMarker = _action$payload2.isOwnMarker;
11582
11583
  var markerName = name;
11583
11584
  for (var index = 0; index < state.activeChannelMessages.length; index++) {
11584
11585
  if (!markersMap[state.activeChannelMessages[index].id]) {
@@ -11586,7 +11587,7 @@ var messageSlice = createSlice({
11586
11587
  }
11587
11588
  if (state.activeChannelMessages[index].state !== 'Deleted') {
11588
11589
  var message = state.activeChannelMessages[index];
11589
- var statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(message, markerName);
11590
+ var statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(message, markerName, isOwnMarker);
11590
11591
  state.activeChannelMessages[index] = _extends({}, message, statusUpdatedMessage);
11591
11592
  }
11592
11593
  }
@@ -15150,7 +15151,7 @@ function watchForEvents() {
15150
15151
  };
15151
15152
  });
15152
15153
  _loop = /*#__PURE__*/_regenerator().m(function _callee() {
15153
- var _yield$take, type, args, createdChannel, channelFilterTypes, getFromContacts, channelExists, _chan, channel, joinedMember, _chan2, customLoadMembersFunctions, joinMembersEvent, membersList, updateChannelData, _channel, member, _channelExists, activeChannelId, groupName, _updateChannelData, _channel2, _channelExists2, _channel3, removedMembers, _activeChannelId, _channelExists3, activeChannel, _updateChannelData2, _groupName, _channel4, addedMembers, _activeChannelId2, _channelExists4, _updateChannelData3, _customLoadMembersFunctions, addMembersEvent, _membersList, _groupName2, onUpdateChannel, updatedChannel, _channelExists5, subject, avatarUrl, muted, mutedTill, metadata, _channel5, fields, _activeChannelId3, _groupName3, _channel6, message, messageToHandle, _channelFilterTypes, _activeChannelId4, _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, _channel7, _activeChannelId5, updateLastMessage, markersMap, activeChannelMessages, _iterator, _step, messageId, isPendingMessage, lastMessage, _channelId, _channel8, _channel9, deletedMessage, _activeChannelId6, _channelExists7, _channel0, _message, _activeChannelId7, _channelExists8, _channel1, user, _message2, reaction, isSelf, _activeChannelId8, _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, _channel10, pollDetails, _messageId, pollDetailsData, _activeChannelId9, addedVotes, deletedVotes, objs, _iterator2, _step2, vote, _iterator3, _step3, _vote, _i, _objs, obj, _store$getState$Messa, key, hasNext, _i2, _objs2, _obj, _pollDetailsData$chan3, _channel11, _pollDetails, _messageId2, _pollDetailsData, _activeChannelId0, _deletedVotes, _objs3, _iterator4, _step4, _vote2, _i3, _objs4, _obj2, _i4, _objs5, _obj3, _pollDetailsData2$cha, _channel12, _pollDetails2, _messageId3, _activeChannelId1, _pollDetailsData2, retractedVotes, _objs6, _iterator5, _step5, _vote4, _i5, _objs7, _obj4, _iterator6, _step6, _vote3, _channel13, _messageId4, _activeChannelId10, _obj5, _channel14, _user, _message3, _reaction, channelFromMap, _isSelf, _activeChannelId11, _channelUpdateParams, _channel15, _updatedChannel, _channel16, _activeChannelId12, channelExist, _channel17, _channel18, _channel19, _channel20, _channel21, _channel22, _channel23, _groupName5, _channel24, _groupName6, _channel25, members, _activeChannelId13, _customLoadMembersFunctions2, updateMembersEvent, _membersList2, i, _channel26, _channel27, _channelId2, from, name, status, _t, _t2, _t3, _t4;
15154
+ var _yield$take, type, args, createdChannel, channelFilterTypes, getFromContacts, channelExists, _chan, channel, joinedMember, _chan2, customLoadMembersFunctions, joinMembersEvent, membersList, updateChannelData, _channel, member, _channelExists, activeChannelId, groupName, _updateChannelData, _channel2, _channelExists2, _channel3, removedMembers, _activeChannelId, _channelExists3, activeChannel, _updateChannelData2, _groupName, _channel4, addedMembers, _activeChannelId2, _channelExists4, _updateChannelData3, _customLoadMembersFunctions, addMembersEvent, _membersList, _groupName2, onUpdateChannel, updatedChannel, _channelExists5, subject, avatarUrl, muted, mutedTill, metadata, _channel5, fields, _activeChannelId3, _groupName3, _channel6, message, messageToHandle, _channelFilterTypes, _activeChannelId4, _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, _channel7, _markerList$user, isOwnMarker, _activeChannelId5, updateLastMessage, markersMap, activeChannelMessages, _iterator, _step, messageId, isPendingMessage, lastMessage, _channelId, _channel8, _channel9, deletedMessage, _activeChannelId6, _channelExists7, _channel0, _message, _activeChannelId7, _channelExists8, _channel1, user, _message2, reaction, isSelf, _activeChannelId8, _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, _channel10, pollDetails, _messageId, pollDetailsData, _activeChannelId9, addedVotes, deletedVotes, objs, _iterator2, _step2, vote, _iterator3, _step3, _vote, _i, _objs, obj, _store$getState$Messa, key, hasNext, _i2, _objs2, _obj, _pollDetailsData$chan3, _channel11, _pollDetails, _messageId2, _pollDetailsData, _activeChannelId0, _deletedVotes, _objs3, _iterator4, _step4, _vote2, _i3, _objs4, _obj2, _i4, _objs5, _obj3, _pollDetailsData2$cha, _channel12, _pollDetails2, _messageId3, _activeChannelId1, _pollDetailsData2, retractedVotes, _objs6, _iterator5, _step5, _vote4, _i5, _objs7, _obj4, _iterator6, _step6, _vote3, _channel13, _messageId4, _activeChannelId10, _obj5, _channel14, _user, _message3, _reaction, channelFromMap, _isSelf, _activeChannelId11, _channelUpdateParams, _channel15, _updatedChannel, _channel16, _activeChannelId12, channelExist, _channel17, _channel18, _channel19, _channel20, _channel21, _channel22, _channel23, _groupName5, _channel24, _groupName6, _channel25, members, _activeChannelId13, _customLoadMembersFunctions2, updateMembersEvent, _membersList2, i, _channel26, _channel27, _channelId2, from, name, status, _t, _t2, _t3, _t4;
15154
15155
  return _regenerator().w(function (_context) {
15155
15156
  while (1) switch (_context.p = _context.n) {
15156
15157
  case 0:
@@ -15735,6 +15736,7 @@ function watchForEvents() {
15735
15736
  _context.n = 91;
15736
15737
  break;
15737
15738
  }
15739
+ isOwnMarker = ((_markerList$user = markerList.user) === null || _markerList$user === void 0 ? void 0 : _markerList$user.id) === SceytChatClient.user.id;
15738
15740
  _context.n = 81;
15739
15741
  return call(getActiveChannelId);
15740
15742
  case 81:
@@ -15784,7 +15786,7 @@ function watchForEvents() {
15784
15786
  _context.n = 88;
15785
15787
  break;
15786
15788
  }
15787
- lastMessage = _extends({}, _channel7.lastMessage, updateMessageDeliveryStatusAndMarkers(_channel7.lastMessage, markerList.name));
15789
+ lastMessage = _extends({}, _channel7.lastMessage, updateMessageDeliveryStatusAndMarkers(_channel7.lastMessage, markerList.name, isOwnMarker));
15788
15790
  updateChannelLastMessageOnAllChannels(_channel7.id, lastMessage);
15789
15791
  _context.n = 88;
15790
15792
  return put(updateChannelLastMessageStatusAC(lastMessage, _channel7));
@@ -15794,15 +15796,19 @@ function watchForEvents() {
15794
15796
  break;
15795
15797
  }
15796
15798
  _context.n = 89;
15797
- return put(updateMessagesStatusAC(markerList.name, markersMap));
15799
+ return put(updateMessagesStatusAC(markerList.name, markersMap, isOwnMarker));
15798
15800
  case 89:
15799
- updateMarkersOnAllMessages(markersMap, markerList.name);
15801
+ updateMarkersOnAllMessages(markersMap, markerList.name, isOwnMarker);
15800
15802
  case 90:
15801
15803
  updateMessageStatusOnMap(_channel7.id, {
15802
15804
  name: markerList.name,
15803
15805
  markersMap: markersMap
15804
15806
  });
15805
- updateMessageStatusOnAllMessages(markerList.name, markersMap);
15807
+ updateMessageStatusOnAllMessages(markerList.name, markersMap, isOwnMarker);
15808
+ if (isOwnMarker) {
15809
+ _context.n = 91;
15810
+ break;
15811
+ }
15806
15812
  _context.n = 91;
15807
15813
  return put(updateMessagesMarkersAC(channelId, markerList.name, markerList));
15808
15814
  case 91:
@@ -20346,7 +20352,7 @@ function sendMessage(action) {
20346
20352
  messagesToSend.push(messageToSend);
20347
20353
  case 12:
20348
20354
  _loop2 = /*#__PURE__*/_regenerator().m(function _callee3() {
20349
- var messageAttachment, messageToSend, messageCopy, _attachmentsToSend, linkAttachmentToSend, linkAttachmentBuilder, messageResponse, k, pendingAttachment, attachmentsToUpdate, currentAttachmentsMap, messageUpdateData, stringifiedMessageUpdateData, activeChannelId, messageToUpdate, channelUpdateParam, _channel, _messageToSend2, _channel2, isErrorResendable, _t;
20355
+ var messageAttachment, messageToSend, messageCopy, _attachmentsToSend, linkAttachmentToSend, linkAttachmentBuilder, messageResponse, k, pendingAttachment, attachmentsToUpdate, currentAttachmentsMap, messageUpdateData, activeChannelId, messageToUpdate, channelUpdateParam, _channel, _messageToSend2, _channel2, isErrorResendable, _t;
20350
20356
  return _regenerator().w(function (_context3) {
20351
20357
  while (1) switch (_context3.p = _context3.n) {
20352
20358
  case 0:
@@ -20423,11 +20429,15 @@ function sendMessage(action) {
20423
20429
  currentAttachmentsMap[attachment.tid] = attachment;
20424
20430
  });
20425
20431
  attachmentsToUpdate = messageResponse.attachments.map(function (attachment) {
20426
- if (currentAttachmentsMap[attachment.tid]) {
20432
+ if (currentAttachmentsMap[attachment.tid] && attachment.type !== attachmentTypes.voice) {
20427
20433
  log.info('set at');
20428
20434
  return _extends({}, attachment, {
20429
20435
  attachmentUrl: currentAttachmentsMap[attachment.tid].attachmentUrl
20430
20436
  });
20437
+ } else if (attachment.type === attachmentTypes.voice) {
20438
+ return _extends({}, attachment, {
20439
+ attachmentUrl: null
20440
+ });
20431
20441
  }
20432
20442
  return attachment;
20433
20443
  });
@@ -20436,14 +20446,13 @@ function sendMessage(action) {
20436
20446
  attachments: attachmentsToUpdate,
20437
20447
  channelId: channel.id
20438
20448
  });
20439
- stringifiedMessageUpdateData = JSON.parse(JSON.stringify(messageResponse));
20440
20449
  activeChannelId = getActiveChannelId();
20441
20450
  if (!(activeChannelId === channel.id)) {
20442
20451
  _context3.n = 9;
20443
20452
  break;
20444
20453
  }
20445
20454
  _context3.n = 9;
20446
- return put(updateMessageAC(messageToSend.tid, stringifiedMessageUpdateData, true));
20455
+ return put(updateMessageAC(messageToSend.tid, messageUpdateData, true));
20447
20456
  case 9:
20448
20457
  _context3.n = 10;
20449
20458
  return put(removePendingMessageAC(channel.id, messageToSend.tid));
@@ -45606,7 +45615,8 @@ var SendMessageInput = function SendMessageInput(_ref3) {
45606
45615
  viewOnce: viewOnce || false,
45607
45616
  parentMessage: messageForReply || null
45608
45617
  };
45609
- dispatch(sendMessageAC(messageToSend, id, connectionStatus));
45618
+ var sendAttachmentsAsSeparateMessage = getSendAttachmentsAsSeparateMessages();
45619
+ dispatch(sendMessageAC(messageToSend, id, connectionStatus, connectionStatus, sendAttachmentsAsSeparateMessage));
45610
45620
  setViewOnce(false);
45611
45621
  setAttachments([]);
45612
45622
  handleCloseReply();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sceyt-chat-react-uikit",
3
- "version": "1.8.0-beta.12",
3
+ "version": "1.8.0-beta.13",
4
4
  "description": "Interactive React UI Components for Sceyt Chat.",
5
5
  "author": "Sceyt",
6
6
  "license": "MIT",