mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Support destructuring of proxy tag object
This commit is contained in:
parent
f89ca4c867
commit
935c9660e8
2 changed files with 3 additions and 2 deletions
|
|
@ -18,9 +18,9 @@ namespace PluralKit.Core
|
|||
{
|
||||
var propValue = props.GetValue(po);
|
||||
if (propValue is IPartial p && p.IsPresent)
|
||||
propList.Add(new LogEventProperty(props.Name, factory.CreatePropertyValue(p.RawValue)));
|
||||
propList.Add(new LogEventProperty(props.Name, factory.CreatePropertyValue(p.RawValue, true)));
|
||||
else if (!(propValue is IPartial))
|
||||
propList.Add(new LogEventProperty(props.Name, factory.CreatePropertyValue(propValue)));
|
||||
propList.Add(new LogEventProperty(props.Name, factory.CreatePropertyValue(propValue, true)));
|
||||
}
|
||||
|
||||
result = new StructureValue(propList);
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@ namespace PluralKit.Core
|
|||
.Destructure.AsScalar<MemberId>()
|
||||
.Destructure.AsScalar<GroupId>()
|
||||
.Destructure.AsScalar<SwitchId>()
|
||||
.Destructure.ByTransforming<ProxyTag>(t => new { t.Prefix, t.Suffix })
|
||||
.Destructure.With<PatchObjectDestructuring>()
|
||||
|
||||
.WriteTo.Async(a =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue