From 0aeed5578e01cbc1b302b5255a9d5f8791e8c27b Mon Sep 17 00:00:00 2001 From: notplants Date: Wed, 29 Dec 2021 11:48:53 -0500 Subject: [PATCH] Working on profile --- src/sbot.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/sbot.rs b/src/sbot.rs index 4ff8608..341ee03 100644 --- a/src/sbot.rs +++ b/src/sbot.rs @@ -153,6 +153,23 @@ impl Sbot { self.publish(msg).await } + + + /// Get the about messages for a particular user. + pub async fn get_about_messages(&mut self, ssb_id: String) -> Result { + let req_id = self.client.getsubset_req_send(query).await?; + + utils::get_async_until_eof(&mut self.rpc_reader, req_id, utils::kvt_res_parse).await + } + + + /// Get the latest description for a particular user from their about messages. + pub async fn get_description(&mut self, ssb_id: String) -> Result { + let req_id = self.client.getsubset_req_send(query).await?; + + utils::get_async_until_eof(&mut self.rpc_reader, req_id, utils::kvt_res_parse).await + } + /// Call the `createHistoryStream` RPC method and return a vector /// of SsbMessageValue. pub async fn create_history_stream(