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:
parent
fe9635a70e
commit
f51bcf5939
1 changed files with 1 additions and 19 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue