Do cache space members in member_cache

This commit is contained in:
Cadence Ember
2025-01-20 02:33:24 +13:00
parent f42eb6495f
commit 5b06d5984a
9 changed files with 40 additions and 52 deletions
+2 -2
View File
@@ -205,8 +205,8 @@ async event => {
return db.prepare("DELETE FROM member_cache WHERE room_id = ? and mxid = ?").run(event.room_id, event.state_key)
}
const room = select("channel_room", "room_id", {room_id: event.room_id})
if (!room) return // don't cache members in unbridged rooms
const exists = select("channel_room", "room_id", {room_id: event.room_id}) ?? select("guild_space", "space_id", {space_id: event.room_id})
if (!exists) return // don't cache members in unbridged rooms
// Member is here
let powerLevel = 0