Fix organize metadata matching and Telegram group privacy

This commit is contained in:
ShukeBta
2026-06-14 01:12:55 +08:00
parent c76c72966a
commit 4a3ed77395
7 changed files with 353 additions and 13 deletions
+4 -2
View File
@@ -25,11 +25,13 @@ func (s *TelegramBotService) telegramCommandDefinitions(ctx context.Context, cha
return []telegramCommandDefinition{
{Aliases: []string{"/start"}, GroupAllowed: true, Handle: func(args []string) (telegramCommandReply, error) {
if len(args) == 0 {
return s.mainMenu(ctx, channel, msg), nil
return s.mainMenu(ctx, channel, telegramPrivateMessageForUser(msg)), nil
}
return s.cmdStart(ctx, msg, args), nil
}},
{Aliases: []string{"/menu"}, GroupAllowed: true, Handle: func(args []string) (telegramCommandReply, error) { return s.mainMenu(ctx, channel, msg), nil }},
{Aliases: []string{"/menu"}, GroupAllowed: true, Handle: func(args []string) (telegramCommandReply, error) {
return s.mainMenu(ctx, channel, telegramPrivateMessageForUser(msg)), nil
}},
{Aliases: []string{"/cancel"}, GroupAllowed: true, Handle: func(args []string) (telegramCommandReply, error) {
s.takePending(int64(msg.From.ID))
return telegramCommandReply{Text: "已取消当前操作。"}, nil