File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ const BEARER_TOKEN = import.meta.env.BEARER_TOKEN;
10
10
const isFetch = ENVIRONMENT !== ' development' && Boolean (BEARER_TOKEN );
11
11
12
12
const tweetIds = [
13
+ ' 1729181106715632088' ,
14
+ ' 1729157761215369264' ,
15
+ ' 1727040036334424406' ,
16
+ ' 1726807293583609935' ,
13
17
' 1714023231689031941' ,
14
18
' 1696221274039595363' ,
15
19
' 1693944495472046382' ,
Original file line number Diff line number Diff line change 1
1
export const replaceShortenedUrls = ( tweet : TweetWithUser ) => {
2
- if ( ! tweet . entities . urls ) return tweet ;
3
- let text = tweet . note_tweet ?. text ?? tweet . text ;
2
+ let text = ( tweet . note_tweet ?. text ?? tweet . text ) . replace ( / ^ ( @ [ ^ ] + ) * / , '' ) ;
3
+ if ( ! tweet . entities . urls ) return { ... tweet , text } ;
4
4
tweet . entities . urls . sort ( ( a , b ) => b . start - a . start ) ;
5
5
tweet . entities . urls . forEach ( urlEntity => {
6
6
if ( urlEntity . media_key ) {
You can’t perform that action at this time.
0 commit comments