Update rosu-v2

This commit is contained in:
Natsu Kagami 2024-04-26 12:04:02 -04:00
parent e0664760fb
commit ea1c8d2cac
Signed by: nki
GPG key ID: 55A032EB38B49ADB
5 changed files with 9 additions and 10 deletions

View file

@ -207,9 +207,8 @@ pub mod builders {
};
let now = time::OffsetDateTime::now_utc()
- time::Duration::DAY * self.event_days.unwrap_or(31);
let mut events =
handle_not_found(client.rosu.recent_events(user.user_id).limit(50).await)?
.unwrap_or(vec![]);
let mut events = handle_not_found(client.rosu.recent_activity(user.user_id).await)?
.unwrap_or(vec![]);
events.retain(|e| (now <= e.created_at));
let stats = user.statistics.take().unwrap();
Ok(Some(models::User::from_rosu(user, stats, events)))