fix: Missing suspensions shouldn't error

Turns out copying and pasting the function
above verbatim actually introduces more
problems than it solves!
This commit is contained in:
nexy7574 2025-06-29 01:52:02 +01:00 committed by Ellis Git
parent 72f8cb3038
commit eb2e3b3bb7

View file

@ -2,7 +2,7 @@ use std::{collections::BTreeMap, mem, sync::Arc};
use conduwuit::{ use conduwuit::{
Err, Error, Result, Server, at, debug_warn, err, trace, Err, Error, Result, Server, at, debug_warn, err, trace,
utils::{self, ReadyExt, stream::TryIgnore, string::Unquoted}, utils::{self, ReadyExt, TryFutureExtExt, stream::TryIgnore, string::Unquoted},
}; };
use database::{Deserialized, Ignore, Interfix, Json, Map}; use database::{Deserialized, Ignore, Interfix, Json, Map};
use futures::{Stream, StreamExt, TryFutureExt}; use futures::{Stream, StreamExt, TryFutureExt};
@ -176,8 +176,7 @@ impl Service {
self.db self.db
.userid_suspended .userid_suspended
.get(user_id) .get(user_id)
.map_ok(|val| !val.is_empty()) .map_ok_or(Ok(false), |_| Ok(true))
.map_err(|_| err!(Request(NotFound("User does not exist."))))
.await .await
} }