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:
Travis
2016-08-15 20:14:52 -07:00
committed by Blade Barringer
parent 12f1aae2dd
commit 1a409848a8
4 changed files with 34 additions and 23 deletions

View File

@@ -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);