add: order dms by last message time

This commit is contained in:
trisua 2025-06-15 18:55:19 -04:00
parent 0af95e517d
commit 9443bfb58d
6 changed files with 29 additions and 6 deletions

View file

@ -164,7 +164,15 @@ macro_rules! auto_method {
.get(format!($cache_key_tmpl, selector.to_string()))
.await
{
return Ok(serde_json::from_str(&cached).unwrap());
match serde_json::from_str(&cached) {
Ok(x) => return Ok(x),
Err(_) => {
self.0
.1
.remove(format!($cache_key_tmpl, selector.to_string()))
.await
}
};
}
let conn = match self.0.connect().await {