0
0
Fork 0
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:
Jason Volk 2019-04-27 16:00:56 -07:00
parent 48f339ac82
commit f95d66a914

View file

@ -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)