mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
feat(api): Send flag notifications to slack
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
import _ from 'lodash';
|
||||
import { removeFromArray } from '../../libs/collectionManipulators';
|
||||
import { getUserInfo, getGroupUrl, sendTxn } from '../../libs/email';
|
||||
import slack from '../../libs/slack';
|
||||
import pusher from '../../libs/pusher';
|
||||
import nconf from 'nconf';
|
||||
import Bluebird from 'bluebird';
|
||||
@@ -265,6 +266,12 @@ api.flagChat = {
|
||||
{name: 'GROUP_URL', content: groupUrl},
|
||||
]);
|
||||
|
||||
slack.sendFlagNotification({
|
||||
flagger: user,
|
||||
group,
|
||||
message,
|
||||
});
|
||||
|
||||
res.respond(200, message);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user