Class ChatNotificationService

java.lang.Object
io.meeds.chat.service.ChatNotificationService

@Service public class ChatNotificationService extends Object
  • Field Details

    • IN_KEY

      public static String IN_KEY
    • USER_CHAT_NOTIFICATION_SCOPE

      public static final org.exoplatform.commons.api.settings.data.Scope USER_CHAT_NOTIFICATION_SCOPE
    • MUTED_ROOMS

      public static final String MUTED_ROOMS
      See Also:
  • Constructor Details

    • ChatNotificationService

      public ChatNotificationService()
  • Method Details

    • sendCreateNotificationAction

      public ScheduledFuture<?> sendCreateNotificationAction(String eventId, String userName, String roomId, int unreadCount)
      Sends a notification Creation request to the Push service on the browser based on the event contents
      Parameters:
      eventId -
      userName -
      roomId -
      unreadCount -
      Returns:
    • createNotification

      public io.meeds.pwa.model.PwaNotificationMessage createNotification(MatrixMessage message, String userName)
      Creates a notification based on the received message
      Parameters:
      message - the received message
      userName - the user who will receive the notification
      Returns:
      a PWA push notification object
    • createNotification

      public io.meeds.pwa.model.PwaNotificationMessage createNotification(String eventId, String roomId, String userName, String token)
      Creates a PWA notification based on the event details
      Parameters:
      eventId - the event Id
      roomId - the room ID
      userName - the user who received the notification
      Returns:
      notification object
    • createMentionNotification

      public void createMentionNotification(String eventId, String roomId, String userName)
      Creates a web/Mail notification for mentions in space Chat rooms
      Parameters:
      eventId - the event ID
      roomId - the room ID
    • isPrivateRoomMutedForUser

      public boolean isPrivateRoomMutedForUser(String userName, String roomId)
    • toggleMutePrivateRoom

      public void toggleMutePrivateRoom(String userName, String roomId)