Skip to content

Commit

Permalink
refactor: Make subscribe method async and send contract request
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Dec 21, 2024
1 parent 455e24e commit 4fb398d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/src/components/app/freenet_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ impl FreenetApiSynchronizer {
}

/// Subscribes to a chat room owned by the specified room owner.
pub fn subscribe(&mut self, room_owner: &VerifyingKey) {
pub async fn subscribe(&mut self, room_owner: &VerifyingKey) {
log::info!("Subscribing to chat room owned by {:?}", room_owner);
let parameters = Self::prepare_chat_room_parameters(room_owner);
let contract_key = Self::generate_contract_key(parameters);
let _subscribe_request = ContractRequest::Subscribe {
let subscribe_request = ContractRequest::Subscribe {
key: contract_key,
summary: None,
};
// self.web_api.send_request(subscribe_request);
self.sender.request_sender.send(subscribe_request.into()).await.expect("Unable to send request");
}
}

0 comments on commit 4fb398d

Please sign in to comment.