Skip to content
Snippets Groups Projects
Commit 6834a42a authored by uhensler's avatar uhensler
Browse files

OO-3560: Notify only about published blog items

parent 75d87408
No related branches found
No related tags found
No related merge requests found
......@@ -98,15 +98,10 @@ public class FeedNotifications {
private void createSubscriptionItem(Item item, Publisher p){
Date modDate = item.getPublishDate();
if (compareDate.before(modDate)) {
if (item.isPublished() && compareDate.before(modDate)) {
String title = item.getTitle();
String author = item.getAuthor();
String desc;
if (item.isDraft()) {
return;
} else {
desc = translator.translate("notifications.entry", new String[] { title, author });
}
String desc = translator.translate("notifications.entry", new String[] { title, author });
String businessPath = p.getBusinessPath();
String urlToSend = BusinessControlFactory.getInstance()
.getURLFromBusinessPathString(businessPath);
......
......@@ -137,7 +137,7 @@ public abstract class FeedNotificationsHandler implements NotificationsHandler {
.getURLFromBusinessPathString(businessPath);
String iconCssClass = item.extraCSSClass();
Date publishDate = item.getPublishDate();
if(publishDate != null) {
if(item.isPublished()) {
if(compareDate.before(publishDate)) {
String desc = translator.translate("notifications.entry.published", new String[] { title, author });
items.add(new SubscriptionListItem(desc, urlToSend, businessPath, publishDate, iconCssClass));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment