0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +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 user
}; };
const room::state state return user_room.has("ircd.device.device_id", id);
{
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;
} }
bool bool