Fix incorrect room name in url
I naïvely implemented Display for RoomIdentifier, which lead to me passing room names like "&test@euphoria.leet.nu" to euphoxide instead of "test". Of course, no room of that name exists, so every attempted connection failed. To figure this out, I manually relaxed the verbosity filters to let through all euphoxide log messages and recompiled. Only implementing Debug led to compile errors whereever I misused the Disply instance, so at least the bug fix was nice and easy once I knew what happened.
This commit is contained in:
parent
78bbfac2f3
commit
60fdc40a21
3 changed files with 5 additions and 5 deletions
|
|
@ -187,7 +187,7 @@ impl Room {
|
|||
None => None,
|
||||
};
|
||||
|
||||
debug!("{}: requesting logs", vault.room());
|
||||
debug!("{:?}: requesting logs", vault.room());
|
||||
|
||||
// &rl2dev's message history is broken and requesting old messages past
|
||||
// a certain point results in errors. By reducing the amount of messages
|
||||
|
|
|
|||
|
|
@ -101,8 +101,8 @@ impl EuphRoom {
|
|||
let instance_config = self
|
||||
.server_config
|
||||
.clone()
|
||||
.room(self.vault().room().to_string())
|
||||
.name(format!("{room}-{}", next_instance_id))
|
||||
.room(self.vault().room().name.clone())
|
||||
.name(format!("{room:?}-{}", next_instance_id))
|
||||
.human(true)
|
||||
.username(self.room_config.username.clone())
|
||||
.force_username(self.room_config.force_username)
|
||||
|
|
|
|||
|
|
@ -46,13 +46,13 @@ impl FromSql for WTime {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)]
|
||||
#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)]
|
||||
pub struct RoomIdentifier {
|
||||
pub domain: String,
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
impl fmt::Display for RoomIdentifier {
|
||||
impl fmt::Debug for RoomIdentifier {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "&{}@{}", self.name, self.domain)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue