From 1ae0baa8cb60bd7f26774534548215b170eacea0 Mon Sep 17 00:00:00 2001 From: Buer <42402987+MartialBE@users.noreply.github.com> Date: Mon, 26 Feb 2024 19:06:47 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20tg=20apikey=20command=20m?= =?UTF-8?q?issing=20sk=20prefix=20(#76)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/telegram/command_apikey.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/telegram/command_apikey.go b/common/telegram/command_apikey.go index c5d2e4da..cd6295db 100644 --- a/common/telegram/command_apikey.go +++ b/common/telegram/command_apikey.go @@ -63,9 +63,10 @@ func getApikeyList(userId, page int) (message string, pageParams *paginationPara message = "点击令牌可复制:\n" for _, token := range *list.Data { - message += fmt.Sprintf("*%s* : `%s`\n", escapeText(token.Name, "MarkdownV2"), token.Key) + key := "sk-" + token.Key + message += fmt.Sprintf("*%s* : `%s`\n", escapeText(token.Name, "MarkdownV2"), key) if chatUrlTmp != "" { - message += strings.ReplaceAll(chatUrlTmp, `setToken`, token.Key) + message += strings.ReplaceAll(chatUrlTmp, `setToken`, key) } message += "\n" }