mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
allow flagging the post of a deleted user (#7897)
* Allowing the flagging of messages that were written by user accounts that have since been deleted * replacing ternary operator with else if, else paradigm * formatting fixes * fixing message in tests
This commit is contained in:
@@ -217,7 +217,14 @@ api.flagChat = {
|
||||
|
||||
let reporterEmailContent = getUserInfo(user, ['email']).email;
|
||||
|
||||
let authorEmailContent = author ? getUserInfo(author, ['email']).email : 'system';
|
||||
let authorEmailContent;
|
||||
if (author) {
|
||||
authorEmailContent = getUserInfo(author, ['email']).email;
|
||||
} else if (message.uuid === 'system') {
|
||||
authorEmailContent = 'system';
|
||||
} else {
|
||||
authorEmailContent = 'Author Account Deleted';
|
||||
}
|
||||
|
||||
let groupUrl = getGroupUrl(group);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user