incorporate keystore change from golgi

This commit is contained in:
2022-05-13 13:09:03 +02:00
parent 4cd2692b9a
commit 039cbcdfc4
2 changed files with 10 additions and 6 deletions

View File

@ -1,5 +1,5 @@
use async_std::task;
use golgi::Sbot;
use golgi::{sbot::Keystore, Sbot};
use log::debug;
use nanorand::{Rng, WyRand};
use sha3::{Digest, Sha3_256};
@ -126,11 +126,13 @@ async fn publish_private_msg(msg: &str, recipient: &str) -> Result<(), String> {
// TODO: panics if we pass `Some(conf.shscap)` as second arg
Some(conf) => {
let ip_port = conf.lis.clone();
Sbot::init(Some(ip_port), None)
Sbot::init(Keystore::GoSbot, Some(ip_port), None)
.await
.map_err(|e| e.to_string())?
}
None => Sbot::init(None, None).await.map_err(|e| e.to_string())?,
None => Sbot::init(Keystore::GoSbot, None, None)
.await
.map_err(|e| e.to_string())?,
};
debug!("Publishing a Scuttlebutt private message with temporary password");