discourse/plugins/chat
Loïc Guitaut 9e9abe0a82 DEV: Unify params access in services
Currently, there are two ways (kind of) for accessing `params` inside a
service:
- when there is no contract or it hasn’t been reached yet, `params` is
  just the hash that was provided to the service. To access a key, you
  have to use the bracket notation `params[:my_key]`.
- when there is a contract and it has been executed successfully,
  `params` now references the contract and the attributes are accessible
  using methods (`params.my_key`).

This patch unifies how `params` exposes its attributes. Now, even if
there is no contract at all in a service, `params` will expose its
attributes through methods, that way things are more consistent.

This patch also makes sure there is always a `params` object available
even when no `params` key is provided to the service (this allows a
contract to fail because its attributes are blank instead of having the
service raising an error because it doesn’t find `params` in its context).
2024-12-13 11:13:18 +01:00
..
admin/assets/javascripts UX: Hide admin header for edit/new webhook (#30194) 2024-12-12 10:49:17 +11:00
app DEV: Unify params access in services 2024-12-13 11:13:18 +01:00
assets UX: Hide admin header for edit/new webhook (#30194) 2024-12-12 10:49:17 +11:00
config UX: Rename private to personal messages in the interface (#29679) 2024-12-12 11:44:19 +11:00
db DEV: Make sure chat migration is in plugin directory (#29867) 2024-11-20 14:50:15 -07:00
lib PERF: Optimize query for finding users with unread chat messages (#29964) 2024-11-28 15:28:37 +01:00
public
spec DEV: Display better output when inspecting service steps 2024-12-12 15:21:10 +01:00
test/javascripts DEV: Use qunit-dom's hasValue wherever possible (#30018) 2024-12-01 20:37:24 +01:00
plugin.rb DEV: Display better output when inspecting service steps 2024-12-12 15:21:10 +01:00
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.