mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
modules/federation/event_auth: Use visibility call for all logic rather than special case here.
This commit is contained in:
parent
48f339ac82
commit
f95d66a914
1 changed files with 2 additions and 4 deletions
|
@ -74,7 +74,7 @@ get__event_auth(client &client,
|
|||
{
|
||||
static const m::event::fetch::opts fopts
|
||||
{
|
||||
m::event::keys::include {"type", "state_key", "content"}
|
||||
m::event::keys::include {"room_id", "sender", "type", "state_key", "content"}
|
||||
};
|
||||
|
||||
const m::event::fetch event
|
||||
|
@ -82,9 +82,7 @@ get__event_auth(client &client,
|
|||
event_id, fopts
|
||||
};
|
||||
|
||||
if(at<"type"_>(event) == "m.room.member")
|
||||
if(m::user::id(at<"state_key"_>(event)).host() == request.origin)
|
||||
visible = true;
|
||||
visible = m::visible(event, request.node_id);
|
||||
}
|
||||
|
||||
if(!visible)
|
||||
|
|
Loading…
Reference in a new issue