0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 07:23:53 +01:00

ircd:Ⓜ️ Minor simplifications.

This commit is contained in:
Jason Volk 2020-12-06 14:23:18 -08:00
parent dceac7f9fc
commit 21dc2dc4f8

View file

@ -28,14 +28,9 @@ ircd::m::membership(const room &room,
const user::id &user_id,
const vector_view<const string_view> &membership)
{
const room::state state
{
room
};
const auto event_idx
{
state.get(std::nothrow, "m.room.member", user_id)
room.get(std::nothrow, "m.room.member", user_id)
};
return m::membership(event_idx, membership);
@ -99,14 +94,9 @@ ircd::m::membership(const mutable_buffer &out,
const room &room,
const user::id &user_id)
{
const room::state state
{
room
};
const auto event_idx
{
state.get(std::nothrow, "m.room.member", user_id)
room.get(std::nothrow, "m.room.member", user_id)
};
return m::membership(out, event_idx);