diff --git a/include/ircd/m/filter.h b/include/ircd/m/filter.h index 07c28843d..611b5c16f 100644 --- a/include/ircd/m/filter.h +++ b/include/ircd/m/filter.h @@ -17,6 +17,7 @@ namespace ircd::m struct room_filter; struct event_filter; struct room_event_filter; + struct state_filter; bool match(const event_filter &, const event &); bool match(const room_event_filter &, const event &); @@ -59,13 +60,35 @@ struct ircd::m::room_event_filter using super_type::operator=; }; +/// "StateFilter" +struct ircd::m::state_filter +:json::tuple +< + json::property, + json::property, + json::property, + json::property, + json::property, + json::property, + json::property, + json::property, + json::property, + json::property +> +{ + using super_type::tuple; + state_filter(const mutable_buffer &, const json::members &); + state_filter() = default; + using super_type::operator=; +}; + /// 5.1 "RoomFilter" struct ircd::m::room_filter :json::tuple < json::property, json::property, - json::property, + json::property, json::property, json::property, json::property, diff --git a/include/ircd/m/name.h b/include/ircd/m/name.h index 496884aa2..44122ecbc 100644 --- a/include/ircd/m/name.h +++ b/include/ircd/m/name.h @@ -93,6 +93,8 @@ struct ircd::m::name static constexpr const char *const not_senders {"not_senders"}; static constexpr const char *const limit {"limit"}; static constexpr const char *const contains_url {"contains_url"}; + static constexpr const char *const lazy_load_members {"lazy_load_members"}; + static constexpr const char *const include_redundant_members {"include_redundant_members"}; static constexpr const char *const edu_type {"edu_type"}; diff --git a/ircd/m.cc b/ircd/m.cc index 3f458c565..2008bef89 100644 --- a/ircd/m.cc +++ b/ircd/m.cc @@ -2429,6 +2429,19 @@ ircd::m::room_filter::room_filter(const mutable_buffer &buf, { } +// +// state_filter +// + +ircd::m::state_filter::state_filter(const mutable_buffer &buf, + const json::members &members) +:super_type::tuple +{ + json::stringify(mutable_buffer{buf}, members) +} +{ +} + // // room_event_filter // diff --git a/ircd/m_name.cc b/ircd/m_name.cc index 14194443c..c49d8306d 100644 --- a/ircd/m_name.cc +++ b/ircd/m_name.cc @@ -72,6 +72,8 @@ constexpr const char *const ircd::m::name::senders; constexpr const char *const ircd::m::name::not_senders; constexpr const char *const ircd::m::name::limit; constexpr const char *const ircd::m::name::contains_url; +constexpr const char *const ircd::m::name::lazy_load_members; +constexpr const char *const ircd::m::name::include_redundant_members; constexpr const char *const ircd::m::name::edu_type;