Files
speckle-server/packages/server/modules/comments/index.js
T
2022-08-19 10:27:48 +03:00

20 lines
448 B
JavaScript

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