Обновление протокола звонков

This commit is contained in:
RoyceDa
2026-04-02 18:11:24 +02:00
parent 398b869e59
commit 3c6b2e0e71
6 changed files with 86 additions and 20 deletions

View File

@@ -1,5 +1,6 @@
package im.rosetta.service.services;
import java.util.HashSet;
import java.util.List;
import im.rosetta.client.tags.ECIAuthentificate;
@@ -82,4 +83,18 @@ public class DeviceService extends Service<DeviceRepository> {
return device.getSyncTime();
}
/**
* Получить публичные ключи пользователей, которые связаны с данным deviceId
* @param deviceId ID устройства
* @return набор публичных ключей пользователей, которые связаны с данным deviceId
*/
public HashSet<String> getPublicKeysByDeviceId(String deviceId) {
List<Device> devices = this.getRepository().findAllByField("deviceId", deviceId);
HashSet<String> publicKeys = new HashSet<>();
for(Device device : devices) {
publicKeys.add(device.getPublicKey());
}
return publicKeys;
}
}