mirror of
https://github.com/matrix-construct/construct
synced 2024-11-10 20:11:07 +01:00
ircd:Ⓜ️:rooms::summary: Export state key manip utils to interface.
This commit is contained in:
parent
1b4693601d
commit
9319df1a1b
3 changed files with 8 additions and 5 deletions
|
@ -32,6 +32,10 @@ namespace ircd::m::rooms::summary
|
|||
{
|
||||
struct fetch;
|
||||
|
||||
// util
|
||||
string_view make_state_key(const mutable_buffer &, const room::id &);
|
||||
room::id::buf unmake_state_key(const string_view &);
|
||||
|
||||
// observers
|
||||
bool has(const room::id &);
|
||||
void chunk(const room &, json::stack::object &chunk);
|
||||
|
|
|
@ -169,10 +169,9 @@ ircd::m::rooms::for_each(const opts &opts,
|
|||
const auto proffer_state{[&opts, &proffer, &ret]
|
||||
(const string_view &type, const string_view &state_key, const event::idx &event_idx)
|
||||
{
|
||||
room::id::buf buf;
|
||||
const auto &room_id
|
||||
const auto room_id
|
||||
{
|
||||
room::id::unswap(state_key, buf)
|
||||
rooms::summary::unmake_state_key(state_key)
|
||||
};
|
||||
|
||||
proffer(room_id);
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
namespace ircd::m::rooms::summary
|
||||
{
|
||||
static string_view make_state_key(const mutable_buffer &out, const m::room::id &);
|
||||
static room::id::buf unmake_state_key(const string_view &);
|
||||
static void chunk_remote(const room &, json::stack::object &o);
|
||||
static void chunk_local(const room &, json::stack::object &o);
|
||||
|
||||
|
@ -407,6 +405,7 @@ ircd::m::rooms::summary::has(const room::id &room_id)
|
|||
}
|
||||
|
||||
ircd::m::room::id::buf
|
||||
IRCD_MODULE_EXPORT
|
||||
ircd::m::rooms::summary::unmake_state_key(const string_view &key)
|
||||
{
|
||||
m::room::id::buf ret;
|
||||
|
@ -414,6 +413,7 @@ ircd::m::rooms::summary::unmake_state_key(const string_view &key)
|
|||
}
|
||||
|
||||
ircd::string_view
|
||||
IRCD_MODULE_EXPORT
|
||||
ircd::m::rooms::summary::make_state_key(const mutable_buffer &buf,
|
||||
const m::room::id &room_id)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue