0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-28 17:52:54 +01:00

ircd:Ⓜ️:vm::fetch: Propagate remote hint to event fetch opts for state fetch.

This commit is contained in:
Jason Volk 2020-10-03 04:45:37 -07:00
parent 0f95a6464e
commit c57844df2d

View file

@ -542,6 +542,15 @@ ircd::m::vm::fetch::state_fetch(const event &event,
opts.op = m::fetch::op::event;
opts.room_id = result.request->room_id;
opts.event_id = event_id;
opts.hint =
{
!my_host(eval.opts->node_id)?
eval.opts->node_id:
!my_host(result.origin)?
result.origin:
string_view{}
};
ret.emplace_front(m::fetch::start(opts));
assert(std::distance(begin(ret), end(ret)) <= ssize_t(req.size()));