This commit is contained in:
Massimiliano Assante 2022-05-04 08:59:59 +02:00
parent 1e7a371ff6
commit 92dfed500d
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.TYPE().getNotificationClass().isInstance(message)) {
if (!message.getType().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.TYPE());
logger.debug("workspace notifications type is " + message.getType());
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.TYPE()) {
switch (message.getType()) {
case ITEM_NEW: {
WorkspaceNotificationAddedItem itemBean = (WorkspaceNotificationAddedItem) message;
String userIdToNotify = itemBean.getUserIdToNotify();