aboutsummaryrefslogtreecommitdiffstats
path: root/mumd/src/state/user.rs
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2020-10-29 21:27:48 +0100
committerGustav Sörnäs <gustav@sornas.net>2020-10-29 21:27:48 +0100
commit3e7e375e65760a03b6692106ab0ed806ca65e470 (patch)
treeca30f277a9a81e2920c2637a7ca824ec711c8b6e /mumd/src/state/user.rs
parent7120ef134c952781ab6a6d23b6be390f915372f5 (diff)
parent69ec88d3fc2e3762cf596bbf0226b204ba35d874 (diff)
downloadmum-3e7e375e65760a03b6692106ab0ed806ca65e470.tar.gz
Merge branch 'libnotify' into main
Diffstat (limited to 'mumd/src/state/user.rs')
-rw-r--r--mumd/src/state/user.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/mumd/src/state/user.rs b/mumd/src/state/user.rs
index 679d0ff..848208c 100644
--- a/mumd/src/state/user.rs
+++ b/mumd/src/state/user.rs
@@ -1,4 +1,3 @@
-use log::*;
use mumble_protocol::control::msgs;
use serde::{Deserialize, Serialize};
@@ -80,7 +79,6 @@ impl User {
}
pub fn apply_user_diff(&mut self, diff: &mumlib::state::UserDiff) {
- debug!("applying user diff\n{:#?}", diff);
if let Some(comment) = diff.comment.clone() {
self.comment = Some(comment);
}
@@ -111,13 +109,11 @@ impl User {
if let Some(deaf) = diff.deaf {
self.deaf = deaf;
}
-
if let Some(channel_id) = diff.channel_id {
self.channel = channel_id;
}
}
-
pub fn name(&self) -> &str {
&self.name
}
@@ -125,6 +121,14 @@ impl User {
pub fn channel(&self) -> u32 {
self.channel
}
+
+ pub fn self_mute(&self) -> bool {
+ self.self_mute
+ }
+
+ pub fn self_deaf(&self) -> bool {
+ self.self_deaf
+ }
}
impl From<&User> for mumlib::state::User {