0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-17 23:40:57 +01:00

modules/m_room_create: Optimize check.

This commit is contained in:
Jason Volk 2019-09-13 13:40:24 -07:00
parent 1e62b68286
commit 7867bb6a4f

View file

@ -132,7 +132,7 @@ ircd::m::auth_room_create(const event &event,
// b. If the domain of the room_id does not match the domain of the
// sender, reject.
if(conforms(event).has(conforms::MISMATCH_CREATE_SENDER))
if(room::id(at<"room_id"_>(event)).host() != user::id(at<"sender"_>(event)).host())
throw FAIL
{
"m.room.create room_id domain does not match sender domain."