Update euphoxide
This commit is contained in:
parent
56373135c7
commit
ecedad8f0f
4 changed files with 19 additions and 7 deletions
|
|
@ -264,7 +264,7 @@ impl Room {
|
|||
}
|
||||
|
||||
pub fn auth(&self, password: String) -> Result<(), Error> {
|
||||
let _ = self.conn_tx()?.send(Auth {
|
||||
self.conn_tx()?.send_only(Auth {
|
||||
r#type: AuthOption::Passcode,
|
||||
passcode: Some(password),
|
||||
});
|
||||
|
|
@ -279,7 +279,7 @@ impl Room {
|
|||
}
|
||||
|
||||
pub fn nick(&self, name: String) -> Result<(), Error> {
|
||||
let _ = self.conn_tx()?.send(Nick { name });
|
||||
self.conn_tx()?.send_only(Nick { name });
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
@ -299,7 +299,7 @@ impl Room {
|
|||
}
|
||||
|
||||
pub fn login(&self, email: String, password: String) -> Result<(), Error> {
|
||||
let _ = self.conn_tx()?.send(Login {
|
||||
self.conn_tx()?.send_only(Login {
|
||||
namespace: "email".to_string(),
|
||||
id: email,
|
||||
password,
|
||||
|
|
@ -308,7 +308,7 @@ impl Room {
|
|||
}
|
||||
|
||||
pub fn logout(&self) -> Result<(), Error> {
|
||||
let _ = self.conn_tx()?.send(Logout);
|
||||
self.conn_tx()?.send_only(Logout);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ fn hsl_to_rgb(h: f32, s: f32, l: f32) -> (u8, u8, u8) {
|
|||
}
|
||||
|
||||
pub fn nick_color(nick: &str) -> (u8, u8, u8) {
|
||||
let hue = euphoxide::nick_hue(&EMOJI, nick) as f32;
|
||||
let hue = euphoxide::nick::hue(&EMOJI, nick) as f32;
|
||||
hsl_to_rgb(hue, 1.0, 0.72)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue