mirror of
https://github.com/matrix-construct/construct
synced 2024-11-15 14:31:11 +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
|
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
|
const m::event::fetch event
|
||||||
|
@ -82,9 +82,7 @@ get__event_auth(client &client,
|
||||||
event_id, fopts
|
event_id, fopts
|
||||||
};
|
};
|
||||||
|
|
||||||
if(at<"type"_>(event) == "m.room.member")
|
visible = m::visible(event, request.node_id);
|
||||||
if(m::user::id(at<"state_key"_>(event)).host() == request.origin)
|
|
||||||
visible = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!visible)
|
if(!visible)
|
||||||
|
|
Loading…
Reference in a new issue