nodebb-plugin-slack-notifier
Advanced tools
Comparing version 0.0.6 to 0.0.7
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const Slack = require("slack-node"); | ||
const slack_settings_1 = require("./slack-settings"); | ||
// import { webHookUri, channelName } from './slack-settings'; | ||
const nconf = module.parent.require('nconf'); | ||
const webHookUri = nconf.get('slackWebUrl'); | ||
const channelName = nconf.get('channelName'); | ||
function savePost(newPost) { | ||
const slackObj = new Slack(); | ||
const uri = slack_settings_1.webHookUri; | ||
const uri = webHookUri; | ||
slackObj.setWebhook(uri); | ||
const post = newPost.post; | ||
slackObj.webhook({ | ||
channel: slack_settings_1.channelName || '#general', | ||
channel: channelName || '#general', | ||
username: 'webhookbot', | ||
@@ -13,0 +16,0 @@ text: post.content, |
{ | ||
"name": "nodebb-plugin-slack-notifier", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Simple nodebb plugin that notify slack about posts", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/lakshmipriyamukundan/nodebb-plugin-slack-notifier#readme", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6139
42