mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd/ircd:Ⓜ️ extern event_max_size conf item; minor cleanup.
This commit is contained in:
parent
14a41e9f58
commit
4a5bea668c
4 changed files with 16 additions and 18 deletions
|
@ -15,6 +15,8 @@ namespace ircd::m
|
|||
{
|
||||
struct event;
|
||||
|
||||
extern conf::item<size_t> event_max_size;
|
||||
|
||||
bool my(const id::event &);
|
||||
bool my(const event &);
|
||||
|
||||
|
|
|
@ -17,8 +17,6 @@ namespace ircd::http
|
|||
namespace karma = spirit::karma;
|
||||
namespace ascii = qi::ascii;
|
||||
|
||||
using spirit::unused_type;
|
||||
|
||||
using qi::lit;
|
||||
using qi::string;
|
||||
using qi::char_;
|
||||
|
@ -31,8 +29,8 @@ namespace ircd::http
|
|||
using qi::attr;
|
||||
using qi::eps;
|
||||
using qi::attr_cast;
|
||||
|
||||
using karma::maxwidth;
|
||||
using spirit::unused_type;
|
||||
|
||||
template<class it, class top = unused_type> struct grammar;
|
||||
struct parser extern const parser;
|
||||
|
|
|
@ -10,6 +10,13 @@
|
|||
|
||||
#include <ircd/m/m.h>
|
||||
|
||||
ircd::conf::item<size_t>
|
||||
ircd::m::event_max_size
|
||||
{
|
||||
{ "name", "m.event.max_size" },
|
||||
{ "default", 65507L },
|
||||
};
|
||||
|
||||
ircd::m::id::event
|
||||
ircd::m::event_id(const event &event,
|
||||
id::event::buf &buf)
|
||||
|
@ -36,15 +43,6 @@ ircd::m::event_id(const event &event)
|
|||
return at<"event_id"_>(event);
|
||||
}
|
||||
|
||||
namespace ircd::m
|
||||
{
|
||||
conf::item<size_t> event_max_size
|
||||
{
|
||||
{ "name", "m.event.max_size" },
|
||||
{ "default", 65507L },
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
ircd::m::check_size(const event &event)
|
||||
{
|
||||
|
|
|
@ -165,15 +165,15 @@ const
|
|||
}
|
||||
};
|
||||
|
||||
const auto &origin
|
||||
{
|
||||
unquote(at<"origin"_>(*this))
|
||||
};
|
||||
|
||||
const ed25519::pk pk
|
||||
{
|
||||
[&origin, &key](auto &buf)
|
||||
[this, &key](auto &buf)
|
||||
{
|
||||
const auto &origin
|
||||
{
|
||||
unquote(at<"origin"_>(*this))
|
||||
};
|
||||
|
||||
m::keys::get(origin, key, [&buf]
|
||||
(const string_view &key)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue