Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: strawberry <strawberry@puppygock.gay>
  • Loading branch information
girlbossceo committed Sep 21, 2024
1 parent de45855 commit e78af5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/service/rooms/metadata/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl crate::Service for Service {
#[implement(Service)]
pub async fn exists(&self, room_id: &RoomId) -> bool {
let prefix = match self.services.short.get_shortroomid(room_id).await {
Ok(b) => b.to_be_bytes(),
Ok(b) => b.to_be_bytes().to_vec(),
Err(_) => return false,
};

Expand Down
5 changes: 4 additions & 1 deletion src/service/rooms/short/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@ impl Data {
}

pub(super) async fn get_shortroomid(&self, room_id: &RoomId) -> Result<u64> {
self.roomid_shortroomid.qry(room_id).await.deserialized()
self.roomid_shortroomid
.qry(room_id.as_bytes())
.await
.deserialized()
}

pub(super) async fn get_or_create_shortroomid(&self, room_id: &RoomId) -> u64 {
Expand Down

0 comments on commit e78af5f

Please sign in to comment.