discourse/plugins/chat
Loïc Guitaut f79dd5c8b5 DEV: Stop injecting a service result object in the caller object
Currently, when calling a service with its block form, a `#result`
method is automatically created on the caller object. Even if it never
clashed so far, this could happen.

This patch removes that method, and instead use a more classical way of
doing things: the result object is now provided as an argument to the
main block. This means if we need to access the result object in an
outcome block, it will be done like this from now on:
```ruby
MyService.call(params) do |result|
  on_success do
    # do something with the result object
    do_something(result)
  end
end
```

In the same vein, this patch introduces the ability to match keys from
the result object in the outcome blocks, like we already do with step
definitions in a service. For example:
```ruby
on_success do |model:, contract:|
  do_something(model, contract)
end
```
Instead of
```ruby
on_success do
  do_something(result.model, result.contract)
end
```
2024-10-22 16:58:54 +02:00
..
admin/assets/javascripts UX: Automatically collapse admin page header buttons on mobile (#29040) 2024-10-08 08:28:32 +10:00
app DEV: Stop injecting a service result object in the caller object 2024-10-22 16:58:54 +02:00
assets DEV: Fix regression in uppy-mixin (#29252) 2024-10-17 10:38:19 +01:00
config Update translations (#29335) 2024-10-22 22:44:33 +09:00
db DEV: Remove logical OR assignment of constants (#29201) 2024-10-16 10:09:07 +08:00
lib DEV: Stop injecting a service result object in the caller object 2024-10-22 16:58:54 +02:00
public
spec DEV: Stop injecting a service result object in the caller object 2024-10-22 16:58:54 +02:00
test/javascripts DEV: Update more asserts to qunit-dom (#29326) 2024-10-22 11:34:23 +02:00
plugin.rb DEV: serialize image upload thumbnail (#29276) 2024-10-18 12:55:14 +04: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.