discourse/plugins/chat
Loïc Guitaut fc1c5f6a8d DEV: Have contract take a block in services
Currently in services, the `contract` step is only used to define where
the contract will be called in the execution flow. Then, a `Contract`
class has to be defined with validations in it.

This patch allows the `contract` step to take a block containing
validations, attributes, etc. directly. No need to then open a
`Contract` class later in the service.

It also has a nice side effect, as it’s now easy to define multiples
contracts inside the same service. Before, we had the `class_name:`
option, but it wasn’t really useful as you had to redefine a complete
new contract class.
Now, when using a name for the contract other than `default`, a new
contract will be created automatically using the provided name.

Example:
```ruby
contract(:user) do
  attribute :user_id, :integer

  validates :user_id, presence: true
end
```
This will create a `UserContract` class and use it, also putting the
resulting contract in `context[:user_contract]`.
2024-10-02 17:00:01 +09:00
..
admin/assets/javascripts FEATURE: Convert chat plugin UI to new show plugin and admin UI guidelines (#28632) 2024-09-10 15:16:16 +10:00
app DEV: Have contract take a block in services 2024-10-02 17:00:01 +09:00
assets DEV: Fix optionalService in decorator form (#29042) 2024-10-01 14:12:34 +02:00
config Update translations 2024-10-02 08:55:44 +02:00
db DEV: Migrate Chat::NotificationMention#notification_id to bigint (#28571) 2024-08-27 14:57:16 +03:00
lib DEV: Drop WithServiceHelper 2024-09-05 09:58:20 +02:00
public
spec UX: remove alias from chat direct message channel titles (#28958) 2024-09-18 22:18:46 +04:00
test/javascripts FEATURE: supports mark tag in chat messages (#28949) 2024-09-17 20:52:34 +02:00
plugin.rb FEATURE: Convert chat plugin UI to new show plugin and admin UI guidelines (#28632) 2024-09-10 15:16:16 +10:00
README.md DEV: Chat service object initial implementation (#19814) 2023-02-13 13:09:57 +01:00

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.