mirror of
https://framagit.org/veretcle/scootaloo.git
synced 2025-07-20 17:11:19 +02:00
refactor: get mastodon token after ensuring feed is not empty
This commit is contained in:
@@ -57,9 +57,6 @@ pub async fn run(config: Config) {
|
||||
.map(|s| s.tweet_id);
|
||||
drop(lconn);
|
||||
|
||||
// get Mastodon instance
|
||||
let mastodon = get_mastodon_token(&mastodon_config);
|
||||
|
||||
// get user timeline feed (Vec<tweet>)
|
||||
let mut feed =
|
||||
get_user_timeline(&mastodon_config.twitter_screen_name, &token, last_tweet_id)
|
||||
@@ -77,6 +74,9 @@ pub async fn run(config: Config) {
|
||||
return;
|
||||
}
|
||||
|
||||
// get Mastodon instance
|
||||
let mastodon = get_mastodon_token(&mastodon_config);
|
||||
|
||||
// order needs to be chronological
|
||||
feed.reverse();
|
||||
|
||||
|
Reference in New Issue
Block a user