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) => {
46
46
async function renderPost ( p : Entity . FollowingUpdate ) {
47
47
const texts : string [ ] = [ ]
48
48
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
+ }
50
68
} else if ( p . type === 'ORIGINAL_POST' ) {
51
69
const link = isMacOS
52
70
? logger . colors . gray (
@@ -63,7 +81,7 @@ async function renderPost(p: Entity.FollowingUpdate) {
63
81
if ( p . pictures && p . pictures . length > 0 ) {
64
82
const images = await Promise . all (
65
83
p . pictures . map ( ( p ) =>
66
- displayImage ( p . middlePicUrl ) . then ( ( { result } ) => result )
84
+ displayImage ( p . middlePicUrl ) . then ( ( { result } ) => ` ${ result } \n` )
67
85
)
68
86
)
69
87
texts . push ( ...images )
You can’t perform that action at this time.
0 commit comments