Add edit message route.

This commit is contained in:
Paul Makles
2021-01-18 20:54:08 +00:00
parent ba08746e92
commit accd6d7789
9 changed files with 90 additions and 5 deletions

View File

@@ -58,4 +58,24 @@ impl Message {
Ok(())
}
pub async fn publish_edit(self) -> Result<()> {
let channel = self.channel.clone();
ClientboundNotification::MessageEdit(self)
.publish(channel)
.await
.ok();
Ok(())
}
pub async fn publish_delete(self) -> Result<()> {
let channel = self.channel.clone();
ClientboundNotification::MessageDelete(self.id)
.publish(channel)
.await
.ok();
Ok(())
}
}