Skip to content

Commit

Permalink
Updated DB Fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieobject committed Apr 8, 2024
1 parent 2502163 commit cfccb0c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions xmtp_mls/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,7 @@ where
let conn = &mut self.store.conn()?;
let stored_group: Option<StoredGroup> = conn.fetch(&group_id)?;
match stored_group {
// EM: Will neeed to update StoredGroup and pass added_by_id here....
Some(group) => Ok(MlsGroup::new(self, group.id, group.created_at_ns, None)),
Some(group) => Ok(MlsGroup::new(self, group.id, group.created_at_ns, group.added_by_address)),
None => Err(ClientError::Generic("group not found".to_string())),
}
}
Expand All @@ -248,8 +247,7 @@ where
.conn()?
.find_groups(allowed_states, created_after_ns, created_before_ns, limit)?
.into_iter()
// EM: Will neeed to update StoredGroup and pass added_by_id here....
.map(|stored_group| MlsGroup::new(self, stored_group.id, stored_group.created_at_ns, None))
.map(|stored_group| MlsGroup::new(self, stored_group.id, stored_group.created_at_ns, stored_group.added_by_address))
.collect())
}

Expand Down

0 comments on commit cfccb0c

Please sign in to comment.