mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
modules/m_room: Move m::send impl back to client/rooms.
This commit is contained in:
parent
f3845e11af
commit
fd9097cfd4
4 changed files with 43 additions and 43 deletions
|
@ -4691,7 +4691,7 @@ ircd::m::send(const room &room,
|
|||
|
||||
static mods::import<prototype> function
|
||||
{
|
||||
"m_room", "ircd::m::send"
|
||||
"client_rooms", "ircd::m::send"
|
||||
};
|
||||
|
||||
return function(room, sender, type, state_key, content);
|
||||
|
@ -4741,7 +4741,7 @@ ircd::m::send(const room &room,
|
|||
|
||||
static mods::import<prototype> function
|
||||
{
|
||||
"m_room", "ircd::m::send"
|
||||
"client_rooms", "ircd::m::send"
|
||||
};
|
||||
|
||||
return function(room, sender, type, content);
|
||||
|
|
|
@ -97,6 +97,23 @@ put__send(client &client,
|
|||
};
|
||||
}
|
||||
|
||||
ircd::m::event::id::buf
|
||||
IRCD_MODULE_EXPORT
|
||||
ircd::m::send(const m::room &room,
|
||||
const m::id::user &sender,
|
||||
const string_view &type,
|
||||
const json::iov &content)
|
||||
{
|
||||
json::iov event;
|
||||
const json::iov::push push[]
|
||||
{
|
||||
{ event, { "sender", sender }},
|
||||
{ event, { "type", type }},
|
||||
};
|
||||
|
||||
return commit(room, event, content);
|
||||
}
|
||||
|
||||
resource::response
|
||||
handle_command(client &client,
|
||||
const resource::request &request,
|
||||
|
|
|
@ -13,6 +13,11 @@
|
|||
using namespace ircd::m;
|
||||
using namespace ircd;
|
||||
|
||||
static resource::response
|
||||
get__state(client &client,
|
||||
const resource::request &request,
|
||||
const m::room::state &state);
|
||||
|
||||
resource::response
|
||||
put__state(client &client,
|
||||
const resource::request &request,
|
||||
|
@ -61,11 +66,6 @@ put__state(client &client,
|
|||
};
|
||||
}
|
||||
|
||||
static resource::response
|
||||
get__state(client &client,
|
||||
const resource::request &request,
|
||||
const m::room::state &state);
|
||||
|
||||
resource::response
|
||||
get__state(client &client,
|
||||
const resource::request &request,
|
||||
|
@ -167,3 +167,22 @@ get__state(client &client,
|
|||
|
||||
return response;
|
||||
}
|
||||
|
||||
m::event::id::buf
|
||||
IRCD_MODULE_EXPORT
|
||||
ircd::m::send(const m::room &room,
|
||||
const m::id::user &sender,
|
||||
const string_view &type,
|
||||
const string_view &state_key,
|
||||
const json::iov &content)
|
||||
{
|
||||
json::iov event;
|
||||
const json::iov::push push[]
|
||||
{
|
||||
{ event, { "sender", sender }},
|
||||
{ event, { "type", type }},
|
||||
{ event, { "state_key", state_key }},
|
||||
};
|
||||
|
||||
return commit(room, event, content);
|
||||
}
|
||||
|
|
|
@ -16,42 +16,6 @@ IRCD_MODULE
|
|||
"Matrix room library; modular components."
|
||||
};
|
||||
|
||||
ircd::m::event::id::buf
|
||||
IRCD_MODULE_EXPORT
|
||||
ircd::m::send(const m::room &room,
|
||||
const m::id::user &sender,
|
||||
const string_view &type,
|
||||
const json::iov &content)
|
||||
{
|
||||
json::iov event;
|
||||
const json::iov::push push[]
|
||||
{
|
||||
{ event, { "sender", sender }},
|
||||
{ event, { "type", type }},
|
||||
};
|
||||
|
||||
return commit(room, event, content);
|
||||
}
|
||||
|
||||
m::event::id::buf
|
||||
IRCD_MODULE_EXPORT
|
||||
ircd::m::send(const m::room &room,
|
||||
const m::id::user &sender,
|
||||
const string_view &type,
|
||||
const string_view &state_key,
|
||||
const json::iov &content)
|
||||
{
|
||||
json::iov event;
|
||||
const json::iov::push push[]
|
||||
{
|
||||
{ event, { "sender", sender }},
|
||||
{ event, { "type", type }},
|
||||
{ event, { "state_key", state_key }},
|
||||
};
|
||||
|
||||
return commit(room, event, content);
|
||||
}
|
||||
|
||||
size_t
|
||||
IRCD_MODULE_EXPORT
|
||||
ircd::m::count_since(const m::room &room,
|
||||
|
|
Loading…
Reference in a new issue