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

Merged
Royce59 merged 1 commits from dev into main 2026-03-20 18:24:23 +00:00
2 changed files with 15 additions and 4 deletions

View File

@@ -85,11 +85,11 @@ public class FirebaseDispatcher {
FirebaseMessaging.getInstance().send(message); FirebaseMessaging.getInstance().send(message);
} catch (Exception e) { } catch (Exception e) {
// Логирование ошибки e.printStackTrace();
} }
} }
} catch (Exception e) { } catch (Exception e) {
// Логирование ошибки e.printStackTrace();
} }
}); });
} }
@@ -146,12 +146,23 @@ public class FirebaseDispatcher {
.setTitle(title) .setTitle(title)
.setBody(messageText) .setBody(messageText)
.build()) .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) .setToken(token)
.build(); .build();
FirebaseMessaging.getInstance().send(message); FirebaseMessaging.getInstance().send(message);
} catch (Exception e) { } catch (Exception e) {
// Логирование ошибки e.printStackTrace();
} }
} }
} catch (Exception e) { } catch (Exception e) {

View File

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