Skip to content

Commit

Permalink
feat: Add Perks Notification Type - MEED-2450 - Meeds-io/MIPs#80 (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
boubaker committed Sep 15, 2023
1 parent c93f815 commit 28dbff9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import org.apache.commons.lang3.StringUtils;

import org.exoplatform.commons.api.notification.NotificationContext;
import org.exoplatform.commons.api.notification.NotificationMessageUtils;
import org.exoplatform.commons.api.notification.channel.template.AbstractTemplateBuilder;
import org.exoplatform.commons.api.notification.channel.template.TemplateProvider;
import org.exoplatform.commons.api.notification.model.MessageInfo;
Expand Down Expand Up @@ -64,9 +63,6 @@ protected MessageInfo makeMessage(NotificationContext ctx) { // NOSONAR

Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(notification.getLastModifiedDate());
templateContext.put("READ",
Boolean.parseBoolean(notification.getValueOwnerParameter(NotificationMessageUtils.READ_PORPERTY.getKey())) ? "read"
: "unread");
templateContext.put("NOTIFICATION_ID", notification.getId());
templateContext.put("LAST_UPDATED_TIME",
TimeConvertUtils.convertXTimeAgoByTimeServer(cal.getTime(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Notification.kudos.spaceReceived=Space {0} has received a kudos from {1}
Notification.label.SayHello=Hi
Notification.label.ViewFullDiscussion=View the full discussion
Notification.plugin.NewUserKudosButtonTitle=Say welcome
Notification.label.types.kudos=Kudos
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

extensionRegistry.registerExtension('WebNotification', 'notification-group-extension', {
rank: 40,
name: 'kudos',
plugins: [
'KudosActivityReceiverNotificationPlugin'
],
icon: 'fa-award',
});
extensionRegistry.registerExtension('WebNotification', 'notification-content-extension', {
type: 'KudosActivityReceiverNotificationPlugin',
rank: 10,
Expand Down

0 comments on commit 28dbff9

Please sign in to comment.