discourse/plugins/chat/app/services
Sam e3a0faefc5
FEATURE: allow re-scoping chat user search via a plugin (#26361)
This enables the following in Discourse AI

```
 plugin.register_modifier(:chat_allowed_bot_user_ids) do |user_ids, guardian|
  if guardian.user
    mentionables = AiPersona.mentionables(user: guardian.user)
    allowed_bot_ids = mentionables.map { |mentionable| mentionable[:user_id] }
    user_ids.concat(allowed_bot_ids)
  end
  user_ids
end
```

some bots that are id < 0 need to be discoverable in search otherwise people can not talk to them.

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-03-27 08:55:53 +11:00
..
chat FEATURE: allow re-scoping chat user search via a plugin (#26361) 2024-03-27 08:55:53 +11:00
service DEV: Remove the need for splat operator in services 2024-03-07 15:54:37 +01:00
service.rb DEV: Remove the need for splat operator in services 2024-03-07 15:54:37 +01:00