Обновление протокола звонков
This commit is contained in:
@@ -97,7 +97,7 @@ public class FCM extends Pusher {
|
||||
Message message = this.buildMessage(token, data);
|
||||
FirebaseMessaging.getInstance().send(message);
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -255,5 +255,19 @@ public class ForwardUnitService {
|
||||
return iceServers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Получить комнату по ее ID, который используется на сервере SFU для идентификации комнаты.
|
||||
* @param roomId ID комнаты на сервере SFU
|
||||
* @return комната Room если найдена, иначе null
|
||||
*/
|
||||
public Room getRoomById(String roomId) {
|
||||
for(SFU sfu : this.sfuConnections) {
|
||||
Room room = sfu.getRoom(roomId);
|
||||
if(room != null) {
|
||||
return room;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user