should not send notification if sender and receiver are the same
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerSocial@74109 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
b0d7c8f89c
commit
af449595a0
|
@ -57,6 +57,10 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
|
|||
*/
|
||||
private boolean saveNotification(Notification notification2Save) {
|
||||
_log.trace("Trying to send notification to: " + notification2Save.getUserid() + " Type: " + notification2Save.getType());
|
||||
if (notification2Save.getSenderid().compareTo(notification2Save.getUserid()) == 0) {
|
||||
_log.trace("Sender and Receiver are the same " + notification2Save.getUserid() + " Notification Stopped");
|
||||
return true; //I'm not sending notifications to the person who triggered it, pretend I sent it though
|
||||
}
|
||||
List<NotificationChannelType> channels = null;
|
||||
try {
|
||||
channels = getStoreInstance().getUserNotificationChannels(notification2Save.getUserid());
|
||||
|
@ -79,6 +83,7 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
|
|||
result = true;
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
/**
|
||||
* return the url of the application if exists in the profile
|
||||
|
|
Loading…
Reference in New Issue