Commit 13395f89 authored by Christopher Davis's avatar Christopher Davis

Switch unwrap for match statement

parent 9f36187a
Pipeline #9956 passed with stage
in 13 minutes and 29 seconds
......@@ -1632,8 +1632,10 @@ impl AppOp {
let mut prev = None;
for msg in msgs.iter() {
let mut should_notify = msg.body.contains(&self.username.clone()?) || {
let r = self.rooms.get(&msg.room).unwrap();
r.direct
match self.rooms.get(&msg.room) {
None => false,
Some(r) => r.direct,
}
};
// not notifying the initial messages
should_notify = should_notify && !init;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment