File tree Expand file tree Collapse file tree 1 file changed +28
-1
lines changed
Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,14 @@ interface SyndicationTweet {
6969 aspect_ratio ?: [ number , number ] ;
7070 } ;
7171 } > ;
72+ quoted_tweet ?: {
73+ id_str : string ;
74+ text : string ;
75+ user : {
76+ name : string ;
77+ screen_name : string ;
78+ } ;
79+ } ;
7280}
7381
7482/**
@@ -126,7 +134,26 @@ export const twitterHandler: PlatformHandler = {
126134 const cleanedText = tweet . text
127135 . replace ( / h t t p s ? : \/ \/ t \. c o \/ \w + / g, '' ) // Remove t.co URLs
128136 . trim ( ) ;
129- const description = cleanedText ? truncateText ( cleanedText , 500 ) : '' ;
137+
138+ // Build description including quoted tweet if present
139+ let fullDescription = cleanedText || '' ;
140+
141+ if ( tweet . quoted_tweet ) {
142+ const quotedText = tweet . quoted_tweet . text
143+ . replace ( / h t t p s ? : \/ \/ t \. c o \/ \w + / g, '' ) // Remove t.co URLs
144+ . trim ( ) ;
145+
146+ if ( quotedText ) {
147+ const quotedHandle = tweet . quoted_tweet . user . screen_name ;
148+ // Add separator and quoted tweet content
149+ if ( fullDescription ) {
150+ fullDescription += '\n\n' ;
151+ }
152+ fullDescription += `💬 @${ quotedHandle } : ${ quotedText } ` ;
153+ }
154+ }
155+
156+ const description = fullDescription ? truncateText ( fullDescription , 500 ) : '' ;
130157
131158 // Build stats for oEmbed/ActivityPub row
132159 const stats = formatStats ( {
You can’t perform that action at this time.
0 commit comments