0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 08:42:34 +01:00

ircd:Ⓜ️:user::devices: Simplify the existential test.

This commit is contained in:
Jason Volk 2020-04-01 19:15:38 -07:00
parent fe9635a70e
commit f51bcf5939

View file

@ -262,25 +262,7 @@ const
user
};
const room::state state
{
user_room
};
const room::state::type_prefix type
{
"ircd.device."
};
bool ret{false};
state.for_each(type, [&state, &id, &ret]
(const string_view &type, const string_view &, const event::idx &)
{
ret = state.has(type, id);
return !ret;
});
return ret;
return user_room.has("ircd.device.device_id", id);
}
bool