FCM уведомления
This commit is contained in:
@@ -27,6 +27,7 @@ public class MessageDispatcher {
|
||||
private final ClientManager clientManager;
|
||||
private final BufferRepository bufferRepository = new BufferRepository();
|
||||
private final BufferService bufferService;
|
||||
private final FirebaseDispatcher firebaseDispatcher = new FirebaseDispatcher();
|
||||
|
||||
public MessageDispatcher(ClientManager clientManager, PacketManager packetManager) {
|
||||
this.clientManager = clientManager;
|
||||
@@ -84,6 +85,10 @@ public class MessageDispatcher {
|
||||
* Отправляем сообщение всем, кто в беседе
|
||||
*/
|
||||
this.clientManager.sendPacketToAuthorizedPK(groupMembersPublicKeys, packet);
|
||||
/**
|
||||
* Отправляем PUSH уведомление
|
||||
*/
|
||||
this.firebaseDispatcher.sendPushNotification(groupMembersPublicKeys, "Rosetta", "New message in group");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -103,7 +108,14 @@ public class MessageDispatcher {
|
||||
* чтобы синхронизировать отправленные сообщения
|
||||
*/
|
||||
this.clientManager.retranslate(client, packet);
|
||||
/**
|
||||
* Отправляем сообщение получателю
|
||||
*/
|
||||
this.clientManager.sendPacketToAuthorizedPK(toPublicKey, packet);
|
||||
/**
|
||||
* Отправляем PUSH уведомление получателю
|
||||
*/
|
||||
this.firebaseDispatcher.sendPushNotification(toPublicKey, "Rosetta", "New message from");
|
||||
|
||||
if(!bufferizationNeed){
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user