discourse/plugins/chat/spec
Martin Brennan 9953a6edd9
DEV: Rearchitect chat tracking state (#21550)
This moves chat tracking state calculation for channels
and threads into a central Chat::TrackingStateManager service, that
serves a similar purpose to the TopicTrackingState model
in core.

This service calls down to these query classes:

* ThreadUnreadsQuery
* ChannelUnreadsQuery

To get the unread_count and mention_count for the appropriate
channels and threads.

As well as this, this commit refactors the client-side chat
tracking state.

Now, there is a central ChatTrackingStateManager Ember Service
so all tracking is accessible and can be counted from one place,
which can also initialize tracking from an initial payload.

The actual tracking counts are now maintained in a ChatTrackingState
class that is initialized on the `.tracking` property of both channel and
thread objects.

This removes the attributes on UserChatChannelMembership and decoration
of said membership from ChannelFetcher, preferring instead to have an additional
object for tracking in the JSON.
2023-05-16 14:51:13 +02:00
..
components/chat DEV: Create a chat_mention record when self mentioning (#21438) 2023-05-11 19:30:26 +04:00
fabricators DEV: Rearchitect chat tracking state (#21550) 2023-05-16 14:51:13 +02:00
integration FEATURE: Reintroduce better thread reply counter cache (#21197) 2023-04-24 09:32:04 +10:00
jobs FIX: Don't autojoin users when they have ready-only permissions (#20213) 2023-05-10 08:45:13 -03:00
lib DEV: Rearchitect chat tracking state (#21550) 2023-05-16 14:51:13 +02:00
mailers DEV: Skip channel-wide mention chat specs (#20770) 2023-03-22 12:44:01 +10:00
models DEV: Create UserChatThreadMembership table and model (#21481) 2023-05-10 17:19:48 +02:00
queries/chat DEV: Rearchitect chat tracking state (#21550) 2023-05-16 14:51:13 +02:00
requests FIX: Don't autojoin users when they have ready-only permissions (#20213) 2023-05-10 08:45:13 -03:00
serializer FIX: Don't autojoin users when they have ready-only permissions (#20213) 2023-05-10 08:45:13 -03:00
services DEV: Rearchitect chat tracking state (#21550) 2023-05-16 14:51:13 +02:00
support FEATURE: Thread list initial UI (#21412) 2023-05-10 11:42:32 +02:00
system Revert "DEV: attempts to fix flakey spec (#21547)" (#21549) 2023-05-15 08:18:18 +02:00
validators DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
plugin_helper.rb FEATURE: Thread list initial UI (#21412) 2023-05-10 11:42:32 +02:00
plugin_spec.rb UX: update chat icon to d-chat (#20744) 2023-03-21 10:40:42 -04:00