fix room directory regression
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
ab9a65db5d
commit
bd56d83045
1 changed files with 3 additions and 9 deletions
|
@ -1,8 +1,8 @@
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use conduit::{implement, utils::stream::TryIgnore, Result};
|
use conduit::{implement, utils::stream::TryIgnore, Result};
|
||||||
use database::{Ignore, Map};
|
use database::Map;
|
||||||
use futures::{Stream, StreamExt};
|
use futures::Stream;
|
||||||
use ruma::RoomId;
|
use ruma::RoomId;
|
||||||
|
|
||||||
pub struct Service {
|
pub struct Service {
|
||||||
|
@ -35,10 +35,4 @@ pub fn set_not_public(&self, room_id: &RoomId) { self.db.publicroomids.remove(ro
|
||||||
pub async fn is_public_room(&self, room_id: &RoomId) -> bool { self.db.publicroomids.get(room_id).await.is_ok() }
|
pub async fn is_public_room(&self, room_id: &RoomId) -> bool { self.db.publicroomids.get(room_id).await.is_ok() }
|
||||||
|
|
||||||
#[implement(Service)]
|
#[implement(Service)]
|
||||||
pub fn public_rooms(&self) -> impl Stream<Item = &RoomId> + Send {
|
pub fn public_rooms(&self) -> impl Stream<Item = &RoomId> + Send { self.db.publicroomids.keys().ignore_err() }
|
||||||
self.db
|
|
||||||
.publicroomids
|
|
||||||
.keys()
|
|
||||||
.ignore_err()
|
|
||||||
.map(|(room_id, _): (&RoomId, Ignore)| room_id)
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue