mirror of
https://github.com/matrix-construct/construct
synced 2025-03-16 22:41:46 +01:00
modules/console: Optimize the room members read query here.
This commit is contained in:
parent
9da798145b
commit
91dbd0d58e
1 changed files with 16 additions and 1 deletions
|
@ -3578,7 +3578,22 @@ console_cmd__room__members__read(opt &out, const string_view &line)
|
|||
at<"state_key"_>(event)
|
||||
};
|
||||
|
||||
const m::user::room user_room{user};
|
||||
static const m::event::fetch::opts fopts
|
||||
{
|
||||
m::event::keys::include
|
||||
{
|
||||
"event_id", "content", "origin_server_ts", "sender"
|
||||
},
|
||||
{
|
||||
db::get::NO_CACHE
|
||||
},
|
||||
};
|
||||
|
||||
const m::user::room user_room
|
||||
{
|
||||
user, nullptr, &fopts
|
||||
};
|
||||
|
||||
user_room.get(std::nothrow, "ircd.read", room_id, event_closure);
|
||||
}};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue