Compare commits

..

2 commits

Author SHA1 Message Date
Alexey Skobkin e6351725e3 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
2024-11-03 22:43:05 +00:00
Alexey Skobkin c3ee85bf35
nil pointer dereference fix (#37)
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2024-11-04 01:41:08 +03:00

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"
} }