getUserDeviceKeys method
Returns all known device keys for all participants in this room.
Implementation
Future<List<DeviceKeys>> getUserDeviceKeys() async {
await client.userDeviceKeysLoading;
final deviceKeys = <DeviceKeys>[];
final users = await requestParticipants();
for (final user in users) {
final userDeviceKeys = client.userDeviceKeys[user.id]?.deviceKeys.values;
if ([Membership.invite, Membership.join].contains(user.membership) &&
userDeviceKeys != null) {
for (final deviceKeyEntry in userDeviceKeys) {
deviceKeys.add(deviceKeyEntry);
}
}
}
return deviceKeys;
}