File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,25 @@ const viewFeeds = async (opts: FeedOptions) => {
4646async function renderPost ( p : Entity . FollowingUpdate ) {
4747 const texts : string [ ] = [ ]
4848 if ( p . type === 'PERSONAL_UPDATE' ) {
49- texts . push ( `${ displayUsers ( p . users ) } 关注了 ${ displayUsers ( p . targetUsers ) } ` )
49+ switch ( p . action ) {
50+ case 'LIVE_SHARE' :
51+ texts . push (
52+ // @ts -expect-error
53+ `${ displayUsers ( p . users ) } ${ p . verb } ` ,
54+ // @ts -expect-error
55+ ( await displayImage ( p . live . picture . picUrl ) ) . result ,
56+ // @ts -expect-error
57+ p . live . title
58+ )
59+ break
60+ case 'USER_FOLLOW' :
61+ texts . push (
62+ `${ displayUsers ( p . users ) } 关注了 ${ displayUsers ( p . targetUsers ) } `
63+ )
64+ break
65+ default :
66+ texts . push ( `unsupported action: ${ p . action } ` )
67+ }
5068 } else if ( p . type === 'ORIGINAL_POST' ) {
5169 const link = isMacOS
5270 ? logger . colors . gray (
@@ -63,7 +81,7 @@ async function renderPost(p: Entity.FollowingUpdate) {
6381 if ( p . pictures && p . pictures . length > 0 ) {
6482 const images = await Promise . all (
6583 p . pictures . map ( ( p ) =>
66- displayImage ( p . middlePicUrl ) . then ( ( { result } ) => result )
84+ displayImage ( p . middlePicUrl ) . then ( ( { result } ) => ` ${ result } \n` )
6785 )
6886 )
6987 texts . push ( ...images )
You can’t perform that action at this time.
0 commit comments