refactor(profiles): remove email feature
also still more visual cleanup of profile modal
This commit is contained in:
@@ -14,7 +14,7 @@ import {
|
||||
NotAuthorized,
|
||||
} from '../../libs/errors';
|
||||
import { removeFromArray } from '../../libs/collectionManipulators';
|
||||
import { getUserInfo, getGroupUrl, sendTxn } from '../../libs/email';
|
||||
import { getUserInfo, getGroupUrl } from '../../libs/email';
|
||||
import * as slack from '../../libs/slack';
|
||||
import { chatReporterFactory } from '../../libs/chatReporting/chatReporterFactory';
|
||||
import { getAuthorEmailFromMessage } from '../../libs/chat';
|
||||
@@ -28,7 +28,6 @@ import { getAnalyticsServiceByEnvironment } from '../../libs/analyticsService';
|
||||
const analytics = getAnalyticsServiceByEnvironment();
|
||||
|
||||
const ACCOUNT_MIN_CHAT_AGE = Number(nconf.get('ACCOUNT_MIN_CHAT_AGE'));
|
||||
const FLAG_REPORT_EMAILS = nconf.get('FLAG_REPORT_EMAIL').split(',').map(email => ({ email, canSend: true }));
|
||||
|
||||
/**
|
||||
* @apiDefine MessageNotFound
|
||||
@@ -164,8 +163,6 @@ api.postChat = {
|
||||
{ name: 'GROUP_URL', content: groupUrl },
|
||||
];
|
||||
|
||||
sendTxn(FLAG_REPORT_EMAILS, 'slur-report-to-mods', report);
|
||||
|
||||
// Slack the mods
|
||||
slack.sendSlurNotification({
|
||||
authorEmail,
|
||||
@@ -241,8 +238,6 @@ api.postChat = {
|
||||
{ name: 'GROUP_URL', content: groupUrl },
|
||||
];
|
||||
|
||||
sendTxn(FLAG_REPORT_EMAILS, 'shadow-muted-post-report-to-mods', report);
|
||||
|
||||
// Slack the mods
|
||||
slack.sendShadowMutedPostNotification({
|
||||
authorEmail,
|
||||
@@ -447,26 +442,6 @@ api.clearChatFlags = {
|
||||
const authorEmail = getAuthorEmailFromMessage(message);
|
||||
const groupUrl = getGroupUrl(group);
|
||||
|
||||
sendTxn(FLAG_REPORT_EMAILS, 'unflag-report-to-mods', [
|
||||
{ name: 'MESSAGE_TIME', content: (new Date(message.timestamp)).toString() },
|
||||
{ name: 'MESSAGE_TEXT', content: message.text },
|
||||
|
||||
{ name: 'ADMIN_USERNAME', content: user.profile.name },
|
||||
{ name: 'ADMIN_UUID', content: user._id },
|
||||
{ name: 'ADMIN_EMAIL', content: adminEmailContent },
|
||||
{ name: 'ADMIN_MODAL_URL', content: `/profile/${user._id}` },
|
||||
|
||||
{ name: 'AUTHOR_USERNAME', content: message.user },
|
||||
{ name: 'AUTHOR_UUID', content: message.uuid },
|
||||
{ name: 'AUTHOR_EMAIL', content: authorEmail },
|
||||
{ name: 'AUTHOR_MODAL_URL', content: `/profile/${message.uuid}` },
|
||||
|
||||
{ name: 'GROUP_NAME', content: group.name },
|
||||
{ name: 'GROUP_TYPE', content: group.type },
|
||||
{ name: 'GROUP_ID', content: group._id },
|
||||
{ name: 'GROUP_URL', content: groupUrl },
|
||||
]);
|
||||
|
||||
res.respond(200, {});
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user