@banta/sdk 4.7.2 → 4.7.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.
@@ -7909,7 +7909,7 @@ class AttachmentButtonComponent {
7909
7909
  attachment.transientState.errorMessage = "Failed to upload";
7910
7910
  console.error(`[Banta] Caught an error while uploading image to CDN:`);
7911
7911
  console.error(e);
7912
- alert(`Failed to upload image. Please try again later.`);
7912
+ alert(e.message);
7913
7913
  this._attachmentError.next(attachment);
7914
7914
  return;
7915
7915
  }
@@ -10318,7 +10318,14 @@ class YouTubeAttachmentResolver {
10318
10318
  if (fragment.type !== 'url')
10319
10319
  return null;
10320
10320
  let videoId;
10321
- if (fragment.text.match(/https?:\/\/(www\.|m\.)?youtube.com\/watch\?v=/)) {
10321
+ // https://youtu.be/jXzJ7FlqX6M
10322
+ if (fragment.text.match(/^https:\/\/youtu\.be\//)) {
10323
+ let match = /^https:\/\/youtu\.be\/([^\/]+)/.exec(fragment.text);
10324
+ if (match) {
10325
+ videoId = match[1];
10326
+ }
10327
+ }
10328
+ if (!videoId && fragment.text.match(/^https?:\/\/(www\.|m\.)?youtube.com\/watch\?v=/)) {
10322
10329
  let match = /watch\?v=([^&]+)/.exec(fragment.text);
10323
10330
  if (match) {
10324
10331
  videoId = match[1];