mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Move most references to PKMember.Name to go through helper extepsions for privacy
This commit is contained in:
parent
761270f0c3
commit
56eae82b0a
22 changed files with 97 additions and 62 deletions
13
PluralKit.Bot/Utils/ModelUtils.cs
Normal file
13
PluralKit.Bot/Utils/ModelUtils.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using PluralKit.Core;
|
||||
|
||||
namespace PluralKit.Bot
|
||||
{
|
||||
public static class ModelUtils
|
||||
{
|
||||
public static string NameFor(this PKMember member, Context ctx) =>
|
||||
member.NameFor(ctx.LookupContextFor(member));
|
||||
|
||||
public static string DisplayName(this PKMember member) =>
|
||||
member.DisplayName ?? member.Name;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue