discourse/plugins/chat/spec
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
..
components/chat DEV: Remove unnecessary rails_helper requiring (#26364) 2024-03-26 11:32:01 +01:00
fabricators DEV: chat streaming (#25736) 2024-02-20 09:49:19 +01:00
integration DEV: Remove unnecessary rails_helper requiring (#26364) 2024-03-26 11:32:01 +01:00
jobs DEV: Remove unnecessary rails_helper requiring (#26364) 2024-03-26 11:32:01 +01:00
lib DEV: Remove unnecessary rails_helper requiring (#26364) 2024-03-26 11:32:01 +01:00
mailers DEV: Remove unnecessary rails_helper requiring (#26364) 2024-03-26 11:32:01 +01:00
models DEV: Remove unnecessary rails_helper requiring (#26364) 2024-03-26 11:32:01 +01:00
policies/chat/channel DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
queries/chat DEV: Remove unnecessary rails_helper requiring (#26364) 2024-03-26 11:32:01 +01:00
requests DEV: Remove unnecessary rails_helper requiring (#26364) 2024-03-26 11:32:01 +01:00
serializer DEV: Remove unnecessary rails_helper requiring (#26364) 2024-03-26 11:32:01 +01:00
services FEATURE: allow re-scoping chat user search via a plugin (#26361) 2024-03-27 08:55:53 +11:00
support FIX: add status to channel membership serializer (#25906) 2024-02-27 18:23:59 +08:00
system UI: better modal backdrop opacity fading (#26328) 2024-03-22 22:49:01 +01:00
validators DEV: Remove unnecessary rails_helper requiring (#26364) 2024-03-26 11:32:01 +01:00
plugin_helper.rb FEATURE: implements drafts for threads (#24483) 2023-11-22 11:54:23 +01:00
plugin_spec.rb DEV: Remove unnecessary rails_helper requiring (#26364) 2024-03-26 11:32:01 +01:00