add full name if exists in email-invite-subject or when tagging someone with '@' while commenting a card

This commit is contained in:
Emile NDAGIJIMANA 2021-10-18 15:26:01 +02:00
parent b12312f998
commit d9329a9e15
6 changed files with 23 additions and 7 deletions

View file

@ -17,8 +17,10 @@ Template.editor.onRendered(() => {
currentBoard
.activeMembers()
.map(member => {
const username = Users.findOne(member.userId).username;
return username.includes(term) ? username : null;
const user = Users.findOne(member.userId);
const username = user.username;
const fullName = user.profile && user.profile !== undefined ? user.profile.fullname : "";
return username.includes(term) || fullName.includes(term) ? fullName + "(" + username + ")" : null;
})
.filter(Boolean), [...specialHandleNames])
);