mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 23:12:44 +08:00
0733dda1cb
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 } ``` |
||
---|---|---|
.. | ||
app | ||
assets | ||
config | ||
db | ||
lib | ||
public | ||
spec | ||
test/javascripts | ||
plugin.rb | ||
README.md |
This plugin is still in active development and may change frequently
Documentation
The Discourse Chat plugin adds chat functionality to your Discourse so it can natively support both long-form and short-form communication needs of your online community.
For user documentation, see Discourse Chat.
For developer documentation, see Discourse Documentation.