This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/plugins/chat
Joffrey JAFFEUX 12a18d4d55
DEV: properly namespace chat (#20690)
This commit main goal was to comply with Zeitwerk and properly rely on autoloading. To achieve this, most resources have been namespaced under the `Chat` module.

- Given all models are now namespaced with `Chat::` and would change the stored types in DB when using polymorphism or STI (single table inheritance), this commit uses various Rails methods to ensure proper class is loaded and the stored name in DB is unchanged, eg: `Chat::Message` model will be stored as `"ChatMessage"`, and `"ChatMessage"` will correctly load `Chat::Message` model.
- Jobs are now using constants only, eg: `Jobs::Chat::Foo` and should only be enqueued this way

Notes:
- This commit also used this opportunity to limit the number of registered css files in plugin.rb
- `discourse_dev` support has been removed within this commit and will be reintroduced later

<!-- NOTE: All pull requests should have tests (rspec in Ruby, qunit in JavaScript). If your code does not include test coverage, please include an explanation of why it was omitted. -->
2023-03-17 14:24:38 +01:00
..
app DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
assets DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
config DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
db DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
lib DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
public DEV: Move discourse-chat to the core repo. (#18776) 2022-11-02 10:41:30 -03:00
spec DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
test/javascripts DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
plugin.rb DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01: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.