mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 05:26:59 +00:00
Cargo fmt.
This commit is contained in:
@@ -78,10 +78,12 @@ impl Message {
|
||||
})?;
|
||||
|
||||
let channel = self.channel.clone();
|
||||
ClientboundNotification::MessageDelete { id: self.id.clone() }
|
||||
.publish(channel)
|
||||
.await
|
||||
.ok();
|
||||
ClientboundNotification::MessageDelete {
|
||||
id: self.id.clone(),
|
||||
}
|
||||
.publish(channel)
|
||||
.await
|
||||
.ok();
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -112,10 +112,7 @@ pub fn prehandle_hook(notification: &ClientboundNotification) {
|
||||
pub fn posthandle_hook(notification: &ClientboundNotification) {
|
||||
match ¬ification {
|
||||
ClientboundNotification::ChannelDelete { id } => {
|
||||
get_hive()
|
||||
.hive
|
||||
.drop_topic(&id)
|
||||
.ok();
|
||||
get_hive().hive.drop_topic(&id).ok();
|
||||
}
|
||||
ClientboundNotification::UserRelationship { id, user, status } => {
|
||||
if status == &RelationshipStatus::None {
|
||||
@@ -123,7 +120,7 @@ pub fn posthandle_hook(notification: &ClientboundNotification) {
|
||||
.hive
|
||||
.unsubscribe(&id.to_string(), &user.to_string())
|
||||
.ok();
|
||||
}
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ pub async fn req(user: User, target: Ref) -> Result<()> {
|
||||
|
||||
target.publish_update(json!({ "owner": new_owner })).await?;
|
||||
} else {
|
||||
return target.delete().await
|
||||
return target.delete().await;
|
||||
}
|
||||
} else {
|
||||
get_collection("channels")
|
||||
|
||||
@@ -50,5 +50,7 @@ pub async fn req(user: User, target: Ref, msg: Ref, edit: Json<Data>) -> Result<
|
||||
with: "message",
|
||||
})?;
|
||||
|
||||
message.publish_update(json!({ "content": edit.content, "edited": DateTime(edited) })).await
|
||||
message
|
||||
.publish_update(json!({ "content": edit.content, "edited": DateTime(edited) }))
|
||||
.await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user