fix(tests): post merge cleanup

This commit is contained in:
SabreCat
2023-10-03 15:58:31 -05:00
parent a9f3360890
commit fbb9b2c65a
6 changed files with 21 additions and 61 deletions
-34
View File
@@ -148,21 +148,6 @@ api.postChat = {
const authorEmail = getUserInfo(user, ['email']).email;
const groupUrl = getGroupUrl(group);
const report = [
{ name: 'MESSAGE_TIME', content: (new Date()).toString() },
{ name: 'MESSAGE_TEXT', content: message },
{ name: 'AUTHOR_USERNAME', content: user.profile.name },
{ name: 'AUTHOR_UUID', content: user._id },
{ name: 'AUTHOR_EMAIL', content: authorEmail },
{ name: 'AUTHOR_MODAL_URL', content: `/profile/${user._id}` },
{ name: 'GROUP_NAME', content: group.name },
{ name: 'GROUP_TYPE', content: group.type },
{ name: 'GROUP_ID', content: group._id },
{ name: 'GROUP_URL', content: groupUrl },
];
// Slack the mods
slack.sendSlurNotification({
authorEmail,
@@ -223,21 +208,6 @@ api.postChat = {
const authorEmail = getUserInfo(user, ['email']).email;
const groupUrl = getGroupUrl(group);
const report = [
{ name: 'MESSAGE_TIME', content: (new Date()).toString() },
{ name: 'MESSAGE_TEXT', content: message },
{ name: 'AUTHOR_USERNAME', content: user.profile.name },
{ name: 'AUTHOR_UUID', content: user._id },
{ name: 'AUTHOR_EMAIL', content: authorEmail },
{ name: 'AUTHOR_MODAL_URL', content: `/profile/${user._id}` },
{ name: 'GROUP_NAME', content: group.name },
{ name: 'GROUP_TYPE', content: group.type },
{ name: 'GROUP_ID', content: group._id },
{ name: 'GROUP_URL', content: groupUrl },
];
// Slack the mods
slack.sendShadowMutedPostNotification({
authorEmail,
@@ -438,10 +408,6 @@ api.clearChatFlags = {
message.flagCount = 0;
await message.save();
const adminEmailContent = getUserInfo(user, ['email']).email;
const authorEmail = getAuthorEmailFromMessage(message);
const groupUrl = getGroupUrl(group);
res.respond(200, {});
},
};
@@ -47,7 +47,7 @@ export default class GroupChatReporter extends ChatReporter {
async notify (group, message, userComment, automatedComment = '') {
slack.sendFlagNotification({
authorEmail: this.authorEmail,
authorEmail: this.user.auth.local.email,
flagger: this.user,
group,
message,
@@ -38,12 +38,6 @@ export default class InboxChatReporter extends ChatReporter {
}
async notify (message, userComment) {
const group = {
type: 'private messages',
name: 'N/A',
_id: 'N/A',
};
slack.sendInboxFlagNotification({
messageUserEmail: this.messageUserEmail,
flagger: this.user,