mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Reverted group flag code (#9784)
* Reverted group flag code * Reverted all flagging code * Added hyphens back
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user