Make RPC client's current user_id observable
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
co-authored by
Antonio Scandurra
parent
9b636fb81e
commit
39ad7f6a60
+7
-2
@@ -206,7 +206,8 @@ impl Channel {
|
||||
}
|
||||
});
|
||||
Ok(())
|
||||
}.log_err()
|
||||
}
|
||||
.log_err()
|
||||
})
|
||||
.detach();
|
||||
cx.notify();
|
||||
@@ -222,7 +223,11 @@ impl Channel {
|
||||
}
|
||||
|
||||
fn current_user_id(&self) -> Result<u64> {
|
||||
self.rpc.user_id().ok_or_else(|| anyhow!("not logged in"))
|
||||
self
|
||||
.rpc
|
||||
.user_id()
|
||||
.borrow()
|
||||
.ok_or_else(|| anyhow!("not logged in"))
|
||||
}
|
||||
|
||||
fn handle_message_sent(
|
||||
|
||||
Reference in New Issue
Block a user