FIX: Remove missed AiPersona.allowed_chat (#838)

Followup bdf3b6268b

I think this is the fix but not sure how to test it,
this is breaking the build
This commit is contained in:
Martin Brennan 2024-10-16 09:33:24 +10:00 committed by GitHub
parent bdf3b6268b
commit d7745d1ac3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -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