mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 05:26:59 +00:00
Run cargo fmt.
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
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};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
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();
|
||||
}
|
||||
},
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::database::*;
|
||||
use crate::notifications::{events::ClientboundNotification, hive};
|
||||
use crate::notifications::events::ClientboundNotification;
|
||||
use crate::util::result::{Error, Result};
|
||||
|
||||
use futures::try_join;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::database::*;
|
||||
use crate::notifications::{events::ClientboundNotification, hive};
|
||||
use crate::notifications::events::ClientboundNotification;
|
||||
use crate::util::result::{Error, Result};
|
||||
|
||||
use futures::try_join;
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
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;
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user