mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-13 12:16:54 +00:00
fix: Remove duplicate logging for new user registration
This commit is contained in:
1 file changed
+1
-23
@@ -1,7 +1,7 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use axum::extract::State;
|
||||
use conduwuit::{Err, Result, debug_info, info};
|
||||
use conduwuit::{Err, Result, info};
|
||||
use conduwuit_service::Services;
|
||||
use futures::StreamExt;
|
||||
use lettre::{Address, message::Mailbox};
|
||||
@@ -138,28 +138,6 @@ pub(crate) async fn register_route(
|
||||
(None, None)
|
||||
};
|
||||
|
||||
debug_info!(%user_id, ?device, "New account created via legacy registration");
|
||||
// Only log if the user wasn't registered via an appservice.
|
||||
if body.identity.is_none() {
|
||||
let notice = if device.is_some()
|
||||
&& let Some(device_name) = body.initial_device_display_name.as_ref()
|
||||
{
|
||||
format!(
|
||||
"New user \"{user_id}\" registered on this server from IP {client} and device \
|
||||
display name \"{device_name}\" via legacy registration",
|
||||
)
|
||||
} else {
|
||||
format!(
|
||||
"New user \"{user_id}\" registered on this server from IP {client} via legacy \
|
||||
registration."
|
||||
)
|
||||
};
|
||||
info!("{notice}");
|
||||
if services.server.config.admin_room_notices {
|
||||
services.admin.notice(¬ice).await;
|
||||
}
|
||||
}
|
||||
|
||||
Ok(assign!(register::v3::Response::new(user_id), {
|
||||
access_token: token.map(DeviceToken::into_token),
|
||||
device_id: device,
|
||||
|
||||
Reference in new issue
Block a user