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