File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -249,12 +249,14 @@ export class ClientBase extends EventEmitter {
249
249
return homeTimeline . tweets ;
250
250
}
251
251
252
- async fetchHomeTimeline ( count : number ) : Promise < Tweet [ ] > {
252
+ /**
253
+ * Fetch timeline for twitter account, optionally only from followed accounts
254
+ */
255
+ async fetchHomeTimeline ( count : number , following ?: boolean ) : Promise < Tweet [ ] > {
253
256
elizaLogger . debug ( "fetching home timeline" ) ;
254
- const homeTimeline = await this . twitterClient . fetchHomeTimeline (
255
- count ,
256
- [ ]
257
- ) ;
257
+ const homeTimeline = following
258
+ ? await this . twitterClient . fetchFollowingTimeline ( count , [ ] )
259
+ : await this . twitterClient . fetchHomeTimeline ( count , [ ] ) ;
258
260
259
261
elizaLogger . debug ( homeTimeline , { depth : Infinity } ) ;
260
262
const processedTimeline = homeTimeline
You can’t perform that action at this time.
0 commit comments