feat: support user password resets
This commit is contained in:
parent
1ce03059a0
commit
ada07de204
5 changed files with 108 additions and 3 deletions
|
@ -1491,7 +1491,11 @@ impl Rooms {
|
|||
let server_user = format!("@conduit:{}", db.globals.server_name());
|
||||
|
||||
let to_conduit = body.starts_with(&format!("{}: ", server_user));
|
||||
let from_conduit = pdu.sender == server_user;
|
||||
|
||||
// This will evaluate to false if the emergency password is set up so that
|
||||
// the administrator can execute commands as conduit
|
||||
let from_conduit =
|
||||
pdu.sender == server_user && db.globals.emergency_password().is_none();
|
||||
|
||||
if to_conduit && !from_conduit && admin_room.as_ref() == Some(&pdu.room_id) {
|
||||
db.admin.process_message(body.to_string());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue