sceyt-chat-react-uikit 1.7.4-beta.2 → 1.7.4-beta.4

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 CHANGED
@@ -40809,13 +40809,17 @@ function InviteLinkModal(_ref) {
40809
40809
  var qrImageUrl = "https://api.qrserver.com/v1/create-qr-code/?data=" + encodeURIComponent(inviteUrl) + "&size=200x200&ecc=H&margin=12&color=000000&bgcolor=FFFFFF";
40810
40810
  setOpenForwardPopup(false);
40811
40811
  return Promise.resolve(_forOf(channelIds, function (channelId) {
40812
+ var channel = getChannelFromMap(channelId);
40812
40813
  var _temp3 = function () {
40813
40814
  if (shareMode === 'link') {
40815
+ var linkAttachmentBuilder = channel.createAttachmentBuilder(inviteUrl, attachmentTypes.link);
40816
+ var linkAttachmentToSend = linkAttachmentBuilder.setName('Invite link').setUpload(false).create();
40814
40817
  var message = {
40815
40818
  metadata: '',
40816
40819
  body: inviteUrl,
40817
40820
  mentionedUsers: [],
40818
- type: 'text'
40821
+ type: 'text',
40822
+ attachments: [linkAttachmentToSend]
40819
40823
  };
40820
40824
  dispatch(forwardMessageAC(message, channelId, connectionStatus, false));
40821
40825
  } else {
@@ -40848,7 +40852,6 @@ function InviteLinkModal(_ref) {
40848
40852
  attachmentUrl: localUrl
40849
40853
  }]
40850
40854
  };
40851
- var channel = getChannelFromMap(channelId);
40852
40855
  return Promise.resolve(handleUploadAttachments([{
40853
40856
  name: 'invite-qr.png',
40854
40857
  data: file,
@@ -40870,11 +40873,14 @@ function InviteLinkModal(_ref) {
40870
40873
  });
40871
40874
  }, function (e) {
40872
40875
  console.log('error', e);
40876
+ var linkAttachmentBuilder = channel.createAttachmentBuilder(inviteUrl, attachmentTypes.link);
40877
+ var linkAttachmentToSend = linkAttachmentBuilder.setName('Invite link').setUpload(false).create();
40873
40878
  var message = {
40874
40879
  metadata: '',
40875
40880
  body: inviteUrl,
40876
40881
  mentionedUsers: [],
40877
- type: 'text'
40882
+ type: 'text',
40883
+ attachments: [linkAttachmentToSend]
40878
40884
  };
40879
40885
  dispatch(forwardMessageAC(message, channelId, connectionStatus, false));
40880
40886
  });
@@ -43148,7 +43154,7 @@ var ChannelDetailsContainer = function ChannelDetailsContainer(_ref) {
43148
43154
  QRCodeIcon: QRCodeIcon
43149
43155
  })));
43150
43156
  };
43151
- var DetailsWrapper = styled__default.div(_templateObject$_ || (_templateObject$_ = _taggedTemplateLiteralLoose([""])));
43157
+ var DetailsWrapper = styled__default.div(_templateObject$_ || (_templateObject$_ = _taggedTemplateLiteralLoose(["\n user-select: text;\n"])));
43152
43158
 
43153
43159
  var _path$1t;
43154
43160
  function _extends$1x() {
package/index.modern.js CHANGED
@@ -40807,13 +40807,17 @@ function InviteLinkModal(_ref) {
40807
40807
  var qrImageUrl = "https://api.qrserver.com/v1/create-qr-code/?data=" + encodeURIComponent(inviteUrl) + "&size=200x200&ecc=H&margin=12&color=000000&bgcolor=FFFFFF";
40808
40808
  setOpenForwardPopup(false);
40809
40809
  return Promise.resolve(_forOf(channelIds, function (channelId) {
40810
+ var channel = getChannelFromMap(channelId);
40810
40811
  var _temp3 = function () {
40811
40812
  if (shareMode === 'link') {
40813
+ var linkAttachmentBuilder = channel.createAttachmentBuilder(inviteUrl, attachmentTypes.link);
40814
+ var linkAttachmentToSend = linkAttachmentBuilder.setName('Invite link').setUpload(false).create();
40812
40815
  var message = {
40813
40816
  metadata: '',
40814
40817
  body: inviteUrl,
40815
40818
  mentionedUsers: [],
40816
- type: 'text'
40819
+ type: 'text',
40820
+ attachments: [linkAttachmentToSend]
40817
40821
  };
40818
40822
  dispatch(forwardMessageAC(message, channelId, connectionStatus, false));
40819
40823
  } else {
@@ -40846,7 +40850,6 @@ function InviteLinkModal(_ref) {
40846
40850
  attachmentUrl: localUrl
40847
40851
  }]
40848
40852
  };
40849
- var channel = getChannelFromMap(channelId);
40850
40853
  return Promise.resolve(handleUploadAttachments([{
40851
40854
  name: 'invite-qr.png',
40852
40855
  data: file,
@@ -40868,11 +40871,14 @@ function InviteLinkModal(_ref) {
40868
40871
  });
40869
40872
  }, function (e) {
40870
40873
  console.log('error', e);
40874
+ var linkAttachmentBuilder = channel.createAttachmentBuilder(inviteUrl, attachmentTypes.link);
40875
+ var linkAttachmentToSend = linkAttachmentBuilder.setName('Invite link').setUpload(false).create();
40871
40876
  var message = {
40872
40877
  metadata: '',
40873
40878
  body: inviteUrl,
40874
40879
  mentionedUsers: [],
40875
- type: 'text'
40880
+ type: 'text',
40881
+ attachments: [linkAttachmentToSend]
40876
40882
  };
40877
40883
  dispatch(forwardMessageAC(message, channelId, connectionStatus, false));
40878
40884
  });
@@ -43146,7 +43152,7 @@ var ChannelDetailsContainer = function ChannelDetailsContainer(_ref) {
43146
43152
  QRCodeIcon: QRCodeIcon
43147
43153
  })));
43148
43154
  };
43149
- var DetailsWrapper = styled.div(_templateObject$_ || (_templateObject$_ = _taggedTemplateLiteralLoose([""])));
43155
+ var DetailsWrapper = styled.div(_templateObject$_ || (_templateObject$_ = _taggedTemplateLiteralLoose(["\n user-select: text;\n"])));
43150
43156
 
43151
43157
  var _path$1t;
43152
43158
  function _extends$1x() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sceyt-chat-react-uikit",
3
- "version": "1.7.4-beta.2",
3
+ "version": "1.7.4-beta.4",
4
4
  "description": "Interactive React UI Components for Sceyt Chat.",
5
5
  "author": "Sceyt",
6
6
  "license": "MIT",