fix service/rooms/state_accessor events

This commit is contained in:
Charles Hall 2024-07-15 20:44:16 -07:00
parent e7087444db
commit 1283dc6477
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF

View file

@ -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.",
) )
}) })