discourse/plugins/chat/spec
Andrei Prigorshnev d91456fd53
DEV: Ability to collect stats without exposing them via API (#23933)
This adds the ability to collect stats without exposing them 
among other stats via API.

The most important thing I wanted to achieve is to provide 
an API where stats are not exposed by default, and a developer 
has to explicitly specify that they should be 
exposed (`expose_via_api: true`). Implementing an opposite 
solution would be simpler, but that's less safe in terms of 
potential security issues. 

When working on this, I had to refactor the current solution. 
I would go even further with the refactoring, but the next steps 
seem to be going too far in changing the solution we have, 
and that would also take more time. Two things that can be 
improved in the future:
1. Data structures for holding stats can be further improved
2. Core stats are hard-coded in the About template (it's hard 
to fix it without correcting data structures first, see point 1):
    63a0700d45/app/views/about/index.html.erb (L61-L101)

The most significant refactorings are:
1. Introducing the `Stat` model
2. Aligning the way the core and the plugin stats' are registered
2023-11-10 00:44:05 +04:00
..
components/chat FEATURE: add grace period for chat edits (#23800) 2023-10-23 16:40:30 +08:00
fabricators PERF: cook message in background (#24227) 2023-11-06 15:45:30 +01:00
integration DEV: improves reliability of delete/restore/update specs (#24265) 2023-11-07 11:34:35 +01:00
jobs PERF: cook message in background (#24227) 2023-11-06 15:45:30 +01:00
lib DEV: Ability to collect stats without exposing them via API (#23933) 2023-11-10 00:44:05 +04:00
mailers DEV: Migrate `Chat::MessageCreator` to a service (#22390) 2023-09-07 08:57:29 +02:00
models DEV: improves reliability of delete/restore/update specs (#24265) 2023-11-07 11:34:35 +01:00
policies/chat/channel DEV: Migrate `Chat::MessageCreator` to a service (#22390) 2023-09-07 08:57:29 +02:00
queries/chat FIX: handle thread participants limit on the frontend (#23839) 2023-10-09 14:04:59 +08:00
requests SECURITY: Filter unread bookmark reminders the user cannot see 2023-11-09 13:39:16 +11:00
serializer FIX: do not serialize status when profile is hidden (#23946) 2023-10-16 17:43:39 +02:00
services PERF: cook message in background (#24227) 2023-11-06 15:45:30 +01:00
support FEATURE: add grace period for chat edits (#23800) 2023-10-23 16:40:30 +08:00
system DEV: improves reliability of delete/restore/update specs (#24265) 2023-11-07 11:34:35 +01:00
validators DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
plugin_helper.rb DEV: improves reliability of delete/restore/update specs (#24265) 2023-11-07 11:34:35 +01:00
plugin_spec.rb DEV: Refactor chat oneboxes (#23031) 2023-09-04 16:55:02 +02:00