Files
speckle-server/packages/server/modules/comments/index.js
T
2023-12-21 18:45:20 +00:00

20 lines
465 B
JavaScript

const { moduleLogger } = require('@/logging/logging')
const {
notifyUsersOnCommentEvents
} = require('@/modules/comments/services/notifications')
let unsubFromEvents
exports.init = async (_, isInitial) => {
moduleLogger.info('🗣 Init comments module')
if (isInitial) {
unsubFromEvents = await notifyUsersOnCommentEvents()
}
}
exports.finalize = async () => {}
exports.shutdown = async () => {
unsubFromEvents?.()
unsubFromEvents = undefined
}