mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-12 05:12:57 +02:00
merge rooms/short Data w/ Service; optimize queries
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
0e8ae1e13e
commit
c569881b08
18 changed files with 257 additions and 262 deletions
|
@ -32,7 +32,7 @@ pub fn set_public(&self, room_id: &RoomId) { self.db.publicroomids.insert(room_i
|
|||
pub fn set_not_public(&self, room_id: &RoomId) { self.db.publicroomids.remove(room_id.as_bytes()); }
|
||||
|
||||
#[implement(Service)]
|
||||
pub async fn is_public_room(&self, room_id: &RoomId) -> bool { self.db.publicroomids.qry(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)]
|
||||
pub fn public_rooms(&self) -> impl Stream<Item = &RoomId> + Send {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue