Skip to content

Commit 1cdaafe

Browse files
authored
fix: chat id not correctly passed (#176)
1 parent 08525bb commit 1cdaafe

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

internal/configs/configs.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"strconv"
88

99
"github.com/joho/godotenv"
10-
"github.com/nekomeowww/xo"
1110
"github.com/samber/lo"
1211
goopenai "github.com/sashabaranov/go-openai"
1312
)
@@ -126,7 +125,7 @@ type Config struct {
126125

127126
func NewConfig() func() (*Config, error) {
128127
return func() (*Config, error) {
129-
envs, err := godotenv.Read(xo.RelativePathOf("../../.env"))
128+
envs, err := godotenv.Read()
130129
if err != nil && !errors.Is(err, os.ErrNotExist) {
131130
return nil, err
132131
}

internal/services/autorecap/autorecap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ func (m *AutoRecapService) summarize(chatID int64, options *ent.TelegramChatReca
311311
if targetChat.isPrivateSubscriber {
312312
msg.Text = fmt.Sprintf("您好,这是您订阅的 <b>%s</b> 群组的定时聊天回顾。\n\n%s", tgbot.EscapeHTMLSymbols(chatTitle), content)
313313

314-
inlineKeyboardMarkup, err := m.chathistories.NewVoteRecapWithUnsubscribeInlineKeyboardMarkup(m.botService.Bot(), targetChat.chatID, chatTitle, targetChat.chatID, logID, counts.UpVotes, counts.DownVotes, counts.Lmao)
314+
inlineKeyboardMarkup, err := m.chathistories.NewVoteRecapWithUnsubscribeInlineKeyboardMarkup(m.botService.Bot(), chatID, chatTitle, targetChat.chatID, logID, counts.UpVotes, counts.DownVotes, counts.Lmao)
315315
if err != nil {
316316
m.logger.Error("failed to assign callback query data", zap.Error(err), zap.Int64("chat_id", chatID))
317317
continue

0 commit comments

Comments
 (0)