Merge pull request 'Update create_history_stream to take args struct' (#135) from history_stream_args into main
Reviewed-on: #135
This commit is contained in:
@ -12,7 +12,11 @@ use async_std::task;
|
|||||||
use dirs;
|
use dirs;
|
||||||
use futures::stream::TryStreamExt;
|
use futures::stream::TryStreamExt;
|
||||||
use golgi::{
|
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 log::debug;
|
||||||
use peach_lib::config_manager;
|
use peach_lib::config_manager;
|
||||||
@ -133,7 +137,8 @@ pub fn latest_sequence_number() -> Result<u64, Box<dyn Error>> {
|
|||||||
// retrieve the local id
|
// retrieve the local id
|
||||||
let id = sbot_client.whoami().await?;
|
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?;
|
let mut msgs: Vec<SsbMessageKVT> = history_stream.try_collect().await?;
|
||||||
|
|
||||||
// there will be zero messages when the sbot is run for the first time
|
// there will be zero messages when the sbot is run for the first time
|
||||||
|
Reference in New Issue
Block a user