mirror of
https://github.com/matrix-construct/construct
synced 2024-12-28 00:14:07 +01:00
modules/m_event: Check for target membership auth event first here.
This commit is contained in:
parent
6eeb8da71d
commit
8428774a25
1 changed files with 2 additions and 2 deletions
|
@ -943,10 +943,10 @@ ircd::m::event::auth::failed(const m::event &event,
|
|||
// user's current membership state is invite or join.
|
||||
if(json::get<"sender"_>(event) == json::get<"state_key"_>(event))
|
||||
{
|
||||
if(membership(*auth_member_target) == "join")
|
||||
if(auth_member_target && membership(*auth_member_target) == "join")
|
||||
return {};
|
||||
|
||||
if(membership(*auth_member_target) == "invite")
|
||||
if(auth_member_target && membership(*auth_member_target) == "invite")
|
||||
return {};
|
||||
|
||||
return "m.room.member membership=leave self-target must have membership=join|invite.";
|
||||
|
|
Loading…
Reference in a new issue