@@ -24,7 +24,8 @@ use crate::{
2424 platform:: { PlatformMetadata , PlatformTrait } ,
2525 source:: {
2626 DocumentRef , FileRef , LiveStatus , LiveStatusKind , Notification , NotificationKind ,
27- PlaybackFormat , PlaybackRef , Post , PostAttachment , PostUrl , PostsRef , StatusSource ,
27+ PlaybackFormat , PlaybackRef , Post , PostAttachment , PostUrl , PostsRef , RepostFrom ,
28+ StatusSource ,
2829 } ,
2930} ;
3031
@@ -436,21 +437,29 @@ impl Notifier {
436437 text. push_plain ( "\n " ) ;
437438 }
438439
439- text. push_quote ( |text| {
440- text. push_plain ( "🔁 " ) ;
441-
442- // In order for Telegram to display more relevant information about the
443- // post, we don't use `profile_url` here
444- //
445- // &repost_from.user.profile_url,
446- if let PostUrl :: Clickable ( url) = & repost_from. post . urls_recursive ( ) . major ( ) {
447- text. push_link ( & repost_from. post . user . nickname , & url. url ) ;
448- } else {
449- text. push_plain ( & repost_from. post . user . nickname ) ;
440+ fn push_reposts_rec < ' a > ( text : & mut Text < ' a > , repost_from : & ' a RepostFrom ) {
441+ text. push_quote ( |text| {
442+ text. push_plain ( "🔁 " ) ;
443+
444+ // In order for Telegram to display more relevant information about the
445+ // post, we don't use `profile_url` here
446+ //
447+ // &repost_from.post.user.profile_url,
448+ if let PostUrl :: Clickable ( url) = & repost_from. post . urls_recursive ( ) . major ( )
449+ {
450+ text. push_link ( & repost_from. post . user . nickname , & url. url ) ;
451+ } else {
452+ text. push_plain ( & repost_from. post . user . nickname ) ;
453+ }
454+ text. push_plain ( ": " ) ;
455+ text. push_content ( & repost_from. post . content ) ;
456+ } ) ;
457+ if let Some ( repost_from) = & repost_from. post . repost_from {
458+ text. push_plain ( "\n " ) ;
459+ push_reposts_rec ( text, repost_from) ;
450460 }
451- text. push_plain ( ": " ) ;
452- text. push_content ( & repost_from. post . content ) ;
453- } ) ;
461+ }
462+ push_reposts_rec ( & mut text, repost_from) ;
454463 }
455464 None => {
456465 if self . params . base . option . author_name {
0 commit comments