From f177377fe3dcb686a420b40ecb7b49dcd36d9c87 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 2 Jul 2025 01:16:59 +0800 Subject: [PATCH] :sparkles: Return the complete data while auto completion --- DysonNetwork.Sphere/Connection/AutoCompletionController.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/DysonNetwork.Sphere/Connection/AutoCompletionController.cs b/DysonNetwork.Sphere/Connection/AutoCompletionController.cs index 702da71..94eae1c 100644 --- a/DysonNetwork.Sphere/Connection/AutoCompletionController.cs +++ b/DysonNetwork.Sphere/Connection/AutoCompletionController.cs @@ -47,7 +47,8 @@ public class AutoCompletionController(AppDatabase db) Id = a.Id.ToString(), DisplayName = a.Name, SecondaryText = a.Nick, - Type = "account" + Type = "account", + Data = a }) .ToListAsync(); } @@ -63,7 +64,8 @@ public class AutoCompletionController(AppDatabase db) { Id = s.Id.ToString(), DisplayName = s.Slug, - Type = "sticker" + Type = "sticker", + Data = s }) .ToListAsync(); } @@ -86,4 +88,5 @@ public class CompletionItem public string DisplayName { get; set; } = string.Empty; public string? SecondaryText { get; set; } public string Type { get; set; } = string.Empty; + public object? Data { get; set; } } \ No newline at end of file