Merge pull request 'Исправление sender_public_key' (#17) from dev into main
Some checks failed
Build rosetta-wss / build (push) Failing after 23s

Reviewed-on: #17
This commit was merged in pull request #17.
This commit is contained in:
2026-03-20 18:24:22 +00:00
2 changed files with 15 additions and 4 deletions

View File

@@ -85,11 +85,11 @@ public class FirebaseDispatcher {
FirebaseMessaging.getInstance().send(message);
} catch (Exception e) {
// Логирование ошибки
e.printStackTrace();
}
}
} catch (Exception e) {
// Логирование ошибки
e.printStackTrace();
}
});
}
@@ -146,12 +146,23 @@ public class FirebaseDispatcher {
.setTitle(title)
.setBody(messageText)
.build())
.setApnsConfig(ApnsConfig.builder()
.setAps(Aps.builder()
.setMutableContent(true)
.setSound("default")
.setAlert(ApsAlert.builder()
.setTitle(title)
.setBody(messageText)
.build())
.build())
.build())
.putData("sender_public_key", senderPublicKey != null ? senderPublicKey : "")
.setToken(token)
.build();
FirebaseMessaging.getInstance().send(message);
} catch (Exception e) {
// Логирование ошибки
e.printStackTrace();
}
}
} catch (Exception e) {

View File

@@ -164,7 +164,7 @@ public class MessageDispatcher {
/**
* Отправляем PUSH уведомление получателю
*/
this.firebaseDispatcher.sendPushNotification(toPublicKey, user.getTitle(), "New message");
this.firebaseDispatcher.sendPushNotification(toPublicKey, user.getTitle(), "New message", fromPublicKey);
}
/**