🚧 Use handler for new-reply notifications
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / notification / NotificationHandlerModule.kt
index 2b147fc..4a91fc7 100644 (file)
@@ -44,6 +44,7 @@ class NotificationHandlerModule : AbstractModule() {
                bind<SoneLockedOnStartupHandler>().asSingleton()
                bind<NewSoneHandler>().asSingleton()
                bind<NewRemotePostHandler>().asSingleton()
+               bind<RemotePostReplyHandler>().asSingleton()
                bind<SoneLockedHandler>().asSingleton()
                bind<LocalPostHandler>().asSingleton()
                bind<NewVersionHandler>().asSingleton()
@@ -81,6 +82,12 @@ class NotificationHandlerModule : AbstractModule() {
 
        @Provides
        @Singleton
+       @Named("newRemotePostReply")
+       fun getNewRemotePostReplyNotification(loaders: Loaders) =
+                       ListNotification<PostReply>("new-reply-notification", "replies", loaders.loadTemplate("/templates/notify/newReplyNotification.html"), dismissable = false)
+
+       @Provides
+       @Singleton
        @Named("soneLocked")
        fun getSoneLockedNotification(loaders: Loaders) =
                        ListNotification<Sone>("sones-locked-notification", "sones", loaders.loadTemplate("/templates/notify/lockedSonesNotification.html"), dismissable = true)