Тест 1
All checks were successful
Build rosetta-wss / build (push) Successful in 1m43s

This commit is contained in:
RoyceDa
2026-03-31 19:51:43 +02:00
parent a76496204c
commit aa17dd8d9d

View File

@@ -58,15 +58,13 @@ public class Executor16PushNotification extends PacketExecutor<Packet16PushNotif
token.setToken(notificationToken); token.setToken(notificationToken);
token.setDevice(device); token.setDevice(device);
token.setType(packet.getTokenType()); token.setType(packet.getTokenType());
device.addToken(token); this.pushTokenRepository.save(token);
this.deviceRepository.save(device);
} }
if(packet.getAction() == NetworkNotificationAction.UNSUBSCRIBE && pushToken != null){ if(packet.getAction() == NetworkNotificationAction.UNSUBSCRIBE && pushToken != null){
/** /**
* Отписка от токена только если токен уже подписан * Отписка от токена только если токен уже подписан
*/ */
device.removeToken(pushToken); this.pushTokenRepository.delete(pushToken);
this.deviceRepository.save(device);
} }
} }