<commit_before>'use strict';

const routes = require('./routes');
const categoryNotification = require('./categoryNotifications');

const library = module.exports;

library.init = function (params) {
	require('./websockets');
	routes.init(params);
};

library.adminMenu = function (menu) {
	menu.plugins.push({
		route: '/plugins/category-notifications',
		icon: 'fa-pencil',
		name: 'Category Notifications',
	});
	return menu;
};

library.onTopicPost = function (data) {
	categoryNotification.onTopicPost(data.topic);
};

library.onTopicReply = function (data) {
	categoryNotification.onTopicReply(data.post);
};

library.onUserDelete = function (data) {
	categoryNotification.onUserDelete(data);<commit_msg>fix: convert init to async func<commit_after>'use strict';

const routes = require('./routes');
const categoryNotification = require('./categoryNotifications');

const library = module.exports;

library.init = async (params) => {
	require('./websockets');
	routes.init(params);
};

library.adminMenu = function (menu) {
	menu.plugins.push({
		route: '/plugins/category-notifications',
		icon: 'fa-pencil',
		name: 'Category Notifications',
	});
	return menu;
};

library.onTopicPost = function (data) {
	categoryNotification.onTopicPost(data.topic);
};

library.onTopicReply = function (data) {
	categoryNotification.onTopicReply(data.post);
};

library.onUserDelete = function (data) {
	categoryNotification.onUserDelete(data);
{'fraction_non_alphanumeric': 0.15090403337969402, 'fraction_numerical': 0.0, 'mean_word_length': 5.755868544600939, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5140054', 'n_tokens_mistral': 434, 'n_tokens_neox': 429, 'n_words': 86}