Skip to content
Snippets Groups Projects
Commit c38977e0 authored by insert's avatar insert
Browse files

Run cargo fmt.

parent 8cbba067
Branches
Tags
No related merge requests found
use crate::database::*;
use crate::notifications::events::ClientboundNotification;
use crate::util::result::{Error, Result};
use crate::{
database::*,
notifications::{events::ClientboundNotification, hive},
};
use mongodb::bson::to_document;
use serde::{Deserialize, Serialize};
......
use serde::{Deserialize, Serialize};
use rauth::auth::Session;
use hive_pubsub::PubSub;
use rauth::auth::Session;
use serde::{Deserialize, Serialize};
use snafu::Snafu;
use super::hive::{get_hive, subscribe_if_exists};
......@@ -95,19 +95,17 @@ pub fn prehandle_hook(notification: &ClientboundNotification) {
.unsubscribe(&user.to_string(), &id.to_string())
.ok();
}
ClientboundNotification::UserRelationship { id, user, status } => {
match status {
RelationshipStatus::None => {
get_hive()
.hive
.unsubscribe(&id.to_string(), &user.to_string())
.ok();
},
_ => {
subscribe_if_exists(id.clone(), user.clone()).ok();
}
ClientboundNotification::UserRelationship { id, user, status } => match status {
RelationshipStatus::None => {
get_hive()
.hive
.unsubscribe(&id.to_string(), &user.to_string())
.ok();
}
}
_ => {
subscribe_if_exists(id.clone(), user.clone()).ok();
}
},
_ => {}
}
}
use crate::database::*;
use crate::notifications::{events::ClientboundNotification, hive};
use crate::notifications::events::ClientboundNotification;
use crate::util::result::{Error, Result};
use futures::try_join;
......
use crate::database::*;
use crate::notifications::{events::ClientboundNotification, hive};
use crate::notifications::events::ClientboundNotification;
use crate::util::result::{Error, Result};
use futures::try_join;
......
use crate::database::*;
use crate::notifications::{events::ClientboundNotification, hive};
use crate::notifications::events::ClientboundNotification;
use crate::util::result::{Error, Result};
use futures::try_join;
use hive_pubsub::PubSub;
use mongodb::bson::doc;
use rocket_contrib::json::JsonValue;
......
use crate::database::*;
use crate::notifications::{events::ClientboundNotification, hive};
use crate::notifications::events::ClientboundNotification;
use crate::util::result::{Error, Result};
use futures::try_join;
use hive_pubsub::PubSub;
use mongodb::bson::doc;
use rocket_contrib::json::JsonValue;
......
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