From 692e12d9dc6e08b2a7062c6d18b6a3fcd0b465a6 Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Tue, 3 May 2022 16:43:55 +0200 Subject: [PATCH] fixed bug --- .../social/networking/ws/methods/v2/Notifications.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/gcube/portal/social/networking/ws/methods/v2/Notifications.java b/src/main/java/org/gcube/portal/social/networking/ws/methods/v2/Notifications.java index 0424ad9..9c62404 100644 --- a/src/main/java/org/gcube/portal/social/networking/ws/methods/v2/Notifications.java +++ b/src/main/java/org/gcube/portal/social/networking/ws/methods/v2/Notifications.java @@ -189,7 +189,7 @@ public class Notifications { logger.debug("workspace notifications from user = " + username); - if (!message.getType().getNotificationClass().isInstance(message)) { + if (!message.TYPE().getNotificationClass().isInstance(message)) { //invalid call return Response.status(Status.BAD_REQUEST).build(); } @@ -198,14 +198,14 @@ public class Notifications { Status status = Status.OK; try { - logger.debug("workspace notifications type is " + message.getType()); + logger.debug("workspace notifications type is " + message.TYPE()); SocialNetworkingSite site = SocialNetworkingSiteFinder.getSocialNetworkingSiteFromScope(context); GCubeUser senderUser = UserManagerWSBuilder.getInstance().getUserManager().getUserByUsername(username); SocialNetworkingUser user = new SocialNetworkingUser(senderUser.getUsername(), senderUser.getEmail(), senderUser.getFullname(), senderUser.getUserAvatarURL()); NotificationsManager nm = new ApplicationNotificationsManager(UserManagerWSBuilder.getInstance().getUserManager(), site, context, user); - switch (message.getType()) { + switch (message.TYPE()) { case ITEM_NEW: { WorkspaceNotificationAddedItem itemBean = (WorkspaceNotificationAddedItem) message; String userIdToNotify = itemBean.getUserIdToNotify();