0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-01 05:08:59 +02:00

modules/client/rooms/invite: Send invite_room_state.

This commit is contained in:
Jason Volk 2019-07-13 20:35:17 -07:00
parent b9b3f9f00e
commit e82b58728a

View file

@ -156,22 +156,43 @@ try
}
};
}
{
json::stack::object _event
{
top, "event"
};
_event.append(event);
}
{
json::stack::array invite_room_state
{
top, "invite_room_state"
};
const auto append
{
[&invite_room_state](const m::event &event)
{
invite_room_state.append(event);
}
};
const m::room::state state
{
room_id
};
}
json::stack::member
{
top, "event", json::value{event}
};
state.get(std::nothrow, "m.room.create", "", append);
state.get(std::nothrow, "m.room.power_levels", "", append);
state.get(std::nothrow, "m.room.join_rules", "", append);
state.get(std::nothrow, "m.room.aliases", my_host(), append);
state.get(std::nothrow, "m.room.canonical_alias", "", append);
state.get(std::nothrow, "m.room.avatar", "", append);
state.get(std::nothrow, "m.room.name", "", append);
}
top.~object();
const string_view &proto