Reverted group flag code (#9784)

* Reverted group flag code

* Reverted all flagging code

* Added hyphens back
This commit is contained in:
Keith Holliday
2018-01-11 12:04:07 -06:00
committed by GitHub
parent e96d0659cb
commit e0bf6d2e55
15 changed files with 229 additions and 505 deletions

View File

@@ -64,42 +64,6 @@ function sendFlagNotification ({
});
}
function sendInboxFlagNotification ({
authorEmail,
flagger,
message,
}) {
if (!SLACK_FLAGGING_URL) {
return;
}
let titleLink;
let authorName;
let title = `Flag in ${flagger.profile.name}'s Inbox'`;
let text = `${flagger.profile.name} (${flagger.id}) flagged a message (language: ${flagger.preferences.language})`;
if (!message.user && message.uuid === 'system') {
authorName = 'System Message';
} else {
authorName = `${message.user} - ${authorEmail} - ${message.uuid}`;
}
flagSlack.send({
text,
attachments: [{
fallback: 'Flag Message',
color: 'danger',
author_name: authorName,
title,
title_link: titleLink,
text: message.text,
footer: `<${SLACK_FLAGGING_FOOTER_LINK}?chatId=${message.id}|Flag this message>`,
mrkdwn_in: [
'text',
],
}],
});
}
function sendSubscriptionNotification ({
buyer,
recipient,
@@ -173,5 +137,5 @@ function sendSlurNotification ({
}
module.exports = {
sendFlagNotification, sendSubscriptionNotification, sendSlurNotification, sendInboxFlagNotification,
sendFlagNotification, sendSubscriptionNotification, sendSlurNotification,
};