FIX: Handle nil reply_to_post in AI Bot event handler (#743)
Somehow it's possible to have a nil `post.reply_to_post` with a non-nil `post.reply_to_post_number`.
This commit is contained in:
parent
1254d7c7d0
commit
3b5245dc54
|
@ -80,7 +80,7 @@ module DiscourseAi
|
|||
mentions = post.mentions.map(&:downcase)
|
||||
|
||||
# in case we are replying to a post by a bot
|
||||
if post.reply_to_post_number && post.reply_to_post.user
|
||||
if post.reply_to_post_number && post.reply_to_post&.user
|
||||
mentions << post.reply_to_post.user.username_lower
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue