le async has arrived

This commit is contained in:
flash 2025-04-26 22:28:41 +00:00
commit 7bdf41a047
Signed by: flash
GPG key ID: 2C9C2C574D47FE3E
27 changed files with 282 additions and 309 deletions
SharpChat/ClientCommands

View file

@ -1,4 +1,4 @@
using System.Globalization;
using System.Globalization;
using System.Text;
namespace SharpChat.ClientCommands {
@ -11,7 +11,7 @@ namespace SharpChat.ClientCommands {
return ctx.NameEquals("afk");
}
public void Dispatch(ClientCommandContext ctx) {
public async Task Dispatch(ClientCommandContext ctx) {
string? statusText = ctx.Args.FirstOrDefault();
if(string.IsNullOrWhiteSpace(statusText))
statusText = DEFAULT;
@ -24,7 +24,7 @@ namespace SharpChat.ClientCommands {
statusText = sti.SubstringByTextElements(0, Math.Min(sti.LengthInTextElements, MAX_GRAPHEMES)).Trim();
}
ctx.Chat.UpdateUser(
await ctx.Chat.UpdateUser(
ctx.User,
status: UserStatus.Away,
statusText: statusText