File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export default function tweetConfig({
4242 quoteUrl : {
4343 type : "text" ,
4444 title : ( { decorated } ) => `${ decorated . quoteType ?. markdown } URL` ,
45- placeholder : "e.g. https://twitter .com/[user]/status/[id]" ,
45+ placeholder : "e.g. https://x .com/[user]/status/[id]" ,
4646 transform : ( value ) => value . split ( "?" ) [ 0 ] . trim ( ) ,
4747 iframe : ( value ) =>
4848 `https://twitframe.com/show?url=${ encodeURIComponent ( value ) } ` ,
@@ -60,11 +60,11 @@ export default function tweetConfig({
6060 } ) ;
6161 }
6262 const regexPattern =
63- / h t t p s : \/ \/ t w i t t e r \. c o m \/ ( [ \w ] + ) \/ s t a t u s \/ ( \d + ) / ;
63+ / h t t p s : \/ \/ (?: t w i t t e r \. c o m | x \. c o m ) \/ ( [ \w ] + ) \/ s t a t u s \/ ( \d + ) / ;
6464 if ( ! text || ! text . match ( regexPattern ) ) {
6565 return ctx . createError ( {
6666 message :
67- "Must match format https://twitter.com/[user]/status/[id]" ,
67+ "Must match format https://twitter.com/[user]/status/[id] or https://x.com/[user]/status/[id] " ,
6868 } ) ;
6969 }
7070 // TODO automatically transform this serverside for easier API usage?
You can’t perform that action at this time.
0 commit comments