summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-12-06 16:51:48 +0100
committerMatthias Beyer <mail@beyermatthias.de>2021-12-06 16:52:11 +0100
commit92f0e2912be7b6ba30a72a8530a66ddba41700f1 (patch)
tree08d1b7dce7ad17200af330dbc04261a173bbd506 /src
parent334929dec001361ca883df22542e1d8dc4cbff1c (diff)
Add Profile::head() to get Cid of latest post
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src')
-rw-r--r--src/profile/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/profile/mod.rs b/src/profile/mod.rs
index 440ef23..e82a939 100644
--- a/src/profile/mod.rs
+++ b/src/profile/mod.rs
@@ -57,6 +57,10 @@ impl Profile {
Ok(Profile { state, client })
}
+ pub fn head(&self) -> &cid::Cid {
+ self.state.profile_head()
+ }
+
async fn post_hello_world(client: &Client, name: &str) -> Result<cid::Cid> {
let text = format!("Hello world, I am {}", name);
client.post_text_node(vec![], text).await