Skip to content

Commit

Permalink
fix: reference db implementation
Browse files Browse the repository at this point in the history
Signed-off-by: IAmTomahawkx <iamtomahawkx@gmail.com>
  • Loading branch information
IAmTomahawkx committed Nov 26, 2024
1 parent c2a0efe commit 77aafd0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ impl AbstractServerMembers for ReferenceDb {
/// Fetch multiple members by their ids
async fn fetch_members<'a>(&self, server_id: &str, ids: &'a [String]) -> Result<Vec<Member>> {
let server_members = self.server_members.lock().await;
ids.iter()
.map(|id| {
Ok(ids
.iter()
.filter_map(|id| {
server_members
.get(&MemberCompositeKey {
server: server_id.to_string(),
user: id.to_string(),
})
.cloned()
.ok_or_else(|| create_error!(NotFound))
})
.collect()
.collect())
}

/// Fetch member count of a server
Expand Down

0 comments on commit 77aafd0

Please sign in to comment.