Тест 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.setDevice(device);
token.setType(packet.getTokenType());
device.addToken(token);
this.deviceRepository.save(device);
this.pushTokenRepository.save(token);
}
if(packet.getAction() == NetworkNotificationAction.UNSUBSCRIBE && pushToken != null){
/**
* Отписка от токена только если токен уже подписан
*/
device.removeToken(pushToken);
this.deviceRepository.save(device);
this.pushTokenRepository.delete(pushToken);
}
}