mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +01:00
modules/client/rooms/join: Export namespaced definitions for join.
This commit is contained in:
parent
f6314a4201
commit
f3845e11af
2 changed files with 20 additions and 16 deletions
|
@ -4517,7 +4517,7 @@ ircd::m::join(const id::room_alias &room_alias,
|
||||||
|
|
||||||
static mods::import<prototype> function
|
static mods::import<prototype> function
|
||||||
{
|
{
|
||||||
"client_rooms", "join__alias_user"
|
"client_rooms", "ircd::m::join"
|
||||||
};
|
};
|
||||||
|
|
||||||
return function(room_alias, user_id);
|
return function(room_alias, user_id);
|
||||||
|
@ -4531,7 +4531,7 @@ ircd::m::join(const room &room,
|
||||||
|
|
||||||
static mods::import<prototype> function
|
static mods::import<prototype> function
|
||||||
{
|
{
|
||||||
"client_rooms", "join__room_user"
|
"client_rooms", "ircd::m::join"
|
||||||
};
|
};
|
||||||
|
|
||||||
return function(room, user_id);
|
return function(room, user_id);
|
||||||
|
|
|
@ -18,14 +18,6 @@ bootstrap(const string_view &host,
|
||||||
const m::room::id &room_id,
|
const m::room::id &room_id,
|
||||||
const m::user::id &user_id);
|
const m::user::id &user_id);
|
||||||
|
|
||||||
extern "C" event::id::buf
|
|
||||||
join__room_user(const room &room,
|
|
||||||
const id::user &user_id);
|
|
||||||
|
|
||||||
extern "C" event::id::buf
|
|
||||||
join__alias_user(const m::room::alias &room_alias,
|
|
||||||
const m::user::id &user_id);
|
|
||||||
|
|
||||||
resource::response
|
resource::response
|
||||||
post__join(client &client,
|
post__join(client &client,
|
||||||
const resource::request &request,
|
const resource::request &request,
|
||||||
|
@ -41,7 +33,12 @@ post__join(client &client,
|
||||||
unquote(request["server_name"])
|
unquote(request["server_name"])
|
||||||
};
|
};
|
||||||
|
|
||||||
join__room_user(room_id, request.user_id);
|
const m::room room
|
||||||
|
{
|
||||||
|
room_id
|
||||||
|
};
|
||||||
|
|
||||||
|
m::join(room, request.user_id);
|
||||||
|
|
||||||
return resource::response
|
return resource::response
|
||||||
{
|
{
|
||||||
|
@ -53,8 +50,9 @@ post__join(client &client,
|
||||||
}
|
}
|
||||||
|
|
||||||
event::id::buf
|
event::id::buf
|
||||||
join__room_user(const room &room,
|
IRCD_MODULE_EXPORT
|
||||||
const id::user &user_id)
|
ircd::m::join(const room &room,
|
||||||
|
const id::user &user_id)
|
||||||
{
|
{
|
||||||
if(!exists(room))
|
if(!exists(room))
|
||||||
{
|
{
|
||||||
|
@ -113,8 +111,9 @@ join__room_user(const room &room,
|
||||||
}
|
}
|
||||||
|
|
||||||
event::id::buf
|
event::id::buf
|
||||||
join__alias_user(const m::room::alias &room_alias,
|
IRCD_MODULE_EXPORT
|
||||||
const m::user::id &user_id)
|
ircd::m::join(const m::room::alias &room_alias,
|
||||||
|
const m::user::id &user_id)
|
||||||
{
|
{
|
||||||
const room::id::buf room_id
|
const room::id::buf room_id
|
||||||
{
|
{
|
||||||
|
@ -124,7 +123,12 @@ join__alias_user(const m::room::alias &room_alias,
|
||||||
if(!exists(room_id))
|
if(!exists(room_id))
|
||||||
return bootstrap(room_alias.host(), room_id, user_id);
|
return bootstrap(room_alias.host(), room_id, user_id);
|
||||||
|
|
||||||
return join__room_user(room_id, user_id);
|
const m::room room
|
||||||
|
{
|
||||||
|
room_id
|
||||||
|
};
|
||||||
|
|
||||||
|
return m::join(room, user_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
conf::item<seconds>
|
conf::item<seconds>
|
||||||
|
|
Loading…
Reference in a new issue