Skip to content

Commit

Permalink
Merge pull request #462 from Sidekick-Poe/bugfix/chat-last
Browse files Browse the repository at this point in the history
Support having @last in a chat command multiple times
  • Loading branch information
leMicin authored Jan 4, 2025
2 parents 788e8b7 + a75eabb commit 9b90f00
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Sidekick.Modules.Chat/Keybinds/ChatKeybindHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ public override async Task Execute(string keybind)
return;
}

command = command.Replace(TokenLast, command.StartsWith("@") ? "@" + characterName : characterName);
if (command.StartsWith(TokenLast))
{
command = command.Insert(0, "@");
}

command = command.Replace(TokenLast, characterName);
}

await clipboard.SetText(command);
Expand Down

0 comments on commit 9b90f00

Please sign in to comment.