File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
plugins/domains/twitter.com Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,20 @@ export default {
4242 return cb ( {
4343 responseStatusCode : 404 ,
4444 message : 'The tweet is no longer available.'
45- } )
45+ } ) ;
4646
4747 } else if ( response . statusCode === 403 ) {
48- return cb ( {
49- responseStatusCode : 404 ,
50- message : 'It looks this Twitter account has been suspended.'
51- } )
48+ if ( / n o t \s a u t h o r i z e d / i. test ( oembed . error ) ) { // ex. https://x.com/zoolininfts/status/1928051687077314857
49+ return cb ( {
50+ responseStatusCode : 403 ,
51+ message : 'Permission error, perhaps the content is age-restricted on Twitter.'
52+ } ) ;
53+ } else {
54+ return cb ( {
55+ responseStatusCode : 404 ,
56+ message : 'It looks this Twitter account has been suspended.'
57+ } ) ;
58+ }
5259
5360 } else if ( response . statusCode !== 200 ) {
5461 return cb ( 'Non-200 response from Twitter API (statuses/oembed.json: ' + response . statusCode ) ;
You can’t perform that action at this time.
0 commit comments