discourse/plugins/chat/app
Loïc Guitaut 0733dda1cb DEV: Add policy objects to services
This patch introduces policy objects to chat services. It allows putting
more complex logic in a dedicated class, which will make services
thinner. It also allows providing a reason why the policy failed.

Some change has been made to the service runner too to use more easily
these new policy objects: when matching a failing policy (or any failing
step actually), the result object is now provided to the block. This
way, instead of having to access the reason why the policy failed by
doing `result["result.policy.policy_name"].reason` inside the block,
this one can be simply written like this:
```ruby
  on_failed_policy(:policy_name) { |policy| policy.reason }
```
2023-05-25 12:34:00 +02:00
..
controllers/chat DEV: Add policy objects to services 2023-05-25 12:34:00 +02:00
helpers/chat FEATURE: Mark all chat channels read with a shortcut (#20629) 2023-03-22 13:24:07 +10:00
jobs FIX: Don't autojoin users when they have ready-only permissions (#20213) 2023-05-10 08:45:13 -03:00
models FEATURE: Initial chat thread unread indicators (#21694) 2023-05-25 09:56:19 +02:00
policies DEV: Add policy objects to services 2023-05-25 12:34:00 +02:00
queries/chat FEATURE: Initial chat thread unread indicators (#21694) 2023-05-25 09:56:19 +02:00
serializers/chat FEATURE: Initial chat thread unread indicators (#21694) 2023-05-25 09:56:19 +02:00
services DEV: Add policy objects to services 2023-05-25 12:34:00 +02:00
validators/chat DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
views