mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-08-18 23:34:53 +02:00
fix: don't allow inviting other users (not implemented yet)
This commit is contained in:
parent
4c4e1f9027
commit
e815486030
|
@ -152,6 +152,13 @@ pub async fn invite_user_route(
|
|||
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
|
||||
|
||||
if let invite_user::IncomingInvitationRecipient::UserId { user_id } = &body.recipient {
|
||||
if body.room_id.server_name() != db.globals.server_name() {
|
||||
return Err(Error::BadRequest(
|
||||
ErrorKind::Forbidden,
|
||||
"Inviting users from other homeservers is not implemented yet.",
|
||||
));
|
||||
}
|
||||
|
||||
db.rooms.build_and_append_pdu(
|
||||
PduBuilder {
|
||||
event_type: EventType::RoomMember,
|
||||
|
|
Loading…
Reference in a new issue