update create history stream to take args struct
This commit is contained in:
parent
c83a22461d
commit
d5a2390e29
|
@ -12,7 +12,11 @@ use async_std::task;
|
|||
use dirs;
|
||||
use futures::stream::TryStreamExt;
|
||||
use golgi::{
|
||||
api::friends::RelationshipQuery, blobs, messages::SsbMessageKVT, sbot::Keystore, Sbot,
|
||||
api::{friends::RelationshipQuery, history_stream::CreateHistoryStream},
|
||||
blobs,
|
||||
messages::SsbMessageKVT,
|
||||
sbot::Keystore,
|
||||
Sbot,
|
||||
};
|
||||
use log::debug;
|
||||
use peach_lib::config_manager;
|
||||
|
@ -133,7 +137,8 @@ pub fn latest_sequence_number() -> Result<u64, Box<dyn Error>> {
|
|||
// retrieve the local id
|
||||
let id = sbot_client.whoami().await?;
|
||||
|
||||
let history_stream = sbot_client.create_history_stream(id).await?;
|
||||
let args = CreateHistoryStream::new(id).keys_values(true, true);
|
||||
let history_stream = sbot_client.create_history_stream(args).await?;
|
||||
let mut msgs: Vec<SsbMessageKVT> = history_stream.try_collect().await?;
|
||||
|
||||
// there will be zero messages when the sbot is run for the first time
|
||||
|
|
Loading…
Reference in New Issue