mirror of
https://github.com/matrix-construct/construct
synced 2024-10-01 05:08:59 +02:00
ircd:Ⓜ️:user::devices: Fix property iteration closure conditions.
This commit is contained in:
parent
adab45fb6a
commit
b2a9efc6f9
1 changed files with 5 additions and 4 deletions
|
@ -362,16 +362,17 @@ const
|
||||||
};
|
};
|
||||||
|
|
||||||
return state.for_each(type, [&state, &device_id, &closure]
|
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
|
const string_view &prop
|
||||||
{
|
{
|
||||||
lstrip(type, "ircd.device.")
|
lstrip(type, "ircd.device.")
|
||||||
};
|
};
|
||||||
|
|
||||||
return state.has(type, device_id)?
|
return closure(event_idx, prop);
|
||||||
closure(event_idx, prop):
|
|
||||||
true;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue