mirror of
https://github.com/matrix-construct/construct
synced 2024-12-25 23:14:13 +01:00
ircd:Ⓜ️ Rename v1/v2 namespace to fed.
This commit is contained in:
parent
f5d5f6de3b
commit
c44d732443
38 changed files with 369 additions and 368 deletions
|
@ -9,14 +9,14 @@
|
|||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
#define HAVE_IRCD_M_V1_BACKFILL_H
|
||||
#define HAVE_IRCD_M_FED_BACKFILL_H
|
||||
|
||||
namespace ircd::m::v1
|
||||
namespace ircd::m::fed
|
||||
{
|
||||
struct backfill;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::backfill
|
||||
struct ircd::m::fed::backfill
|
||||
:server::request
|
||||
{
|
||||
struct opts;
|
||||
|
@ -30,7 +30,7 @@ struct ircd::m::v1::backfill
|
|||
backfill() = default;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::backfill::opts
|
||||
struct ircd::m::fed::backfill::opts
|
||||
{
|
||||
net::hostport remote;
|
||||
string_view event_id;
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
#define HAVE_IRCD_M_V1_EVENT_H
|
||||
#define HAVE_IRCD_M_FED_EVENT_H
|
||||
|
||||
namespace ircd::m::v1
|
||||
namespace ircd::m::fed
|
||||
{
|
||||
struct event;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::event
|
||||
struct ircd::m::fed::event
|
||||
:server::request
|
||||
{
|
||||
struct opts;
|
||||
|
@ -28,7 +28,7 @@ struct ircd::m::v1::event
|
|||
event() = default;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::event::opts
|
||||
struct ircd::m::fed::event::opts
|
||||
{
|
||||
net::hostport remote;
|
||||
m::request request;
|
||||
|
@ -39,7 +39,7 @@ struct ircd::m::v1::event::opts
|
|||
};
|
||||
|
||||
inline
|
||||
ircd::m::v1::event::operator
|
||||
ircd::m::fed::event::operator
|
||||
ircd::m::event()
|
||||
const
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ const
|
|||
}
|
||||
|
||||
inline
|
||||
ircd::m::v1::event::operator
|
||||
ircd::m::fed::event::operator
|
||||
ircd::json::object()
|
||||
const
|
||||
{
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
#define HAVE_IRCD_M_V1_EVENT_AUTH_H
|
||||
#define HAVE_IRCD_M_FED_EVENT_AUTH_H
|
||||
|
||||
namespace ircd::m::v1
|
||||
namespace ircd::m::fed
|
||||
{
|
||||
struct event_auth;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::event_auth
|
||||
struct ircd::m::fed::event_auth
|
||||
:server::request
|
||||
{
|
||||
struct opts;
|
||||
|
@ -35,7 +35,7 @@ struct ircd::m::v1::event_auth
|
|||
event_auth() = default;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::event_auth::opts
|
||||
struct ircd::m::fed::event_auth::opts
|
||||
{
|
||||
net::hostport remote;
|
||||
m::request request;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#pragma once
|
||||
#define HAVE_IRCD_M_FED_H
|
||||
|
||||
namespace ircd::m::v1
|
||||
namespace ircd::m::fed
|
||||
{
|
||||
id::event::buf fetch_head(const id::room &room_id, const net::hostport &remote, const id::user &);
|
||||
id::event::buf fetch_head(const id::room &room_id, const net::hostport &remote);
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
#define HAVE_IRCD_M_V1_FRONTFILL_H
|
||||
#define HAVE_IRCD_M_FED_FRONTFILL_H
|
||||
|
||||
namespace ircd::m::v1
|
||||
namespace ircd::m::fed
|
||||
{
|
||||
struct frontfill;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::frontfill
|
||||
struct ircd::m::fed::frontfill
|
||||
:server::request
|
||||
{
|
||||
struct opts;
|
||||
|
@ -37,7 +37,7 @@ struct ircd::m::v1::frontfill
|
|||
frontfill() = default;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::frontfill::opts
|
||||
struct ircd::m::fed::frontfill::opts
|
||||
{
|
||||
net::hostport remote;
|
||||
size_t limit {64};
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
#define HAVE_IRCD_M_V1_GROUPS_H
|
||||
#define HAVE_IRCD_M_FED_GROUPS_H
|
||||
|
||||
namespace ircd::m::v1::groups
|
||||
namespace ircd::m::fed::groups
|
||||
{
|
||||
struct publicised;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::groups::publicised
|
||||
struct ircd::m::fed::groups::publicised
|
||||
:server::request
|
||||
{
|
||||
struct opts;
|
||||
|
@ -30,7 +30,7 @@ struct ircd::m::v1::groups::publicised
|
|||
publicised() = default;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::groups::publicised::opts
|
||||
struct ircd::m::fed::groups::publicised::opts
|
||||
{
|
||||
net::hostport remote;
|
||||
m::request request;
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
#define HAVE_IRCD_M_V1_INVITE_H
|
||||
#define HAVE_IRCD_M_FED_INVITE_H
|
||||
|
||||
namespace ircd::m::v1
|
||||
namespace ircd::m::fed
|
||||
{
|
||||
struct invite;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::invite
|
||||
struct ircd::m::fed::invite
|
||||
:server::request
|
||||
{
|
||||
struct opts;
|
||||
|
@ -30,7 +30,7 @@ struct ircd::m::v1::invite
|
|||
invite() = default;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::invite::opts
|
||||
struct ircd::m::fed::invite::opts
|
||||
{
|
||||
net::hostport remote;
|
||||
m::request request;
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
#pragma once
|
||||
#define HAVE_IRCD_M_FED_INVITE2_H
|
||||
|
||||
namespace ircd::m::v2
|
||||
namespace ircd::m::fed
|
||||
{
|
||||
struct invite;
|
||||
struct invite2;
|
||||
};
|
||||
|
||||
struct ircd::m::v2::invite
|
||||
struct ircd::m::fed::invite2
|
||||
:server::request
|
||||
{
|
||||
struct opts;
|
||||
|
@ -26,11 +26,11 @@ struct ircd::m::v2::invite
|
|||
return json::object{in.content};
|
||||
}
|
||||
|
||||
invite(const room::id &, const id::event &, const json::object &, const mutable_buffer &, opts);
|
||||
invite() = default;
|
||||
invite2(const room::id &, const id::event &, const json::object &, const mutable_buffer &, opts);
|
||||
invite2() = default;
|
||||
};
|
||||
|
||||
struct ircd::m::v2::invite::opts
|
||||
struct ircd::m::fed::invite2::opts
|
||||
{
|
||||
net::hostport remote;
|
||||
m::request request;
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
#define HAVE_IRCD_M_V1_KEY_H
|
||||
#define HAVE_IRCD_M_FED_KEY_H
|
||||
|
||||
namespace ircd::m::v1::key
|
||||
namespace ircd::m::fed::key
|
||||
{
|
||||
struct opts;
|
||||
struct keys;
|
||||
|
@ -19,7 +19,7 @@ namespace ircd::m::v1::key
|
|||
using server_key = std::pair<string_view, string_view>; // server_name, key_id
|
||||
};
|
||||
|
||||
struct ircd::m::v1::key::keys
|
||||
struct ircd::m::fed::key::keys
|
||||
:server::request
|
||||
{
|
||||
using opts = key::opts;
|
||||
|
@ -35,7 +35,7 @@ struct ircd::m::v1::key::keys
|
|||
keys() = default;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::key::query
|
||||
struct ircd::m::fed::key::query
|
||||
:server::request
|
||||
{
|
||||
using opts = key::opts;
|
||||
|
@ -51,7 +51,7 @@ struct ircd::m::v1::key::query
|
|||
query() = default;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::key::opts
|
||||
struct ircd::m::fed::key::opts
|
||||
{
|
||||
net::hostport remote;
|
||||
m::request request;
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
#define HAVE_IRCD_M_V1_MAKE_JOIN_H
|
||||
#define HAVE_IRCD_M_FED_MAKE_JOIN_H
|
||||
|
||||
namespace ircd::m::v1
|
||||
namespace ircd::m::fed
|
||||
{
|
||||
struct make_join;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::make_join
|
||||
struct ircd::m::fed::make_join
|
||||
:server::request
|
||||
{
|
||||
struct opts;
|
||||
|
@ -30,7 +30,7 @@ struct ircd::m::v1::make_join
|
|||
make_join() = default;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::make_join::opts
|
||||
struct ircd::m::fed::make_join::opts
|
||||
{
|
||||
net::hostport remote;
|
||||
m::request request;
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
#define HAVE_IRCD_M_V1_PUBLIC_ROOMS_H
|
||||
#define HAVE_IRCD_M_FED_PUBLIC_ROOMS_H
|
||||
|
||||
namespace ircd::m::v1
|
||||
namespace ircd::m::fed
|
||||
{
|
||||
struct public_rooms;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::public_rooms
|
||||
struct ircd::m::fed::public_rooms
|
||||
:server::request
|
||||
{
|
||||
struct opts;
|
||||
|
@ -30,7 +30,7 @@ struct ircd::m::v1::public_rooms
|
|||
public_rooms() = default;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::public_rooms::opts
|
||||
struct ircd::m::fed::public_rooms::opts
|
||||
{
|
||||
net::hostport remote;
|
||||
size_t limit {128};
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
#define HAVE_IRCD_M_V1_QUERY_H
|
||||
#define HAVE_IRCD_M_FED_QUERY_H
|
||||
|
||||
namespace ircd::m::v1
|
||||
namespace ircd::m::fed
|
||||
{
|
||||
struct query;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::query
|
||||
struct ircd::m::fed::query
|
||||
:server::request
|
||||
{
|
||||
struct opts;
|
||||
|
@ -35,7 +35,7 @@ struct ircd::m::v1::query
|
|||
query() = default;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::query::opts
|
||||
struct ircd::m::fed::query::opts
|
||||
{
|
||||
net::hostport remote;
|
||||
m::request request;
|
||||
|
@ -51,14 +51,14 @@ struct ircd::m::v1::query::opts
|
|||
opts() = default;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::query::profile
|
||||
struct ircd::m::fed::query::profile
|
||||
:query
|
||||
{
|
||||
profile(const id::user &user_id, const string_view &field, const mutable_buffer &, opts);
|
||||
profile(const id::user &user_id, const mutable_buffer &, opts);
|
||||
};
|
||||
|
||||
struct ircd::m::v1::query::directory
|
||||
struct ircd::m::fed::query::directory
|
||||
:query
|
||||
{
|
||||
directory(const id::room_alias &room_alias, const mutable_buffer &, opts);
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
#define HAVE_IRCD_M_V1_QUERY_AUTH_H
|
||||
#define HAVE_IRCD_M_FED_QUERY_AUTH_H
|
||||
|
||||
namespace ircd::m::v1
|
||||
namespace ircd::m::fed
|
||||
{
|
||||
struct query_auth;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::query_auth
|
||||
struct ircd::m::fed::query_auth
|
||||
:server::request
|
||||
{
|
||||
struct opts;
|
||||
|
@ -38,7 +38,7 @@ struct ircd::m::v1::query_auth
|
|||
query_auth() = default;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::query_auth::opts
|
||||
struct ircd::m::fed::query_auth::opts
|
||||
{
|
||||
net::hostport remote;
|
||||
m::request request;
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
#define HAVE_IRCD_M_V1_SEND_H
|
||||
#define HAVE_IRCD_M_FED_SEND_H
|
||||
|
||||
namespace ircd::m::v1
|
||||
namespace ircd::m::fed
|
||||
{
|
||||
struct send;
|
||||
};
|
||||
|
@ -20,7 +20,7 @@ namespace ircd::m::v1
|
|||
/// receives a response via the server::request ctx::future. This object
|
||||
/// must stay in scope to complete the request until the future is resolved.
|
||||
///
|
||||
struct ircd::m::v1::send
|
||||
struct ircd::m::fed::send
|
||||
:server::request
|
||||
{
|
||||
struct opts;
|
||||
|
@ -41,7 +41,7 @@ struct ircd::m::v1::send
|
|||
|
||||
/// Options for a federation send request.
|
||||
///
|
||||
struct ircd::m::v1::send::opts
|
||||
struct ircd::m::fed::send::opts
|
||||
{
|
||||
/// The remote server to contact. Must be specified for this request.
|
||||
net::hostport remote;
|
||||
|
@ -64,11 +64,12 @@ struct ircd::m::v1::send::opts
|
|||
/// The lower-level server::request::opts configuration to attach to
|
||||
/// this request.
|
||||
const struct server::request::opts *sopts {nullptr};
|
||||
|
||||
bool dynamic {false};
|
||||
};
|
||||
|
||||
/// Helper for dealing with response content from a /send/.
|
||||
struct ircd::m::v1::send::response
|
||||
struct ircd::m::fed::send::response
|
||||
:json::object
|
||||
{
|
||||
/// A member of the response object is "pdus" and this helps iterate that object
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
#define HAVE_IRCD_M_V1_SEND_JOIN_H
|
||||
#define HAVE_IRCD_M_FED_SEND_JOIN_H
|
||||
|
||||
namespace ircd::m::v1
|
||||
namespace ircd::m::fed
|
||||
{
|
||||
struct send_join;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::send_join
|
||||
struct ircd::m::fed::send_join
|
||||
:server::request
|
||||
{
|
||||
struct opts;
|
||||
|
@ -30,7 +30,7 @@ struct ircd::m::v1::send_join
|
|||
send_join() = default;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::send_join::opts
|
||||
struct ircd::m::fed::send_join::opts
|
||||
{
|
||||
net::hostport remote;
|
||||
m::request request;
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
#define HAVE_IRCD_M_V1_STATE_H
|
||||
#define HAVE_IRCD_M_FED_STATE_H
|
||||
|
||||
namespace ircd::m::v1
|
||||
namespace ircd::m::fed
|
||||
{
|
||||
struct state;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::state
|
||||
struct ircd::m::fed::state
|
||||
:server::request
|
||||
{
|
||||
struct opts;
|
||||
|
@ -30,7 +30,7 @@ struct ircd::m::v1::state
|
|||
state() = default;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::state::opts
|
||||
struct ircd::m::fed::state::opts
|
||||
{
|
||||
net::hostport remote;
|
||||
string_view event_id;
|
||||
|
|
|
@ -9,18 +9,18 @@
|
|||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
#define HAVE_IRCD_M_V1_USER_H
|
||||
#define HAVE_IRCD_M_FED_USER_H
|
||||
|
||||
namespace ircd::m::v1::user
|
||||
namespace ircd::m::fed::user
|
||||
{
|
||||
struct opts;
|
||||
struct devices;
|
||||
}
|
||||
|
||||
struct ircd::m::v1::user::devices
|
||||
struct ircd::m::fed::user::devices
|
||||
:server::request
|
||||
{
|
||||
using opts = v1::user::opts;
|
||||
using opts = fed::user::opts;
|
||||
|
||||
explicit operator json::object() const
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ struct ircd::m::v1::user::devices
|
|||
devices() = default;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::user::opts
|
||||
struct ircd::m::fed::user::opts
|
||||
{
|
||||
net::hostport remote;
|
||||
m::request request;
|
||||
|
|
|
@ -9,18 +9,18 @@
|
|||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
#define HAVE_IRCD_M_V1_USER_H
|
||||
#define HAVE_IRCD_M_FED_USER_H
|
||||
|
||||
namespace ircd::m::v1::user::keys
|
||||
namespace ircd::m::fed::user::keys
|
||||
{
|
||||
struct claim;
|
||||
struct query;
|
||||
}
|
||||
|
||||
struct ircd::m::v1::user::keys::query
|
||||
struct ircd::m::fed::user::keys::query
|
||||
:server::request
|
||||
{
|
||||
using opts = v1::user::opts;
|
||||
using opts = fed::user::opts;
|
||||
using devices = vector_view<const string_view>;
|
||||
using user_devices = std::pair<m::user::id, devices>;
|
||||
using users_devices = const vector_view<const user_devices>;
|
||||
|
@ -64,10 +64,10 @@ struct ircd::m::v1::user::keys::query
|
|||
query() = default;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::user::keys::claim
|
||||
struct ircd::m::fed::user::keys::claim
|
||||
:server::request
|
||||
{
|
||||
using opts = v1::user::opts;
|
||||
using opts = fed::user::opts;
|
||||
using device = std::pair<string_view, string_view>;
|
||||
using devices = vector_view<const device>;
|
||||
using user_devices = std::pair<m::user::id, devices>;
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
#define HAVE_IRCD_M_V1_VERSION_H
|
||||
#define HAVE_IRCD_M_FED_VERSION_H
|
||||
|
||||
namespace ircd::m::v1
|
||||
namespace ircd::m::fed
|
||||
{
|
||||
struct version;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::version
|
||||
struct ircd::m::fed::version
|
||||
:server::request
|
||||
{
|
||||
struct opts;
|
||||
|
@ -30,7 +30,7 @@ struct ircd::m::v1::version
|
|||
version() = default;
|
||||
};
|
||||
|
||||
struct ircd::m::v1::version::opts
|
||||
struct ircd::m::fed::version::opts
|
||||
{
|
||||
net::hostport remote;
|
||||
m::request request;
|
||||
|
|
|
@ -55,7 +55,7 @@ struct ircd::m::keys
|
|||
{
|
||||
struct cache;
|
||||
|
||||
using queries = vector_view<const m::v1::key::server_key>; // <server, key_id>
|
||||
using queries = vector_view<const fed::key::server_key>; // <server, key_id>
|
||||
using closure = std::function<void (const json::object &)>;
|
||||
using closure_bool = std::function<bool (const json::object &)>;
|
||||
|
||||
|
|
328
matrix/fed.cc
328
matrix/fed.cc
|
@ -10,13 +10,13 @@
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// v1/groups.h
|
||||
// fed/groups.h
|
||||
//
|
||||
|
||||
ircd::m::v1::groups::publicised::publicised(const string_view &node,
|
||||
const vector_view<const id::user> &user_ids,
|
||||
const mutable_buffer &buf_,
|
||||
opts opts)
|
||||
ircd::m::fed::groups::publicised::publicised(const string_view &node,
|
||||
const vector_view<const id::user> &user_ids,
|
||||
const mutable_buffer &buf_,
|
||||
opts opts)
|
||||
:server::request{[&]
|
||||
{
|
||||
if(!opts.remote)
|
||||
|
@ -68,11 +68,11 @@ ircd::m::v1::groups::publicised::publicised(const string_view &node,
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// v1/send.h
|
||||
// fed/send.h
|
||||
//
|
||||
|
||||
void
|
||||
ircd::m::v1::send::response::for_each_pdu(const pdus_closure &closure)
|
||||
ircd::m::fed::send::response::for_each_pdu(const pdus_closure &closure)
|
||||
const
|
||||
{
|
||||
const json::object &pdus
|
||||
|
@ -88,10 +88,10 @@ const
|
|||
}
|
||||
}
|
||||
|
||||
ircd::m::v1::send::send(const string_view &txnid,
|
||||
const const_buffer &content,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::send::send(const string_view &txnid,
|
||||
const const_buffer &content,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:server::request{[&]
|
||||
{
|
||||
assert(!!opts.remote);
|
||||
|
@ -139,12 +139,12 @@ ircd::m::v1::send::send(const string_view &txnid,
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// v1/public_rooms.h
|
||||
// fed/public_rooms.h
|
||||
//
|
||||
|
||||
ircd::m::v1::public_rooms::public_rooms(const net::hostport &remote,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::public_rooms::public_rooms(const net::hostport &remote,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:server::request{[&]
|
||||
{
|
||||
if(!opts.remote)
|
||||
|
@ -206,13 +206,13 @@ ircd::m::v1::public_rooms::public_rooms(const net::hostport &remote,
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// v1/frontfill.h
|
||||
// fed/frontfill.h
|
||||
//
|
||||
|
||||
ircd::m::v1::frontfill::frontfill(const room::id &room_id,
|
||||
const span &span,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::frontfill::frontfill(const room::id &room_id,
|
||||
const span &span,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:frontfill
|
||||
{
|
||||
room_id,
|
||||
|
@ -223,10 +223,10 @@ ircd::m::v1::frontfill::frontfill(const room::id &room_id,
|
|||
{
|
||||
}
|
||||
|
||||
ircd::m::v1::frontfill::frontfill(const room::id &room_id,
|
||||
const ranges &pair,
|
||||
const mutable_buffer &buf_,
|
||||
opts opts)
|
||||
ircd::m::fed::frontfill::frontfill(const room::id &room_id,
|
||||
const ranges &pair,
|
||||
const mutable_buffer &buf_,
|
||||
opts opts)
|
||||
:server::request{[&]
|
||||
{
|
||||
assert(!!opts.remote);
|
||||
|
@ -282,9 +282,9 @@ ircd::m::v1::frontfill::frontfill(const room::id &room_id,
|
|||
}
|
||||
|
||||
ircd::const_buffer
|
||||
ircd::m::v1::frontfill::make_content(const mutable_buffer &buf,
|
||||
const ranges &pair,
|
||||
const opts &opts)
|
||||
ircd::m::fed::frontfill::make_content(const mutable_buffer &buf,
|
||||
const ranges &pair,
|
||||
const opts &opts)
|
||||
{
|
||||
json::stack out{buf};
|
||||
{
|
||||
|
@ -311,12 +311,12 @@ ircd::m::v1::frontfill::make_content(const mutable_buffer &buf,
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// v1/backfill.h
|
||||
// fed/backfill.h
|
||||
//
|
||||
|
||||
ircd::m::v1::backfill::backfill(const room::id &room_id,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::backfill::backfill(const room::id &room_id,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:server::request{[&]
|
||||
{
|
||||
if(!opts.remote)
|
||||
|
@ -374,12 +374,12 @@ ircd::m::v1::backfill::backfill(const room::id &room_id,
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// v1/state.h
|
||||
// fed/state.h
|
||||
//
|
||||
|
||||
ircd::m::v1::state::state(const room::id &room_id,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::state::state(const room::id &room_id,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:server::request{[&]
|
||||
{
|
||||
if(!opts.remote)
|
||||
|
@ -438,14 +438,14 @@ ircd::m::v1::state::state(const room::id &room_id,
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// v1/query_auth.h
|
||||
// fed/query_auth.h
|
||||
//
|
||||
|
||||
ircd::m::v1::query_auth::query_auth(const m::room::id &room_id,
|
||||
const m::event::id &event_id,
|
||||
const json::object &content,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::query_auth::query_auth(const m::room::id &room_id,
|
||||
const m::event::id &event_id,
|
||||
const json::object &content,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:server::request{[&]
|
||||
{
|
||||
if(!opts.remote)
|
||||
|
@ -498,13 +498,13 @@ ircd::m::v1::query_auth::query_auth(const m::room::id &room_id,
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// v1/event_auth.h
|
||||
// fed/event_auth.h
|
||||
//
|
||||
|
||||
ircd::m::v1::event_auth::event_auth(const m::room::id &room_id,
|
||||
const m::event::id &event_id,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::event_auth::event_auth(const m::room::id &room_id,
|
||||
const m::event::id &event_id,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:server::request{[&]
|
||||
{
|
||||
if(!opts.remote)
|
||||
|
@ -563,12 +563,12 @@ ircd::m::v1::event_auth::event_auth(const m::room::id &room_id,
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// v1/event.h
|
||||
// fed/event.h
|
||||
//
|
||||
|
||||
ircd::m::v1::event::event(const m::event::id &event_id,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::event::event(const m::event::id &event_id,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:server::request{[&]
|
||||
{
|
||||
if(!opts.remote)
|
||||
|
@ -617,14 +617,14 @@ ircd::m::v1::event::event(const m::event::id &event_id,
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// v1/invite.h
|
||||
// fed/invite.h
|
||||
//
|
||||
|
||||
ircd::m::v1::invite::invite(const room::id &room_id,
|
||||
const id::event &event_id,
|
||||
const json::object &content,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::invite::invite(const room::id &room_id,
|
||||
const id::event &event_id,
|
||||
const json::object &content,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:server::request{[&]
|
||||
{
|
||||
assert(!!opts.remote);
|
||||
|
@ -673,14 +673,14 @@ ircd::m::v1::invite::invite(const room::id &room_id,
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// v2/invite.h
|
||||
// fed/invite2.h
|
||||
//
|
||||
|
||||
ircd::m::v2::invite::invite(const room::id &room_id,
|
||||
const id::event &event_id,
|
||||
const json::object &content,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::invite2::invite2(const room::id &room_id,
|
||||
const id::event &event_id,
|
||||
const json::object &content,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:server::request{[&]
|
||||
{
|
||||
assert(!!opts.remote);
|
||||
|
@ -729,14 +729,14 @@ ircd::m::v2::invite::invite(const room::id &room_id,
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// v1/send_join.h
|
||||
// fed/send_join.h
|
||||
//
|
||||
|
||||
ircd::m::v1::send_join::send_join(const room::id &room_id,
|
||||
const id::event &event_id,
|
||||
const const_buffer &content,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::send_join::send_join(const room::id &room_id,
|
||||
const id::event &event_id,
|
||||
const const_buffer &content,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:server::request{[&]
|
||||
{
|
||||
assert(!!opts.remote);
|
||||
|
@ -785,13 +785,13 @@ ircd::m::v1::send_join::send_join(const room::id &room_id,
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// v1/make_join.h
|
||||
// fed/make_join.h
|
||||
//
|
||||
|
||||
ircd::m::v1::make_join::make_join(const room::id &room_id,
|
||||
const id::user &user_id_,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::make_join::make_join(const room::id &room_id,
|
||||
const id::user &user_id_,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:server::request{[&]
|
||||
{
|
||||
if(!opts.remote)
|
||||
|
@ -851,16 +851,16 @@ ircd::m::v1::make_join::make_join(const room::id &room_id,
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// v1/user_keys.h
|
||||
// fed/user_keys.h
|
||||
//
|
||||
|
||||
//
|
||||
// query
|
||||
//
|
||||
|
||||
ircd::m::v1::user::keys::query::query(const m::user::id &user_id,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::user::keys::query::query(const m::user::id &user_id,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:query
|
||||
{
|
||||
user_id,
|
||||
|
@ -871,10 +871,10 @@ ircd::m::v1::user::keys::query::query(const m::user::id &user_id,
|
|||
{
|
||||
}
|
||||
|
||||
ircd::m::v1::user::keys::query::query(const m::user::id &user_id,
|
||||
const string_view &device_id,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::user::keys::query::query(const m::user::id &user_id,
|
||||
const string_view &device_id,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:query
|
||||
{
|
||||
user_devices
|
||||
|
@ -890,9 +890,9 @@ ircd::m::v1::user::keys::query::query(const m::user::id &user_id,
|
|||
{
|
||||
}
|
||||
|
||||
ircd::m::v1::user::keys::query::query(const user_devices &v,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::user::keys::query::query(const user_devices &v,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:query
|
||||
{
|
||||
vector_view<const user_devices>
|
||||
|
@ -905,9 +905,9 @@ ircd::m::v1::user::keys::query::query(const user_devices &v,
|
|||
{
|
||||
}
|
||||
|
||||
ircd::m::v1::user::keys::query::query(const users_devices &v,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::user::keys::query::query(const users_devices &v,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:query{[&v, &buf, &opts]
|
||||
{
|
||||
const json::object &content
|
||||
|
@ -923,9 +923,9 @@ ircd::m::v1::user::keys::query::query(const users_devices &v,
|
|||
{
|
||||
}
|
||||
|
||||
ircd::m::v1::user::keys::query::query(const users_devices_map &m,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::user::keys::query::query(const users_devices_map &m,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:query{[&m, &buf, &opts]
|
||||
{
|
||||
const json::object &content
|
||||
|
@ -941,9 +941,9 @@ ircd::m::v1::user::keys::query::query(const users_devices_map &m,
|
|||
{
|
||||
}
|
||||
|
||||
ircd::m::v1::user::keys::query::query(const json::object &content,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::user::keys::query::query(const json::object &content,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:server::request{[&]
|
||||
{
|
||||
assert(!!opts.remote);
|
||||
|
@ -983,8 +983,8 @@ ircd::m::v1::user::keys::query::query(const json::object &content,
|
|||
}
|
||||
|
||||
ircd::json::object
|
||||
ircd::m::v1::user::keys::query::make_content(const mutable_buffer &buf,
|
||||
const users_devices &v)
|
||||
ircd::m::fed::user::keys::query::make_content(const mutable_buffer &buf,
|
||||
const users_devices &v)
|
||||
{
|
||||
json::stack out{buf};
|
||||
{
|
||||
|
@ -1010,8 +1010,8 @@ ircd::m::v1::user::keys::query::make_content(const mutable_buffer &buf,
|
|||
}
|
||||
|
||||
ircd::json::object
|
||||
ircd::m::v1::user::keys::query::make_content(const mutable_buffer &buf,
|
||||
const users_devices_map &m)
|
||||
ircd::m::fed::user::keys::query::make_content(const mutable_buffer &buf,
|
||||
const users_devices_map &m)
|
||||
{
|
||||
json::stack out{buf};
|
||||
{
|
||||
|
@ -1035,11 +1035,11 @@ ircd::m::v1::user::keys::query::make_content(const mutable_buffer &buf,
|
|||
// claim
|
||||
//
|
||||
|
||||
ircd::m::v1::user::keys::claim::claim(const m::user::id &user_id,
|
||||
const string_view &device_id,
|
||||
const string_view &algorithm,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::user::keys::claim::claim(const m::user::id &user_id,
|
||||
const string_view &device_id,
|
||||
const string_view &algorithm,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:claim
|
||||
{
|
||||
user_id,
|
||||
|
@ -1053,10 +1053,10 @@ ircd::m::v1::user::keys::claim::claim(const m::user::id &user_id,
|
|||
{
|
||||
}
|
||||
|
||||
ircd::m::v1::user::keys::claim::claim(const m::user::id &user_id,
|
||||
const device &device,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::user::keys::claim::claim(const m::user::id &user_id,
|
||||
const device &device,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:claim
|
||||
{
|
||||
user_devices
|
||||
|
@ -1069,9 +1069,9 @@ ircd::m::v1::user::keys::claim::claim(const m::user::id &user_id,
|
|||
{
|
||||
}
|
||||
|
||||
ircd::m::v1::user::keys::claim::claim(const user_devices &ud,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::user::keys::claim::claim(const user_devices &ud,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:claim
|
||||
{
|
||||
vector_view<const user_devices>
|
||||
|
@ -1084,9 +1084,9 @@ ircd::m::v1::user::keys::claim::claim(const user_devices &ud,
|
|||
{
|
||||
}
|
||||
|
||||
ircd::m::v1::user::keys::claim::claim(const users_devices &v,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::user::keys::claim::claim(const users_devices &v,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:claim{[&v, &buf, &opts]
|
||||
{
|
||||
const json::object &content
|
||||
|
@ -1102,9 +1102,9 @@ ircd::m::v1::user::keys::claim::claim(const users_devices &v,
|
|||
{
|
||||
}
|
||||
|
||||
ircd::m::v1::user::keys::claim::claim(const users_devices_map &m,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::user::keys::claim::claim(const users_devices_map &m,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:claim{[&m, &buf, &opts]
|
||||
{
|
||||
const json::object &content
|
||||
|
@ -1120,9 +1120,9 @@ ircd::m::v1::user::keys::claim::claim(const users_devices_map &m,
|
|||
{
|
||||
}
|
||||
|
||||
ircd::m::v1::user::keys::claim::claim(const json::object &content,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::user::keys::claim::claim(const json::object &content,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:server::request{[&]
|
||||
{
|
||||
assert(!!opts.remote);
|
||||
|
@ -1162,8 +1162,8 @@ ircd::m::v1::user::keys::claim::claim(const json::object &content,
|
|||
}
|
||||
|
||||
ircd::json::object
|
||||
ircd::m::v1::user::keys::claim::make_content(const mutable_buffer &buf,
|
||||
const users_devices &v)
|
||||
ircd::m::fed::user::keys::claim::make_content(const mutable_buffer &buf,
|
||||
const users_devices &v)
|
||||
{
|
||||
json::stack out{buf};
|
||||
{
|
||||
|
@ -1192,8 +1192,8 @@ ircd::m::v1::user::keys::claim::make_content(const mutable_buffer &buf,
|
|||
}
|
||||
|
||||
ircd::json::object
|
||||
ircd::m::v1::user::keys::claim::make_content(const mutable_buffer &buf,
|
||||
const users_devices_map &v)
|
||||
ircd::m::fed::user::keys::claim::make_content(const mutable_buffer &buf,
|
||||
const users_devices_map &v)
|
||||
{
|
||||
json::stack out{buf};
|
||||
{
|
||||
|
@ -1223,12 +1223,12 @@ ircd::m::v1::user::keys::claim::make_content(const mutable_buffer &buf,
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// v1/user.h
|
||||
// fed/user.h
|
||||
//
|
||||
|
||||
ircd::m::v1::user::devices::devices(const id::user &user_id,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::user::devices::devices(const id::user &user_id,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:server::request{[&]
|
||||
{
|
||||
if(!opts.remote)
|
||||
|
@ -1276,18 +1276,18 @@ ircd::m::v1::user::devices::devices(const id::user &user_id,
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// v1/query.h
|
||||
// fed/query.h
|
||||
//
|
||||
|
||||
namespace ircd::m::v1
|
||||
namespace ircd::m::fed
|
||||
{
|
||||
thread_local char query_arg_buf[1024];
|
||||
thread_local char query_url_buf[1024];
|
||||
}
|
||||
|
||||
ircd::m::v1::query::directory::directory(const id::room_alias &room_alias,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::query::directory::directory(const id::room_alias &room_alias,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:query
|
||||
{
|
||||
"directory",
|
||||
|
@ -1301,9 +1301,9 @@ ircd::m::v1::query::directory::directory(const id::room_alias &room_alias,
|
|||
{
|
||||
}
|
||||
|
||||
ircd::m::v1::query::profile::profile(const id::user &user_id,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::query::profile::profile(const id::user &user_id,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:query
|
||||
{
|
||||
"profile",
|
||||
|
@ -1317,10 +1317,10 @@ ircd::m::v1::query::profile::profile(const id::user &user_id,
|
|||
{
|
||||
}
|
||||
|
||||
ircd::m::v1::query::profile::profile(const id::user &user_id,
|
||||
const string_view &field,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::query::profile::profile(const id::user &user_id,
|
||||
const string_view &field,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:query
|
||||
{
|
||||
"profile",
|
||||
|
@ -1337,10 +1337,10 @@ ircd::m::v1::query::profile::profile(const id::user &user_id,
|
|||
{
|
||||
}
|
||||
|
||||
ircd::m::v1::query::query(const string_view &type,
|
||||
const string_view &args,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::query::query(const string_view &type,
|
||||
const string_view &args,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:server::request{[&]
|
||||
{
|
||||
assert(!!opts.remote);
|
||||
|
@ -1389,12 +1389,12 @@ ircd::m::v1::query::query(const string_view &type,
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// v1/key.h
|
||||
// fed/key.h
|
||||
//
|
||||
|
||||
ircd::m::v1::key::keys::keys(const string_view &server_name,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::key::keys::keys(const string_view &server_name,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:keys
|
||||
{
|
||||
server_key{server_name, ""}, buf, std::move(opts)
|
||||
|
@ -1402,9 +1402,9 @@ ircd::m::v1::key::keys::keys(const string_view &server_name,
|
|||
{
|
||||
}
|
||||
|
||||
ircd::m::v1::key::keys::keys(const server_key &server_key,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::key::keys::keys(const server_key &server_key,
|
||||
const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:server::request{[&]
|
||||
{
|
||||
const auto &server_name{server_key.first};
|
||||
|
@ -1458,16 +1458,16 @@ ircd::m::v1::key::keys::keys(const server_key &server_key,
|
|||
{
|
||||
}
|
||||
|
||||
namespace ircd::m::v1
|
||||
namespace ircd::m::fed
|
||||
{
|
||||
static const_buffer
|
||||
_make_server_keys(const vector_view<const key::server_key> &,
|
||||
const mutable_buffer &);
|
||||
}
|
||||
|
||||
ircd::m::v1::key::query::query(const vector_view<const server_key> &keys,
|
||||
const mutable_buffer &buf_,
|
||||
opts opts)
|
||||
ircd::m::fed::key::query::query(const vector_view<const server_key> &keys,
|
||||
const mutable_buffer &buf_,
|
||||
opts opts)
|
||||
:server::request{[&]
|
||||
{
|
||||
assert(!!opts.remote);
|
||||
|
@ -1520,8 +1520,8 @@ ircd::m::v1::key::query::query(const vector_view<const server_key> &keys,
|
|||
}
|
||||
|
||||
static ircd::const_buffer
|
||||
ircd::m::v1::_make_server_keys(const vector_view<const key::server_key> &keys,
|
||||
const mutable_buffer &buf)
|
||||
ircd::m::fed::_make_server_keys(const vector_view<const key::server_key> &keys,
|
||||
const mutable_buffer &buf)
|
||||
{
|
||||
json::stack out{buf};
|
||||
json::stack::object top{out};
|
||||
|
@ -1558,11 +1558,11 @@ ircd::m::v1::_make_server_keys(const vector_view<const key::server_key> &keys,
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// v1/version.h
|
||||
// fed/version.h
|
||||
//
|
||||
|
||||
ircd::m::v1::version::version(const mutable_buffer &buf,
|
||||
opts opts)
|
||||
ircd::m::fed::version::version(const mutable_buffer &buf,
|
||||
opts opts)
|
||||
:server::request{[&]
|
||||
{
|
||||
assert(!!opts.remote);
|
||||
|
@ -1597,7 +1597,7 @@ ircd::m::v1::version::version(const mutable_buffer &buf,
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// v1/v1.h
|
||||
// fed/v1.h
|
||||
//
|
||||
|
||||
ircd::conf::item<ircd::milliseconds>
|
||||
|
@ -1608,8 +1608,8 @@ fetch_head_timeout
|
|||
};
|
||||
|
||||
ircd::m::event::id::buf
|
||||
ircd::m::v1::fetch_head(const id::room &room_id,
|
||||
const net::hostport &remote)
|
||||
ircd::m::fed::fetch_head(const id::room &room_id,
|
||||
const net::hostport &remote)
|
||||
{
|
||||
const m::room room
|
||||
{
|
||||
|
@ -1635,9 +1635,9 @@ ircd::m::v1::fetch_head(const id::room &room_id,
|
|||
}
|
||||
|
||||
ircd::m::event::id::buf
|
||||
ircd::m::v1::fetch_head(const id::room &room_id,
|
||||
const net::hostport &remote,
|
||||
const id::user &user_id)
|
||||
ircd::m::fed::fetch_head(const id::room &room_id,
|
||||
const net::hostport &remote,
|
||||
const id::user &user_id)
|
||||
{
|
||||
const unique_buffer<mutable_buffer> buf
|
||||
{
|
||||
|
|
|
@ -149,19 +149,19 @@ ircd::m::feds::send(const opts &opts,
|
|||
const auto make_request{[&opts]
|
||||
(auto &request, const auto &origin)
|
||||
{
|
||||
m::v1::send::opts v1opts;
|
||||
m::fed::send::opts v1opts;
|
||||
v1opts.remote = string_view
|
||||
{
|
||||
strlcpy{request.origin, origin}
|
||||
};
|
||||
|
||||
return m::v1::send
|
||||
return m::fed::send
|
||||
{
|
||||
opts.arg[0], opts.arg[1], request.buf, std::move(v1opts)
|
||||
};
|
||||
}};
|
||||
|
||||
return for_each_in_room<m::v1::send>(opts, closure, make_request);
|
||||
return for_each_in_room<m::fed::send>(opts, closure, make_request);
|
||||
}
|
||||
|
||||
ircd::m::feds::request_list
|
||||
|
@ -171,27 +171,27 @@ ircd::m::feds::keys(const opts &opts,
|
|||
const auto make_request{[&opts]
|
||||
(auto &request, const auto &origin)
|
||||
{
|
||||
m::v1::key::query::opts v1opts;
|
||||
m::fed::key::query::opts v1opts;
|
||||
v1opts.dynamic = false;
|
||||
v1opts.remote = string_view
|
||||
{
|
||||
strlcpy{request.origin, origin}
|
||||
};
|
||||
|
||||
const m::v1::key::server_key server_key
|
||||
const m::fed::key::server_key server_key
|
||||
{
|
||||
opts.arg[0], opts.arg[1]
|
||||
};
|
||||
|
||||
return m::v1::key::query
|
||||
return m::fed::key::query
|
||||
{
|
||||
{&server_key, 1}, request.buf, std::move(v1opts)
|
||||
};
|
||||
}};
|
||||
|
||||
return opts.room_id?
|
||||
for_each_in_room<m::v1::key::query>(opts, closure, make_request):
|
||||
for_one<m::v1::key::query>(opts.arg[0], opts, closure, make_request);
|
||||
for_each_in_room<m::fed::key::query>(opts, closure, make_request):
|
||||
for_one<m::fed::key::query>(opts.arg[0], opts, closure, make_request);
|
||||
}
|
||||
|
||||
ircd::m::feds::request_list
|
||||
|
@ -201,20 +201,20 @@ ircd::m::feds::version(const opts &opts,
|
|||
static const auto make_request{[]
|
||||
(auto &request, const auto &origin)
|
||||
{
|
||||
m::v1::version::opts opts;
|
||||
m::fed::version::opts opts;
|
||||
opts.dynamic = false;
|
||||
opts.remote = string_view
|
||||
{
|
||||
strlcpy{request.origin, origin}
|
||||
};
|
||||
|
||||
return m::v1::version
|
||||
return m::fed::version
|
||||
{
|
||||
request.buf, std::move(opts)
|
||||
};
|
||||
}};
|
||||
|
||||
return for_each_in_room<m::v1::version>(opts, closure, make_request);
|
||||
return for_each_in_room<m::fed::version>(opts, closure, make_request);
|
||||
}
|
||||
|
||||
ircd::m::feds::request_list
|
||||
|
@ -224,7 +224,7 @@ ircd::m::feds::backfill(const opts &opts,
|
|||
const auto make_request{[&opts]
|
||||
(auto &request, const auto &origin)
|
||||
{
|
||||
m::v1::backfill::opts v1opts;
|
||||
m::fed::backfill::opts v1opts;
|
||||
v1opts.dynamic = true;
|
||||
v1opts.event_id = opts.event_id;
|
||||
v1opts.limit = opts.argi[0];
|
||||
|
@ -233,13 +233,13 @@ ircd::m::feds::backfill(const opts &opts,
|
|||
strlcpy{request.origin, origin}
|
||||
};
|
||||
|
||||
return m::v1::backfill
|
||||
return m::fed::backfill
|
||||
{
|
||||
opts.room_id, request.buf, std::move(v1opts)
|
||||
};
|
||||
}};
|
||||
|
||||
return for_each_in_room<m::v1::backfill>(opts, closure, make_request);
|
||||
return for_each_in_room<m::fed::backfill>(opts, closure, make_request);
|
||||
}
|
||||
|
||||
ircd::m::feds::request_list
|
||||
|
@ -249,7 +249,7 @@ ircd::m::feds::state(const opts &opts,
|
|||
const auto make_request{[&opts]
|
||||
(auto &request, const auto &origin)
|
||||
{
|
||||
m::v1::state::opts v1opts;
|
||||
m::fed::state::opts v1opts;
|
||||
v1opts.dynamic = true;
|
||||
v1opts.ids_only = opts.arg[0] == "ids";
|
||||
v1opts.event_id = opts.event_id;
|
||||
|
@ -258,13 +258,13 @@ ircd::m::feds::state(const opts &opts,
|
|||
strlcpy{request.origin, origin}
|
||||
};
|
||||
|
||||
return m::v1::state
|
||||
return m::fed::state
|
||||
{
|
||||
opts.room_id, request.buf, std::move(v1opts)
|
||||
};
|
||||
}};
|
||||
|
||||
return for_each_in_room<m::v1::state>(opts, closure, make_request);
|
||||
return for_each_in_room<m::fed::state>(opts, closure, make_request);
|
||||
}
|
||||
|
||||
ircd::m::feds::request_list
|
||||
|
@ -274,20 +274,20 @@ ircd::m::feds::event(const opts &opts,
|
|||
const auto make_request{[&opts]
|
||||
(auto &request, const auto &origin)
|
||||
{
|
||||
m::v1::event::opts v1opts;
|
||||
m::fed::event::opts v1opts;
|
||||
v1opts.dynamic = true;
|
||||
v1opts.remote = string_view
|
||||
{
|
||||
strlcpy{request.origin, origin}
|
||||
};
|
||||
|
||||
return m::v1::event
|
||||
return m::fed::event
|
||||
{
|
||||
opts.event_id, request.buf, std::move(v1opts)
|
||||
};
|
||||
}};
|
||||
|
||||
return for_each_in_room<m::v1::event>(opts, closure, make_request);
|
||||
return for_each_in_room<m::fed::event>(opts, closure, make_request);
|
||||
}
|
||||
|
||||
ircd::m::feds::request_list
|
||||
|
@ -297,20 +297,20 @@ ircd::m::feds::auth(const opts &opts,
|
|||
const auto make_request{[&opts]
|
||||
(auto &request, const auto &origin)
|
||||
{
|
||||
m::v1::event_auth::opts v1opts;
|
||||
m::fed::event_auth::opts v1opts;
|
||||
v1opts.dynamic = true;
|
||||
v1opts.remote = string_view
|
||||
{
|
||||
strlcpy{request.origin, origin}
|
||||
};
|
||||
|
||||
return m::v1::event_auth
|
||||
return m::fed::event_auth
|
||||
{
|
||||
opts.room_id, opts.event_id, request.buf, std::move(v1opts)
|
||||
};
|
||||
}};
|
||||
|
||||
return for_each_in_room<m::v1::event_auth>(opts, closure, make_request);
|
||||
return for_each_in_room<m::fed::event_auth>(opts, closure, make_request);
|
||||
}
|
||||
|
||||
ircd::m::feds::request_list
|
||||
|
@ -320,19 +320,19 @@ ircd::m::feds::head(const opts &opts,
|
|||
const auto make_request{[&opts]
|
||||
(auto &request, const auto &origin)
|
||||
{
|
||||
m::v1::make_join::opts v1opts;
|
||||
m::fed::make_join::opts v1opts;
|
||||
v1opts.remote = string_view
|
||||
{
|
||||
strlcpy{request.origin, origin}
|
||||
};
|
||||
|
||||
return m::v1::make_join
|
||||
return m::fed::make_join
|
||||
{
|
||||
opts.room_id, opts.user_id, request.buf, std::move(v1opts)
|
||||
};
|
||||
}};
|
||||
|
||||
return for_each_in_room<m::v1::make_join>(opts, closure, make_request);
|
||||
return for_each_in_room<m::fed::make_join>(opts, closure, make_request);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -461,10 +461,10 @@ try
|
|||
|
||||
case op::auth:
|
||||
{
|
||||
v1::event_auth::opts opts;
|
||||
fed::event_auth::opts opts;
|
||||
opts.remote = remote;
|
||||
opts.dynamic = true;
|
||||
request.future = std::make_unique<v1::event_auth>
|
||||
request.future = std::make_unique<fed::event_auth>
|
||||
(
|
||||
request.opts.room_id,
|
||||
request.opts.event_id,
|
||||
|
@ -477,10 +477,10 @@ try
|
|||
|
||||
case op::event:
|
||||
{
|
||||
v1::event::opts opts;
|
||||
fed::event::opts opts;
|
||||
opts.remote = remote;
|
||||
opts.dynamic = true;
|
||||
request.future = std::make_unique<v1::event>
|
||||
request.future = std::make_unique<fed::event>
|
||||
(
|
||||
request.opts.event_id,
|
||||
request.buf,
|
||||
|
@ -492,13 +492,13 @@ try
|
|||
|
||||
case op::backfill:
|
||||
{
|
||||
v1::backfill::opts opts;
|
||||
fed::backfill::opts opts;
|
||||
opts.remote = remote;
|
||||
opts.dynamic = true;
|
||||
opts.limit = request.opts.backfill_limit;
|
||||
opts.limit = opts.limit?: size_t(backfill_limit_default);
|
||||
opts.event_id = request.opts.event_id;
|
||||
request.future = std::make_unique<v1::backfill>
|
||||
request.future = std::make_unique<fed::backfill>
|
||||
(
|
||||
request.opts.room_id,
|
||||
request.buf,
|
||||
|
|
|
@ -667,9 +667,9 @@ ircd::m::init::backfill::gossip(const room::id &room_id,
|
|||
m::txn::create_id(idbuf, txn)
|
||||
};
|
||||
|
||||
m::v1::send::opts opts;
|
||||
m::fed::send::opts opts;
|
||||
opts.remote = remote;
|
||||
m::v1::send request
|
||||
m::fed::send request
|
||||
{
|
||||
txnid, txn, buf[1], std::move(opts)
|
||||
};
|
||||
|
|
|
@ -218,7 +218,7 @@ try
|
|||
{
|
||||
assert(!query_server.empty());
|
||||
|
||||
m::v1::key::opts opts;
|
||||
m::fed::key::opts opts;
|
||||
opts.remote = net::hostport{query_server};
|
||||
opts.dynamic = true;
|
||||
const unique_buffer<mutable_buffer> buf
|
||||
|
@ -226,7 +226,7 @@ try
|
|||
16_KiB
|
||||
};
|
||||
|
||||
m::v1::key::query request
|
||||
m::fed::key::query request
|
||||
{
|
||||
queries, buf, std::move(opts)
|
||||
};
|
||||
|
@ -328,14 +328,14 @@ try
|
|||
m::log, "Keys for %s not cached; querying network...", server_name
|
||||
};
|
||||
|
||||
m::v1::key::opts opts;
|
||||
m::fed::key::opts opts;
|
||||
opts.dynamic = false;
|
||||
const unique_buffer<mutable_buffer> buf
|
||||
{
|
||||
16_KiB
|
||||
};
|
||||
|
||||
m::v1::key::keys request
|
||||
m::fed::key::keys request
|
||||
{
|
||||
server_name, buf, std::move(opts)
|
||||
};
|
||||
|
|
|
@ -372,11 +372,11 @@ try
|
|||
16_KiB
|
||||
};
|
||||
|
||||
m::v1::query::opts opts;
|
||||
m::fed::query::opts opts;
|
||||
opts.remote = hp;
|
||||
opts.dynamic = true;
|
||||
|
||||
m::v1::query::directory request
|
||||
m::fed::query::directory request
|
||||
{
|
||||
alias, buf, std::move(opts)
|
||||
};
|
||||
|
|
|
@ -415,11 +415,11 @@ try
|
|||
16_KiB // headers in and out
|
||||
};
|
||||
|
||||
m::v1::backfill::opts opts{host};
|
||||
m::fed::backfill::opts opts{host};
|
||||
opts.dynamic = true;
|
||||
opts.event_id = event_id;
|
||||
opts.limit = size_t(backfill_limit);
|
||||
m::v1::backfill request
|
||||
m::fed::backfill request
|
||||
{
|
||||
room_id, buf, std::move(opts)
|
||||
};
|
||||
|
@ -547,7 +547,7 @@ void
|
|||
ircd::m::bootstrap::fetch_keys(const json::array &events)
|
||||
try
|
||||
{
|
||||
std::vector<m::v1::key::server_key> queries;
|
||||
std::vector<m::fed::key::server_key> queries;
|
||||
queries.reserve(events.size());
|
||||
|
||||
for(const json::object &event : events)
|
||||
|
@ -605,9 +605,9 @@ try
|
|||
16_KiB // headers in and out
|
||||
};
|
||||
|
||||
m::v1::send_join::opts opts{host};
|
||||
m::fed::send_join::opts opts{host};
|
||||
opts.dynamic = true;
|
||||
m::v1::send_join send_join
|
||||
m::fed::send_join send_join
|
||||
{
|
||||
room_id, event_id, event, buf, std::move(opts)
|
||||
};
|
||||
|
@ -669,8 +669,8 @@ try
|
|||
16_KiB // headers in and out
|
||||
};
|
||||
|
||||
m::v1::make_join::opts opts{host};
|
||||
m::v1::make_join request
|
||||
m::fed::make_join::opts opts{host};
|
||||
m::fed::make_join request
|
||||
{
|
||||
room_id, user_id, buf, std::move(opts)
|
||||
};
|
||||
|
|
|
@ -70,7 +70,7 @@ ircd::m::rooms::summary::fetch::fetch(const string_view &origin,
|
|||
const string_view &since,
|
||||
const size_t &limit)
|
||||
{
|
||||
m::v1::public_rooms::opts opts;
|
||||
m::fed::public_rooms::opts opts;
|
||||
opts.limit = limit;
|
||||
opts.since = since;
|
||||
opts.include_all_networks = true;
|
||||
|
@ -81,7 +81,7 @@ ircd::m::rooms::summary::fetch::fetch(const string_view &origin,
|
|||
16_KiB
|
||||
};
|
||||
|
||||
m::v1::public_rooms request
|
||||
m::fed::public_rooms request
|
||||
{
|
||||
origin, buf, std::move(opts)
|
||||
};
|
||||
|
|
|
@ -131,10 +131,10 @@ ircd::m::user::profile::fetch(const m::user &user,
|
|||
64_KiB
|
||||
};
|
||||
|
||||
m::v1::query::opts opts;
|
||||
m::fed::query::opts opts;
|
||||
opts.remote = remote?: user.user_id.host();
|
||||
opts.dynamic = true;
|
||||
m::v1::query::profile federation_request
|
||||
m::fed::query::profile federation_request
|
||||
{
|
||||
user.user_id, key, buf, std::move(opts)
|
||||
};
|
||||
|
|
|
@ -375,7 +375,7 @@ void
|
|||
ircd::m::vm::eval::mfetch_keys()
|
||||
const
|
||||
{
|
||||
using m::v1::key::server_key;
|
||||
using m::fed::key::server_key;
|
||||
|
||||
// Determine federation keys which we don't have.
|
||||
std::set<server_key> miss;
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace
|
|||
{
|
||||
using user_devices_map = std::map<m::user::id, json::object>;
|
||||
using host_users_map = std::map<string_view, user_devices_map>;
|
||||
using query_map = std::map<string_view, m::v1::user::keys::claim>;
|
||||
using query_map = std::map<string_view, m::fed::user::keys::claim>;
|
||||
using failure_map = std::map<string_view, std::exception_ptr, std::less<>>;
|
||||
using buffer_list = std::vector<unique_buffer<mutable_buffer>>;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ send_requests(const host_users_map &,
|
|||
|
||||
static void
|
||||
recv_response(const string_view &,
|
||||
m::v1::user::keys::claim &,
|
||||
m::fed::user::keys::claim &,
|
||||
failure_map &,
|
||||
json::stack::object &,
|
||||
const system_point &);
|
||||
|
@ -212,7 +212,7 @@ recv_responses(query_map &queries,
|
|||
|
||||
void
|
||||
recv_response(const string_view &remote,
|
||||
m::v1::user::keys::claim &request,
|
||||
m::fed::user::keys::claim &request,
|
||||
failure_map &failures,
|
||||
json::stack::object &object,
|
||||
const system_point &timeout)
|
||||
|
@ -272,7 +272,7 @@ send_request(const string_view &remote,
|
|||
query_map &ret)
|
||||
try
|
||||
{
|
||||
m::v1::user::keys::claim::opts opts;
|
||||
m::fed::user::keys::claim::opts opts;
|
||||
opts.remote = remote;
|
||||
const auto &buffer
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace
|
|||
{
|
||||
using user_devices_map = std::map<m::user::id, json::array>;
|
||||
using host_users_map = std::map<string_view, user_devices_map>;
|
||||
using query_map = std::map<string_view, m::v1::user::keys::query>;
|
||||
using query_map = std::map<string_view, m::fed::user::keys::query>;
|
||||
using failure_map = std::map<string_view, std::exception_ptr, std::less<>>;
|
||||
using buffer_list = std::vector<unique_buffer<mutable_buffer>>;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ send_requests(const host_users_map &,
|
|||
|
||||
static void
|
||||
recv_response(const string_view &,
|
||||
m::v1::user::keys::query &,
|
||||
m::fed::user::keys::query &,
|
||||
failure_map &,
|
||||
json::stack::object &);
|
||||
|
||||
|
@ -212,7 +212,7 @@ try
|
|||
while(!queries.empty())
|
||||
{
|
||||
static const auto dereferencer{[]
|
||||
(auto &it) -> m::v1::user::keys::query &
|
||||
(auto &it) -> m::fed::user::keys::query &
|
||||
{
|
||||
return it->second;
|
||||
}};
|
||||
|
@ -247,7 +247,7 @@ catch(const std::exception &)
|
|||
|
||||
void
|
||||
recv_response(const string_view &remote,
|
||||
m::v1::user::keys::query &request,
|
||||
m::fed::user::keys::query &request,
|
||||
failure_map &failures,
|
||||
json::stack::object &object)
|
||||
try
|
||||
|
@ -322,7 +322,7 @@ send_request(const string_view &remote,
|
|||
query_map &ret)
|
||||
try
|
||||
{
|
||||
m::v1::user::keys::query::opts opts;
|
||||
m::fed::user::keys::query::opts opts;
|
||||
opts.remote = remote;
|
||||
opts.dynamic = true;
|
||||
const auto &buffer
|
||||
|
|
|
@ -279,7 +279,7 @@ get__initialsync_remote(client &client,
|
|||
|
||||
const auto head
|
||||
{
|
||||
m::v1::fetch_head(room, remote, request.user_id)
|
||||
m::fed::fetch_head(room, remote, request.user_id)
|
||||
};
|
||||
|
||||
m::room room_{room};
|
||||
|
|
|
@ -181,9 +181,9 @@ try
|
|||
bufs + size(proto)
|
||||
};
|
||||
|
||||
m::v2::invite::opts opts;
|
||||
m::fed::invite2::opts opts;
|
||||
opts.remote = target.host();
|
||||
m::v2::invite request
|
||||
m::fed::invite2 request
|
||||
{
|
||||
room_id, event_id, proto, buf, std::move(opts)
|
||||
};
|
||||
|
|
|
@ -6596,9 +6596,9 @@ console_cmd__stage__send(opt &out, const string_view &line)
|
|||
16_KiB
|
||||
};
|
||||
|
||||
m::v1::send::opts opts;
|
||||
m::fed::send::opts opts;
|
||||
opts.remote = remote;
|
||||
m::v1::send request
|
||||
m::fed::send request
|
||||
{
|
||||
txnid, const_buffer{txn}, bufs, std::move(opts)
|
||||
};
|
||||
|
@ -6610,7 +6610,7 @@ console_cmd__stage__send(opt &out, const string_view &line)
|
|||
};
|
||||
|
||||
const json::object response{request};
|
||||
const m::v1::send::response resp
|
||||
const m::fed::send::response resp
|
||||
{
|
||||
response
|
||||
};
|
||||
|
@ -7313,7 +7313,7 @@ console_cmd__event__sign(opt &out, const string_view &line)
|
|||
param[2]
|
||||
};
|
||||
|
||||
m::v1::event::opts opts;
|
||||
m::fed::event::opts opts;
|
||||
opts.remote = host;
|
||||
opts.dynamic = false;
|
||||
const unique_buffer<mutable_buffer> buf
|
||||
|
@ -7321,7 +7321,7 @@ console_cmd__event__sign(opt &out, const string_view &line)
|
|||
128_KiB
|
||||
};
|
||||
|
||||
m::v1::event request
|
||||
m::fed::event request
|
||||
{
|
||||
event_id, buf, std::move(opts)
|
||||
};
|
||||
|
@ -12451,7 +12451,7 @@ console_cmd__feds__perspective(opt &out, const string_view &line)
|
|||
param.at(2)
|
||||
};
|
||||
|
||||
const m::v1::key::server_key server_key
|
||||
const m::fed::key::server_key server_key
|
||||
{
|
||||
server_name, key_id
|
||||
};
|
||||
|
@ -12661,8 +12661,8 @@ console_cmd__fed__groups(opt &out, const string_view &line)
|
|||
32_KiB
|
||||
};
|
||||
|
||||
m::v1::groups::publicised::opts opts;
|
||||
m::v1::groups::publicised request
|
||||
m::fed::groups::publicised::opts opts;
|
||||
m::fed::groups::publicised request
|
||||
{
|
||||
node, vector_view<const m::user::id>(ids, count), buf, std::move(opts)
|
||||
};
|
||||
|
@ -12716,9 +12716,9 @@ console_cmd__fed__head(opt &out, const string_view &line)
|
|||
16_KiB
|
||||
};
|
||||
|
||||
m::v1::make_join::opts opts;
|
||||
m::fed::make_join::opts opts;
|
||||
opts.remote = remote;
|
||||
m::v1::make_join request
|
||||
m::fed::make_join request
|
||||
{
|
||||
room_id, user_id, buf, std::move(opts)
|
||||
};
|
||||
|
@ -12828,9 +12828,9 @@ console_cmd__fed__send(opt &out, const string_view &line)
|
|||
16_KiB
|
||||
};
|
||||
|
||||
m::v1::send::opts opts;
|
||||
m::fed::send::opts opts;
|
||||
opts.remote = remote;
|
||||
m::v1::send request
|
||||
m::fed::send request
|
||||
{
|
||||
txnid, const_buffer{txn}, bufs, std::move(opts)
|
||||
};
|
||||
|
@ -12847,7 +12847,7 @@ console_cmd__fed__send(opt &out, const string_view &line)
|
|||
request
|
||||
};
|
||||
|
||||
const m::v1::send::response resp
|
||||
const m::fed::send::response resp
|
||||
{
|
||||
response
|
||||
};
|
||||
|
@ -12904,7 +12904,7 @@ console_cmd__fed__sync(opt &out, const string_view &line)
|
|||
32_KiB
|
||||
};
|
||||
|
||||
m::v1::state::opts stopts;
|
||||
m::fed::state::opts stopts;
|
||||
stopts.remote = remote;
|
||||
stopts.event_id = event_id;
|
||||
const mutable_buffer stbuf
|
||||
|
@ -12912,12 +12912,12 @@ console_cmd__fed__sync(opt &out, const string_view &line)
|
|||
data(buf), size(buf) / 2
|
||||
};
|
||||
|
||||
m::v1::state strequest
|
||||
m::fed::state strequest
|
||||
{
|
||||
room_id, stbuf, std::move(stopts)
|
||||
};
|
||||
|
||||
m::v1::backfill::opts bfopts;
|
||||
m::fed::backfill::opts bfopts;
|
||||
bfopts.remote = remote;
|
||||
bfopts.event_id = event_id;
|
||||
bfopts.limit = limit;
|
||||
|
@ -12926,7 +12926,7 @@ console_cmd__fed__sync(opt &out, const string_view &line)
|
|||
buf + size(stbuf)
|
||||
};
|
||||
|
||||
m::v1::backfill bfrequest
|
||||
m::fed::backfill bfrequest
|
||||
{
|
||||
room_id, bfbuf, std::move(bfopts)
|
||||
};
|
||||
|
@ -13037,10 +13037,10 @@ console_cmd__fed__state(opt &out, const string_view &line)
|
|||
16_KiB
|
||||
};
|
||||
|
||||
m::v1::state::opts opts;
|
||||
m::fed::state::opts opts;
|
||||
opts.remote = remote;
|
||||
opts.event_id = event_id;
|
||||
m::v1::state request
|
||||
m::fed::state request
|
||||
{
|
||||
room_id, buf, std::move(opts)
|
||||
};
|
||||
|
@ -13130,11 +13130,11 @@ console_cmd__fed__state_ids(opt &out, const string_view &line)
|
|||
16_KiB
|
||||
};
|
||||
|
||||
m::v1::state::opts opts;
|
||||
m::fed::state::opts opts;
|
||||
opts.remote = remote;
|
||||
opts.event_id = event_id;
|
||||
opts.ids_only = true;
|
||||
m::v1::state request
|
||||
m::fed::state request
|
||||
{
|
||||
room_id, buf, std::move(opts)
|
||||
};
|
||||
|
@ -13214,12 +13214,12 @@ console_cmd__fed__backfill(opt &out, const string_view &line)
|
|||
16_KiB
|
||||
};
|
||||
|
||||
m::v1::backfill::opts opts;
|
||||
m::fed::backfill::opts opts;
|
||||
opts.remote = remote;
|
||||
opts.limit = lex_cast<size_t>(count);
|
||||
opts.event_id = event_id;
|
||||
|
||||
m::v1::backfill request
|
||||
m::fed::backfill request
|
||||
{
|
||||
room_id, buf, std::move(opts)
|
||||
};
|
||||
|
@ -13309,7 +13309,7 @@ console_cmd__fed__frontfill(opt &out, const string_view &line)
|
|||
param.at(5, 0UL)
|
||||
};
|
||||
|
||||
m::v1::frontfill::opts opts;
|
||||
m::fed::frontfill::opts opts;
|
||||
opts.remote = remote;
|
||||
opts.limit = limit;
|
||||
opts.min_depth = min_depth;
|
||||
|
@ -13318,7 +13318,7 @@ console_cmd__fed__frontfill(opt &out, const string_view &line)
|
|||
16_KiB
|
||||
};
|
||||
|
||||
m::v1::frontfill request
|
||||
m::fed::frontfill request
|
||||
{
|
||||
room_id, {earliest, latest}, buf, std::move(opts)
|
||||
};
|
||||
|
@ -13360,7 +13360,7 @@ console_cmd__fed__event(opt &out, const string_view &line)
|
|||
param[2]
|
||||
};
|
||||
|
||||
m::v1::event::opts opts;
|
||||
m::fed::event::opts opts;
|
||||
opts.remote = remote;
|
||||
opts.dynamic = false;
|
||||
const unique_buffer<mutable_buffer> buf
|
||||
|
@ -13368,7 +13368,7 @@ console_cmd__fed__event(opt &out, const string_view &line)
|
|||
128_KiB
|
||||
};
|
||||
|
||||
m::v1::event request
|
||||
m::fed::event request
|
||||
{
|
||||
event_id, buf, std::move(opts)
|
||||
};
|
||||
|
@ -13468,7 +13468,7 @@ console_cmd__fed__public_rooms(opt &out, const string_view &line)
|
|||
param[3]
|
||||
};
|
||||
|
||||
m::v1::public_rooms::opts opts;
|
||||
m::fed::public_rooms::opts opts;
|
||||
opts.limit = limit;
|
||||
opts.third_party_instance_id = tpid;
|
||||
opts.include_all_networks = all_nets;
|
||||
|
@ -13477,7 +13477,7 @@ console_cmd__fed__public_rooms(opt &out, const string_view &line)
|
|||
16_KiB
|
||||
};
|
||||
|
||||
m::v1::public_rooms request
|
||||
m::fed::public_rooms request
|
||||
{
|
||||
remote, buf, std::move(opts)
|
||||
};
|
||||
|
@ -13546,7 +13546,7 @@ console_cmd__fed__auth(opt &out, const string_view &line)
|
|||
param["ids_only"]
|
||||
};
|
||||
|
||||
m::v1::event_auth::opts opts;
|
||||
m::fed::event_auth::opts opts;
|
||||
opts.remote = remote;
|
||||
opts.ids_only = ids_only == "ids";
|
||||
const unique_buffer<mutable_buffer> buf
|
||||
|
@ -13554,7 +13554,7 @@ console_cmd__fed__auth(opt &out, const string_view &line)
|
|||
16_KiB
|
||||
};
|
||||
|
||||
m::v1::event_auth request
|
||||
m::fed::event_auth request
|
||||
{
|
||||
room_id, event_id, buf, std::move(opts)
|
||||
};
|
||||
|
@ -13622,7 +13622,7 @@ console_cmd__fed__query_auth(opt &out, const string_view &line)
|
|||
param.at(2, event_id.host())
|
||||
};
|
||||
|
||||
m::v1::query_auth::opts opts;
|
||||
m::fed::query_auth::opts opts;
|
||||
opts.remote = remote;
|
||||
const unique_buffer<mutable_buffer> buf
|
||||
{
|
||||
|
@ -13658,7 +13658,7 @@ console_cmd__fed__query_auth(opt &out, const string_view &line)
|
|||
ost.completed()
|
||||
};
|
||||
|
||||
m::v1::query_auth request
|
||||
m::fed::query_auth request
|
||||
{
|
||||
room_id, event_id, content, buf + size(ost.completed()), std::move(opts)
|
||||
};
|
||||
|
@ -13712,7 +13712,7 @@ console_cmd__fed__query__profile(opt &out, const string_view &line)
|
|||
token_count(line, ' ') > 1? token(line, ' ', 1) : user_id.host()
|
||||
};
|
||||
|
||||
m::v1::query::opts opts;
|
||||
m::fed::query::opts opts;
|
||||
opts.remote = remote;
|
||||
|
||||
const unique_mutable_buffer buf
|
||||
|
@ -13720,7 +13720,7 @@ console_cmd__fed__query__profile(opt &out, const string_view &line)
|
|||
8_KiB
|
||||
};
|
||||
|
||||
m::v1::query::profile request
|
||||
m::fed::query::profile request
|
||||
{
|
||||
user_id, buf, std::move(opts)
|
||||
};
|
||||
|
@ -13753,7 +13753,7 @@ console_cmd__fed__query__directory(opt &out, const string_view &line)
|
|||
token_count(line, ' ') > 1? token(line, ' ', 1) : room_alias.host()
|
||||
};
|
||||
|
||||
m::v1::query::opts opts;
|
||||
m::fed::query::opts opts;
|
||||
opts.remote = remote;
|
||||
|
||||
const unique_mutable_buffer buf
|
||||
|
@ -13761,7 +13761,7 @@ console_cmd__fed__query__directory(opt &out, const string_view &line)
|
|||
8_KiB
|
||||
};
|
||||
|
||||
m::v1::query::directory request
|
||||
m::fed::query::directory request
|
||||
{
|
||||
room_alias, buf, std::move(opts)
|
||||
};
|
||||
|
@ -13799,7 +13799,7 @@ console_cmd__fed__user__devices(opt &out, const string_view &line)
|
|||
param.at("remote", user_id.host())
|
||||
};
|
||||
|
||||
m::v1::user::devices::opts opts;
|
||||
m::fed::user::devices::opts opts;
|
||||
opts.remote = remote;
|
||||
|
||||
const unique_buffer<mutable_buffer> buf
|
||||
|
@ -13807,7 +13807,7 @@ console_cmd__fed__user__devices(opt &out, const string_view &line)
|
|||
8_KiB
|
||||
};
|
||||
|
||||
m::v1::user::devices request
|
||||
m::fed::user::devices request
|
||||
{
|
||||
user_id, buf, std::move(opts)
|
||||
};
|
||||
|
@ -13863,7 +13863,7 @@ console_cmd__fed__user__keys__query(opt &out, const string_view &line)
|
|||
param.at("remote", user_id.host())
|
||||
};
|
||||
|
||||
m::v1::user::opts opts;
|
||||
m::fed::user::opts opts;
|
||||
opts.remote = remote;
|
||||
|
||||
const unique_buffer<mutable_buffer> buf
|
||||
|
@ -13871,7 +13871,7 @@ console_cmd__fed__user__keys__query(opt &out, const string_view &line)
|
|||
8_KiB
|
||||
};
|
||||
|
||||
m::v1::user::keys::query request
|
||||
m::fed::user::keys::query request
|
||||
{
|
||||
user_id, device_id, buf, std::move(opts)
|
||||
};
|
||||
|
@ -13949,7 +13949,7 @@ console_cmd__fed__user__keys__claim(opt &out, const string_view &line)
|
|||
param.at("remote", user_id.host())
|
||||
};
|
||||
|
||||
m::v1::user::opts opts;
|
||||
m::fed::user::opts opts;
|
||||
opts.remote = remote;
|
||||
|
||||
const unique_buffer<mutable_buffer> buf
|
||||
|
@ -13957,7 +13957,7 @@ console_cmd__fed__user__keys__claim(opt &out, const string_view &line)
|
|||
8_KiB
|
||||
};
|
||||
|
||||
m::v1::user::keys::claim request
|
||||
m::fed::user::keys::claim request
|
||||
{
|
||||
user_id, device_id, algorithm, buf, std::move(opts)
|
||||
};
|
||||
|
@ -14001,8 +14001,8 @@ console_cmd__fed__key(opt &out, const string_view &line)
|
|||
};
|
||||
|
||||
const unique_buffer<mutable_buffer> buf{16_KiB};
|
||||
m::v1::key::opts opts;
|
||||
m::v1::key::keys request
|
||||
m::fed::key::opts opts;
|
||||
m::fed::key::keys request
|
||||
{
|
||||
{server_name, key_id}, buf, std::move(opts)
|
||||
};
|
||||
|
@ -14051,7 +14051,7 @@ console_cmd__fed__key__query(opt &out, const string_view &line)
|
|||
r.emplace_back(split(req, ','));
|
||||
});
|
||||
|
||||
m::v1::key::opts opts;
|
||||
m::fed::key::opts opts;
|
||||
opts.dynamic = true;
|
||||
opts.remote = net::hostport
|
||||
{
|
||||
|
@ -14059,7 +14059,7 @@ console_cmd__fed__key__query(opt &out, const string_view &line)
|
|||
};
|
||||
|
||||
const unique_buffer<mutable_buffer> buf{24_KiB};
|
||||
m::v1::key::query request
|
||||
m::fed::key::query request
|
||||
{
|
||||
r, buf, std::move(opts)
|
||||
};
|
||||
|
@ -14092,7 +14092,7 @@ console_cmd__fed__version(opt &out, const string_view &line)
|
|||
token(line, ' ', 0)
|
||||
};
|
||||
|
||||
m::v1::version::opts opts;
|
||||
m::fed::version::opts opts;
|
||||
opts.remote = remote;
|
||||
|
||||
const unique_mutable_buffer buf
|
||||
|
@ -14100,7 +14100,7 @@ console_cmd__fed__version(opt &out, const string_view &line)
|
|||
16_KiB
|
||||
};
|
||||
|
||||
m::v1::version request
|
||||
m::fed::version request
|
||||
{
|
||||
buf, std::move(opts)
|
||||
};
|
||||
|
|
|
@ -325,7 +325,7 @@ try
|
|||
break;
|
||||
}
|
||||
|
||||
m::v1::send::opts opts;
|
||||
m::fed::send::opts opts;
|
||||
opts.remote = remote;
|
||||
opts.sopts = &sopts;
|
||||
|
||||
|
@ -453,7 +453,7 @@ try
|
|||
txn
|
||||
};
|
||||
|
||||
const m::v1::send::response resp
|
||||
const m::fed::send::response resp
|
||||
{
|
||||
obj
|
||||
};
|
||||
|
|
|
@ -92,7 +92,7 @@ struct node
|
|||
|
||||
struct txn
|
||||
:txndata
|
||||
,m::v1::send
|
||||
,m::fed::send
|
||||
{
|
||||
struct node *node;
|
||||
steady_point timeout;
|
||||
|
@ -100,7 +100,7 @@ struct txn
|
|||
|
||||
txn(struct node &node,
|
||||
std::string content,
|
||||
m::v1::send::opts opts)
|
||||
m::fed::send::opts opts)
|
||||
:txndata{std::move(content)}
|
||||
,send{this->txnid, string_view{this->content}, this->headers, std::move(opts)}
|
||||
,node{&node}
|
||||
|
|
|
@ -557,7 +557,7 @@ command__ping(const mutable_buffer &buf,
|
|||
if(room_ping)
|
||||
return command__ping__room(buf, user, room, cmd);
|
||||
|
||||
m::v1::version::opts opts;
|
||||
m::fed::version::opts opts;
|
||||
if(m::valid(m::id::USER, target))
|
||||
opts.remote = m::user::id(target).host();
|
||||
else
|
||||
|
@ -569,7 +569,7 @@ command__ping(const mutable_buffer &buf,
|
|||
};
|
||||
|
||||
util::timer timer;
|
||||
m::v1::version request
|
||||
m::fed::version request
|
||||
{
|
||||
http_buf, std::move(opts)
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue