0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-10 05:58:56 +02:00

ircd:Ⓜ️ Simplify/remove homeserver::rooms related.

This commit is contained in:
Jason Volk 2019-10-04 12:48:02 -07:00
parent b8f37894bc
commit 08ea932c59
3 changed files with 4 additions and 11 deletions

View file

@ -56,12 +56,6 @@ struct ircd::m::homeserver
/// Database
std::shared_ptr<dbs::init> database;
/// List of special room specific to this homeserver. This includes the
/// fundamental !ircd room, !conf room, etc. This list generally doesn't
/// change after construction, but it's mutable to allow modules to add
/// new rooms to the list.
std::set<m::room::id::buf> rooms;
/// An inscription of @ircd:network.name to root various references to
/// a user representing the server.
m::user::id::buf self;

View file

@ -34,9 +34,9 @@ ircd::m::rooms::summary::create_public_room
m::my(at<"origin"_>(event))
};
const auto &public_room_id
const m::room::id::buf public_room_id
{
*my.rooms.emplace("public", origin(my)).first
"public", origin(my)
};
m::create(public_room_id, me());

View file

@ -40,7 +40,6 @@ ircd::m::create_alias_room_hookfn
{ "room_id", "!ircd" },
{ "type", "m.room.create" },
},
[](const m::event &event, m::vm::eval &)
{
auto &my
@ -48,9 +47,9 @@ ircd::m::create_alias_room_hookfn
m::my(at<"origin"_>(event))
};
const auto &alias_room_id
const m::room::id::buf alias_room_id
{
*my.rooms.emplace("alias", origin(my)).first
"alias", origin(my)
};
create(alias_room_id, my.self);