mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-03-09 11:48:47 +00:00
FIX: Remove missed AiPersona.allowed_chat (#838)
Followup bdf3b6268b2843f4b2ba8f8875e4d18a952ef326 I think this is the fix but not sure how to test it, this is breaking the build
This commit is contained in:
parent
bdf3b6268b
commit
d7745d1ac3
@ -66,7 +66,12 @@ module DiscourseAi
|
||||
def inject_into(plugin)
|
||||
plugin.register_modifier(:chat_allowed_bot_user_ids) do |user_ids, guardian|
|
||||
if guardian.user
|
||||
allowed_chat = AiPersona.allowed_chat(user: guardian.user)
|
||||
allowed_chat =
|
||||
AiPersona.allowed_modalities(
|
||||
user: guardian.user,
|
||||
allow_chat_direct_messages: true,
|
||||
allow_chat_channel_mentions: true,
|
||||
)
|
||||
allowed_bot_ids = allowed_chat.map { |info| info[:user_id] }
|
||||
user_ids.concat(allowed_bot_ids)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user