fix: check own system in pk;s description, pk;s icon

This commit is contained in:
spiral 2021-12-24 19:19:50 -05:00
parent fff8e179ba
commit 2c4fbf249f
No known key found for this signature in database
GPG Key ID: A6059F0CA0E1BD31

View File

@ -81,7 +81,7 @@ public class SystemEdit
if (isOwnSystem)
noDescriptionSetMessage += " To set one, type `pk;s description <description>`.";
ctx.CheckSystem();
ctx.CheckSystem().CheckOwnSystem(target);
if (ctx.MatchRaw())
{
@ -350,6 +350,8 @@ public class SystemEdit
async Task ClearIcon()
{
ctx.CheckOwnSystem(target);
await _repo.UpdateSystem(target.Id, new SystemPatch { AvatarUrl = null });
await ctx.Reply($"{Emojis.Success} System icon cleared.");
}