Skip to content

Commit

Permalink
fix: chat id not correctly passed (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
nekomeowww committed Sep 22, 2023
1 parent 08525bb commit 1cdaafe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions internal/configs/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"strconv"

"github.com/joho/godotenv"
"github.com/nekomeowww/xo"
"github.com/samber/lo"
goopenai "github.com/sashabaranov/go-openai"
)
Expand Down Expand Up @@ -126,7 +125,7 @@ type Config struct {

func NewConfig() func() (*Config, error) {
return func() (*Config, error) {
envs, err := godotenv.Read(xo.RelativePathOf("../../.env"))
envs, err := godotenv.Read()
if err != nil && !errors.Is(err, os.ErrNotExist) {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion internal/services/autorecap/autorecap.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ func (m *AutoRecapService) summarize(chatID int64, options *ent.TelegramChatReca
if targetChat.isPrivateSubscriber {
msg.Text = fmt.Sprintf("您好,这是您订阅的 <b>%s</b> 群组的定时聊天回顾。\n\n%s", tgbot.EscapeHTMLSymbols(chatTitle), content)

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

0 comments on commit 1cdaafe

Please sign in to comment.