fix: show correct name in entityReference when base name is private

This commit is contained in:
spiral
2022-02-05 09:26:14 -05:00
parent 47e501da81
commit 375758206e
8 changed files with 72 additions and 68 deletions

View File

@@ -279,11 +279,11 @@ public class EmbedService
if (memberCount == 0 && pctx == LookupContext.ByOwner)
// Only suggest the add command if this is actually the owner lol
eb.Field(new Embed.Field("Members (0)",
$"Add one with `pk;group {target.Reference()} add <member>`!"));
$"Add one with `pk;group {target.Reference(ctx)} add <member>`!"));
else
{
var name = pctx == LookupContext.ByOwner
? target.Reference()
? target.Reference(ctx)
: target.Hid;
eb.Field(new Embed.Field($"Members ({memberCount})", $"(see `pk;group {name} list`)"));
}