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
20
Cargo.lock
generated
20
Cargo.lock
generated
|
|
@ -114,9 +114,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap"
|
name = "clap"
|
||||||
version = "4.1.4"
|
version = "4.1.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f13b9c79b5d1dd500d20ef541215a6423c75829ef43117e1b4d17fd8af0b5d76"
|
checksum = "ec0b0588d44d4d63a87dbd75c136c166bbfd9a86a31cb89e09906521c7d3f5e3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"clap_derive",
|
"clap_derive",
|
||||||
|
|
@ -319,8 +319,8 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "euphoxide"
|
name = "euphoxide"
|
||||||
version = "0.3.0"
|
version = "0.3.1"
|
||||||
source = "git+https://github.com/Garmelon/euphoxide.git?rev=069e4e02c77e5bc649cd770af8183d8be8cd52f5#069e4e02c77e5bc649cd770af8183d8be8cd52f5"
|
source = "git+https://github.com/Garmelon/euphoxide.git?tag=v0.3.1#1844cddcc01696ef4d04c957de8b84d6247d9332"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"caseless",
|
"caseless",
|
||||||
|
|
@ -1146,9 +1146,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "time"
|
name = "time"
|
||||||
version = "0.3.17"
|
version = "0.3.20"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376"
|
checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itoa",
|
"itoa",
|
||||||
"serde",
|
"serde",
|
||||||
|
|
@ -1164,9 +1164,9 @@ checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "time-macros"
|
name = "time-macros"
|
||||||
version = "0.2.6"
|
version = "0.2.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2"
|
checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"time-core",
|
"time-core",
|
||||||
]
|
]
|
||||||
|
|
@ -1230,9 +1230,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio-stream"
|
name = "tokio-stream"
|
||||||
version = "0.1.11"
|
version = "0.1.12"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce"
|
checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures-core",
|
"futures-core",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ features = ["rustls-tls-native-roots"]
|
||||||
|
|
||||||
[dependencies.euphoxide]
|
[dependencies.euphoxide]
|
||||||
git = "https://github.com/Garmelon/euphoxide.git"
|
git = "https://github.com/Garmelon/euphoxide.git"
|
||||||
rev = "069e4e02c77e5bc649cd770af8183d8be8cd52f5"
|
tag = "v0.3.1"
|
||||||
features = ["bot"]
|
features = ["bot"]
|
||||||
|
|
||||||
# [patch."https://github.com/Garmelon/euphoxide.git"]
|
# [patch."https://github.com/Garmelon/euphoxide.git"]
|
||||||
|
|
|
||||||
|
|
@ -95,12 +95,14 @@ impl EuphRoom {
|
||||||
self.vault().room()
|
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() {
|
if self.room.is_none() {
|
||||||
|
let room = self.vault().room();
|
||||||
let instance_config = self
|
let instance_config = self
|
||||||
.server_config
|
.server_config
|
||||||
.clone()
|
.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())
|
.username(self.config.username.clone())
|
||||||
.force_username(self.config.force_username)
|
.force_username(self.config.force_username)
|
||||||
.password(self.config.password.clone());
|
.password(self.config.password.clone());
|
||||||
|
|
@ -680,9 +682,9 @@ impl EuphRoom {
|
||||||
Some(room) => room,
|
Some(room) => room,
|
||||||
};
|
};
|
||||||
|
|
||||||
if event.config().id != room.instance().config().id {
|
if event.config().name != room.instance().config().name {
|
||||||
// If we allowed ids other than the current one, old instances that
|
// If we allowed names other than the current one, old instances
|
||||||
// haven't yet shut down properly could mess up our state.
|
// that haven't yet shut down properly could mess up our state.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ pub struct Rooms {
|
||||||
order: Order,
|
order: Order,
|
||||||
|
|
||||||
euph_server_config: ServerConfig,
|
euph_server_config: ServerConfig,
|
||||||
euph_next_instance_id: u32,
|
euph_next_instance_id: usize,
|
||||||
euph_rooms: HashMap<String, EuphRoom>,
|
euph_rooms: HashMap<String, EuphRoom>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue