discourse/plugins/chat/lib
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
..
chat DEV: Add policy objects to services 2023-05-25 12:34:00 +02:00
discourse_dev DEV: Reintroduce chat rake dev generate tasks (#21164) 2023-04-20 10:53:10 +10:00
email_controller_helper
onebox/templates UX: update chat icon to d-chat (#20744) 2023-03-21 10:40:42 -04:00
tasks DEV: Reintroduce chat rake dev generate tasks (#21164) 2023-04-20 10:53:10 +10:00
service_runner.rb DEV: Add policy objects to services 2023-05-25 12:34:00 +02:00