0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-24 12:58:21 +02:00

ircd:Ⓜ️:user::devices: Fix property iteration closure conditions.

This commit is contained in:
Jason Volk 2020-04-01 19:36:51 -07:00
parent adab45fb6a
commit b2a9efc6f9

View file

@ -362,16 +362,17 @@ const
};
return state.for_each(type, [&state, &device_id, &closure]
(const string_view &type, const string_view &, const event::idx &event_idx)
(const string_view &type, const string_view &state_key, const event::idx &event_idx)
{
if(state_key != device_id)
return true;
const string_view &prop
{
lstrip(type, "ircd.device.")
};
return state.has(type, device_id)?
closure(event_idx, prop):
true;
return closure(event_idx, prop);
});
}