@banta/sdk 4.7.2 → 4.7.3

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.
@@ -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];