From eb2e3b3bb70af18ad0821d046fe51926977b5d0a Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Sun, 29 Jun 2025 01:52:02 +0100 Subject: [PATCH] fix: Missing suspensions shouldn't error Turns out copying and pasting the function above verbatim actually introduces more problems than it solves! --- src/service/users/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/service/users/mod.rs b/src/service/users/mod.rs index f6a98858..d80a7e22 100644 --- a/src/service/users/mod.rs +++ b/src/service/users/mod.rs @@ -2,7 +2,7 @@ use std::{collections::BTreeMap, mem, sync::Arc}; use conduwuit::{ 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 futures::{Stream, StreamExt, TryFutureExt}; @@ -176,8 +176,7 @@ impl Service { self.db .userid_suspended .get(user_id) - .map_ok(|val| !val.is_empty()) - .map_err(|_| err!(Request(NotFound("User does not exist.")))) + .map_ok_or(Ok(false), |_| Ok(true)) .await }