Merge pull request 'nil pointer dereference fix (#37)' (#38) from fix_quoted_messages_usernames_context into main
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

Reviewed-on: #38
This commit is contained in:
Alexey Skobkin 2024-11-03 22:43:05 +00:00
commit e6351725e3

View file

@ -99,7 +99,7 @@ func chatMessageToOpenAiChatCompletionMessage(message ChatMessage) openai.ChatCo
func chatMessageToText(message ChatMessage) string { func chatMessageToText(message ChatMessage) string {
var msgText string var msgText string
if message.ReplyTo == nil { if message.ReplyTo != nil {
msgText += "In reply to:" msgText += "In reply to:"
msgText += quoteText(presentUserMessageAsText(*message.ReplyTo)) + "\n\n" msgText += quoteText(presentUserMessageAsText(*message.ReplyTo)) + "\n\n"
} }