mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
fix service/rooms/state_accessor events
This commit is contained in:
parent
e7087444db
commit
1283dc6477
1 changed files with 7 additions and 11 deletions
|
|
@ -188,8 +188,8 @@ impl Service {
|
||||||
current_server_members
|
current_server_members
|
||||||
.any(|member| self.user_was_joined(shortstatehash, &member))
|
.any(|member| self.user_was_joined(shortstatehash, &member))
|
||||||
}
|
}
|
||||||
_ => {
|
other => {
|
||||||
error!("Unknown history visibility {history_visibility}");
|
error!(kind = %other, "Unknown history visibility");
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -261,8 +261,8 @@ impl Service {
|
||||||
// Allow if any member on requested server was joined, else deny
|
// Allow if any member on requested server was joined, else deny
|
||||||
self.user_was_joined(shortstatehash, user_id)
|
self.user_was_joined(shortstatehash, user_id)
|
||||||
}
|
}
|
||||||
_ => {
|
other => {
|
||||||
error!("Unknown history visibility {history_visibility}");
|
error!(kind = %other, "Unknown history visibility");
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -358,13 +358,9 @@ impl Service {
|
||||||
|s| {
|
|s| {
|
||||||
serde_json::from_str(s.content.get())
|
serde_json::from_str(s.content.get())
|
||||||
.map(|c: RoomNameEventContent| Some(c.name))
|
.map(|c: RoomNameEventContent| Some(c.name))
|
||||||
.map_err(|e| {
|
.map_err(|error| {
|
||||||
error!(
|
error!(%error, "Invalid room name event in database");
|
||||||
"Invalid room name event in database for room {}. \
|
Error::BadDatabase(
|
||||||
{}",
|
|
||||||
room_id, e
|
|
||||||
);
|
|
||||||
Error::bad_database(
|
|
||||||
"Invalid room name event in database.",
|
"Invalid room name event in database.",
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue