mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-14 04:37:00 +00:00
chore: Move registration notice logic
This commit is contained in:
5 files changed
+39
-33
No files matched your search
@@ -7,7 +7,7 @@ use axum::{
|
||||
routing::{get, on},
|
||||
};
|
||||
use conduwuit_api::client_ip::ClientIp;
|
||||
use conduwuit_core::{config::TermsDocument, info, warn};
|
||||
use conduwuit_core::{config::TermsDocument, warn};
|
||||
use conduwuit_service::{
|
||||
mailer::messages,
|
||||
registration_tokens::ValidToken,
|
||||
@@ -527,7 +527,7 @@ async fn complete_registration(
|
||||
) -> Result<Redirect> {
|
||||
services
|
||||
.users
|
||||
.create_local_account(&user_id, Some(password_hash), email)
|
||||
.create_local_account(&user_id, Some(password_hash), email, Some(client), None)
|
||||
.await?;
|
||||
|
||||
if let Some(registration_token) = registration_token {
|
||||
@@ -536,13 +536,6 @@ async fn complete_registration(
|
||||
.mark_token_as_used(registration_token);
|
||||
}
|
||||
|
||||
let notice = format!("New user \"{user_id}\" registered on this server from IP {client}.");
|
||||
|
||||
info!("{notice}");
|
||||
if services.server.config.admin_room_notices {
|
||||
services.admin.notice(¬ice).await;
|
||||
}
|
||||
|
||||
let user_session = UserSession { user_id, last_login: SystemTime::now() };
|
||||
|
||||
session_store
|
||||
|
||||
Reference in new issue
Block a user