diff --git a/main.go b/main.go index 2c33eb8..93923a9 100644 --- a/main.go +++ b/main.go @@ -146,10 +146,10 @@ func (a *App) handleMessage(ctx context.Context, msg *tgbotapi.Message) error { "transformed_text", question, ) - var ogPostContent *string - if msg.ReplyToMessage != nil && msg.ReplyToMessage.SenderChat.ID == a.config.ChannelID { - a.log.Info("message was a reply to channel post") - ogPostContent = &msg.ReplyToMessage.Text + var repliedToContent *string + if msg.ReplyToMessage != nil { + a.log.Info("message was a reply") + repliedToContent = &msg.ReplyToMessage.Text } var username string @@ -159,7 +159,7 @@ func (a *App) handleMessage(ctx context.Context, msg *tgbotapi.Message) error { response, err := a.proompter.Prompt(ctx, PromptRequest{ Question: question, - OriginalPostContent: ogPostContent, + OriginalPostContent: repliedToContent, Username: username, }) if err != nil {