fixed bug

This commit is contained in:
Massimiliano Assante 2022-05-03 16:43:55 +02:00
parent ebecec2c1e
commit 692e12d9dc
1 changed files with 3 additions and 3 deletions

View File

@ -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();