Move most references to PKMember.Name to go through helper extepsions for privacy

This commit is contained in:
Ske
2020-06-18 17:08:36 +02:00
parent 761270f0c3
commit 56eae82b0a
22 changed files with 97 additions and 62 deletions

View File

@@ -38,8 +38,7 @@ namespace PluralKit.Bot
if (_fields.ShowPrivacy && m.MemberVisibility == PrivacyLevel.Private)
profile += "\n*(this member is hidden)*";
var memberName = m.NamePrivacy.CanAccess(ctx) ? m.Name : (m.DisplayName ?? m.Name);
eb.AddField(memberName, profile.Truncate(1024));
eb.AddField(m.NameFor(ctx), profile.Truncate(1024));
}
}