Исправление sender_public_key

This commit is contained in:
RoyceDa
2026-03-20 20:23:54 +02:00
parent 5625acb4be
commit 6d94a6e72d
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);
}
/**