0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-24 15:52:34 +01:00

ircd:Ⓜ️:presence: Add prefetch() to interface.

This commit is contained in:
Jason Volk 2020-12-28 18:35:08 -08:00
parent 7ec8b78374
commit 30d7c11db7
2 changed files with 17 additions and 0 deletions

View file

@ -38,6 +38,7 @@ struct ircd::m::presence
static bool valid_state(const string_view &state);
static bool prefetch(const user &);
static event::idx get(std::nothrow_t, const user &);
static event::idx get(const user &);

View file

@ -148,6 +148,22 @@ ircd::m::presence::get(const std::nothrow_t,
return state.get(std::nothrow, "ircd.presence", "");
}
bool
ircd::m::presence::prefetch(const m::user &user)
{
const m::user::room user_room
{
user
};
const m::room::state state
{
user_room
};
return state.prefetch("ircd.presence", "");
}
ircd::m::event::id::buf
ircd::m::presence::set(const m::presence &content)
{