pub(crate) async fn restore_last_session( state: &AppState, ) -> Result<Option<(String, Vec<Event>)>, String>