Send reset game password via XMPP
Dependencies
- [2]
4JK5O45HStart support for XMPP game password change - [3]
I6SOPEQFCreate and store reset password token - [*]
HZDCKIXQUse constants for templates - [*]
ZRU62WXDSend email with change game password link
Change contents
- edit in src/pages/query_reset_game_pwd.rs at line 68[6.711][6.711]
Ok(())}async fn send_xmpp(xmpp_url: &str,token_url: String,to: &str,) -> Result<(), Box<dyn std::error::Error>> {let client = awc::Client::default();client.post(xmpp_url).insert_header(("X-XMPP-To", to)).send_body(format!("You requested change for FreeOrion game password.\n\Use next link {} to enter new password. Link is active for 24 hours.\n\Don't send it to other people.",token_url)).await?; - replacement in src/pages/query_reset_game_pwd.rs at line 191
Protocol::Xmpp => {}Protocol::Xmpp => {if let Err(e) = send_xmpp(&data.xmpp_url, token_url, &form.contact).await {log::error!("Cann't send xmpp: {}", e);return HttpResponse::ServiceUnavailable().body(actix_web::body::None::new());}}