Skip to content

Commit

Permalink
napi too
Browse files Browse the repository at this point in the history
  • Loading branch information
codabrink committed Oct 15, 2024
1 parent aa46bd7 commit a48ea61
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions bindings_node/src/conversations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,20 @@ impl NapiConversations {
))
}

#[napi]
pub fn find_dm_group_by_target_inbox_id(&self, target_inbox_id: String) -> Result<NapiGroup> {
let convo = self
.inner_client
.dm_group_from_target_inbox(target_inbox_id)
.map_err(ErrorWrapper::from)?;

Ok(NapiGroup::new(
self.inner_client.clone(),
convo.group_id,
convo.created_at_ns,
))
}

#[napi]
pub fn find_message_by_id(&self, message_id: String) -> Result<NapiMessage> {
let message_id = hex::decode(message_id).map_err(ErrorWrapper::from)?;
Expand Down

0 comments on commit a48ea61

Please sign in to comment.