mirror of
https://github.com/matrix-construct/construct
synced 2024-06-08 04:58:58 +02:00
ircd:Ⓜ️:presence: Add prefetch() to interface.
This commit is contained in:
parent
7ec8b78374
commit
30d7c11db7
|
@ -38,6 +38,7 @@ struct ircd::m::presence
|
||||||
|
|
||||||
static bool valid_state(const string_view &state);
|
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(std::nothrow_t, const user &);
|
||||||
static event::idx get(const user &);
|
static event::idx get(const user &);
|
||||||
|
|
||||||
|
|
|
@ -148,6 +148,22 @@ ircd::m::presence::get(const std::nothrow_t,
|
||||||
return state.get(std::nothrow, "ircd.presence", "");
|
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::event::id::buf
|
||||||
ircd::m::presence::set(const m::presence &content)
|
ircd::m::presence::set(const m::presence &content)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue