mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
fix(tests): one more
This commit is contained in:
@@ -17,7 +17,6 @@ import { removeFromArray } from '../../libs/collectionManipulators';
|
|||||||
import { getUserInfo, getGroupUrl } from '../../libs/email';
|
import { getUserInfo, getGroupUrl } from '../../libs/email';
|
||||||
import * as slack from '../../libs/slack';
|
import * as slack from '../../libs/slack';
|
||||||
import { chatReporterFactory } from '../../libs/chatReporting/chatReporterFactory';
|
import { chatReporterFactory } from '../../libs/chatReporting/chatReporterFactory';
|
||||||
import { getAuthorEmailFromMessage } from '../../libs/chat';
|
|
||||||
import bannedWords from '../../libs/bannedWords';
|
import bannedWords from '../../libs/bannedWords';
|
||||||
import { getMatchesByWordArray } from '../../libs/stringUtils';
|
import { getMatchesByWordArray } from '../../libs/stringUtils';
|
||||||
import bannedSlurs from '../../libs/bannedSlurs';
|
import bannedSlurs from '../../libs/bannedSlurs';
|
||||||
@@ -146,7 +145,6 @@ api.postChat = {
|
|||||||
|
|
||||||
// Email the mods
|
// Email the mods
|
||||||
const authorEmail = getUserInfo(user, ['email']).email;
|
const authorEmail = getUserInfo(user, ['email']).email;
|
||||||
const groupUrl = getGroupUrl(group);
|
|
||||||
|
|
||||||
// Slack the mods
|
// Slack the mods
|
||||||
slack.sendSlurNotification({
|
slack.sendSlurNotification({
|
||||||
@@ -206,7 +204,6 @@ api.postChat = {
|
|||||||
|
|
||||||
// Email the mods
|
// Email the mods
|
||||||
const authorEmail = getUserInfo(user, ['email']).email;
|
const authorEmail = getUserInfo(user, ['email']).email;
|
||||||
const groupUrl = getGroupUrl(group);
|
|
||||||
|
|
||||||
// Slack the mods
|
// Slack the mods
|
||||||
slack.sendShadowMutedPostNotification({
|
slack.sendShadowMutedPostNotification({
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import nconf from 'nconf';
|
import nconf from 'nconf';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
import { getAuthorEmailFromMessage } from '../chat';
|
||||||
import ChatReporter from './chatReporter';
|
import ChatReporter from './chatReporter';
|
||||||
import {
|
import {
|
||||||
BadRequest,
|
BadRequest,
|
||||||
@@ -46,8 +46,9 @@ export default class GroupChatReporter extends ChatReporter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async notify (group, message, userComment, automatedComment = '') {
|
async notify (group, message, userComment, automatedComment = '') {
|
||||||
|
const authorEmail = await getAuthorEmailFromMessage(message);
|
||||||
slack.sendFlagNotification({
|
slack.sendFlagNotification({
|
||||||
authorEmail: this.user.auth.local.email,
|
authorEmail,
|
||||||
flagger: this.user,
|
flagger: this.user,
|
||||||
group,
|
group,
|
||||||
message,
|
message,
|
||||||
|
|||||||
Reference in New Issue
Block a user