Update euphoxide
This fixes authentication for rooms requiring passwords
This commit is contained in:
parent
7568fb3434
commit
65fa1b8afd
4 changed files with 19 additions and 17 deletions
|
|
@ -95,12 +95,14 @@ impl EuphRoom {
|
|||
self.vault().room()
|
||||
}
|
||||
|
||||
pub fn connect(&mut self, next_instance_id: &mut u32) {
|
||||
pub fn connect(&mut self, next_instance_id: &mut usize) {
|
||||
if self.room.is_none() {
|
||||
let room = self.vault().room();
|
||||
let instance_config = self
|
||||
.server_config
|
||||
.clone()
|
||||
.room(*next_instance_id, self.vault().room().to_string())
|
||||
.room(self.vault().room().to_string())
|
||||
.name(format!("{room}-{}", next_instance_id))
|
||||
.username(self.config.username.clone())
|
||||
.force_username(self.config.force_username)
|
||||
.password(self.config.password.clone());
|
||||
|
|
@ -680,9 +682,9 @@ impl EuphRoom {
|
|||
Some(room) => room,
|
||||
};
|
||||
|
||||
if event.config().id != room.instance().config().id {
|
||||
// If we allowed ids other than the current one, old instances that
|
||||
// haven't yet shut down properly could mess up our state.
|
||||
if event.config().name != room.instance().config().name {
|
||||
// If we allowed names other than the current one, old instances
|
||||
// that haven't yet shut down properly could mess up our state.
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ pub struct Rooms {
|
|||
order: Order,
|
||||
|
||||
euph_server_config: ServerConfig,
|
||||
euph_next_instance_id: u32,
|
||||
euph_next_instance_id: usize,
|
||||
euph_rooms: HashMap<String, EuphRoom>,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue