Set variables correctly on new-version notification
[Sone.git] / src / main / java / net / pterodactylus / sone / web / WebInterface.java
index 934b4b5..4b4ac88 100644 (file)
@@ -1019,10 +1019,10 @@ public class WebInterface {
         */
        @Subscribe
        public void updateFound(UpdateFoundEvent updateFoundEvent) {
-               newVersionNotification.getTemplateContext().set("latestVersion", updateFoundEvent.version());
-               newVersionNotification.getTemplateContext().set("latestEdition", updateFoundEvent.latestEdition());
-               newVersionNotification.getTemplateContext().set("releaseTime", updateFoundEvent.releaseTime());
-               newVersionNotification.getTemplateContext().set("disruptive", updateFoundEvent.disruptive());
+               newVersionNotification.set("latestVersion", updateFoundEvent.version());
+               newVersionNotification.set("latestEdition", updateFoundEvent.latestEdition());
+               newVersionNotification.set("releaseTime", updateFoundEvent.releaseTime());
+               newVersionNotification.set("disruptive", updateFoundEvent.disruptive());
                notificationManager.addNotification(newVersionNotification);
        }