From b0b25329768b75e8303bffcccdba918d6f8f1eab Mon Sep 17 00:00:00 2001 From: glyph Date: Wed, 18 May 2022 09:03:18 +0200 Subject: [PATCH] messy implementation used for lykin testing --- src/api/history_stream.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/api/history_stream.rs b/src/api/history_stream.rs index 1a2e4d1..b475321 100644 --- a/src/api/history_stream.rs +++ b/src/api/history_stream.rs @@ -7,7 +7,12 @@ use async_std::stream::Stream; use kuska_ssb::api::dto::CreateHistoryStreamIn; -use crate::{error::GolgiError, messages::SsbMessageValue, sbot::Sbot, utils}; +use crate::{ + error::GolgiError, + messages::{SsbMessageKVT, SsbMessageValue}, + sbot::Sbot, + utils, +}; impl Sbot { /// Call the `createHistoryStream` RPC method. @@ -38,9 +43,11 @@ impl Sbot { pub async fn create_history_stream( &mut self, id: String, - ) -> Result>, GolgiError> { + //) -> Result>, GolgiError> { + ) -> Result>, GolgiError> { let mut sbot_connection = self.get_sbot_connection().await?; - let args = CreateHistoryStreamIn::new(id); + let args = CreateHistoryStreamIn::new(id).keys_values(true, true); + //.limit(10); let req_id = sbot_connection .client .create_history_stream_req_send(&args) @@ -48,7 +55,8 @@ impl Sbot { let history_stream = utils::get_source_stream( sbot_connection.rpc_reader, req_id, - utils::ssb_message_res_parse, + //utils::ssb_message_res_parse, + utils::kvt_res_parse, ) .await; Ok(history_stream)