✖️ replace pgp crate

This commit is contained in:
JMARyA 2022-11-14 22:07:09 +01:00
parent 31c20fff10
commit 4ddadfdce9
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
6 changed files with 30 additions and 704 deletions

View file

@ -13,8 +13,7 @@ pub struct MessageForm {
#[post("/message")]
pub async fn message_post(r: HttpRequest, f: Form<MessageForm>) -> impl Responder {
let config: &web::Data<config::Config> = r.app_data().unwrap();
let cipher = crate::msg::encrypt(f.message.to_string());
crate::msg::save_msg(cipher, &f.msg_name.to_string());
crate::msg::save_msg(f.message.clone(), &f.msg_name.to_string());
crate::notification::notify(
&format!("New Message from {}", f.msg_name.to_string()),
"New Message",