From 0873e18e14bbcbafa2a92dd881e76f6dd4351df9 Mon Sep 17 00:00:00 2001 From: strawberry Date: Fri, 5 Jul 2024 21:16:41 -0400 Subject: [PATCH] remove random duplicate function Signed-off-by: strawberry --- src/service/rooms/timeline/mod.rs | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/service/rooms/timeline/mod.rs b/src/service/rooms/timeline/mod.rs index 96f137e8..c82098ba 100644 --- a/src/service/rooms/timeline/mod.rs +++ b/src/service/rooms/timeline/mod.rs @@ -145,29 +145,6 @@ impl Service { } */ - /// Returns the version of a room, if known - /// - /// TODO: use this? - #[allow(dead_code)] - pub fn get_room_version(&self, room_id: &RoomId) -> Result> { - let create_event = services() - .rooms - .state_accessor - .room_state_get(room_id, &StateEventType::RoomCreate, "")?; - - let create_event_content: Option = create_event - .as_ref() - .map(|create_event| { - serde_json::from_str(create_event.content.get()).map_err(|e| { - warn!("Invalid create event: {}", e); - Error::bad_database("Invalid create event in db.") - }) - }) - .transpose()?; - - Ok(create_event_content.map(|content| content.room_version)) - } - /// Returns the json of a pdu. pub fn get_pdu_json(&self, event_id: &EventId) -> Result> { self.db.get_pdu_json(event_id) @@ -188,9 +165,6 @@ impl Service { /// Returns the pdu. /// /// Checks the `eventid_outlierpdu` Tree if not found in the timeline. - /// - /// TODO: use this? - #[allow(dead_code)] #[inline] pub fn get_non_outlier_pdu(&self, event_id: &EventId) -> Result> { self.db.get_non_outlier_pdu(event_id)