FIX: stream messages when directly PMing a persona (#500)
previous to this fix we did not consider personas a bot in the front end
This commit is contained in:
@@ -97,6 +97,14 @@ module DiscourseAi
|
||||
SQL
|
||||
|
||||
bots.each { |hash| hash["model_name"] = model_map[hash["id"]] }
|
||||
mentionables = AiPersona.mentionables(user: scope.user)
|
||||
if mentionables.present?
|
||||
bots.concat(
|
||||
mentionables.map do |mentionable|
|
||||
{ "id" => mentionable[:user_id], "username" => mentionable[:username] }
|
||||
end,
|
||||
)
|
||||
end
|
||||
bots
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user