discourse/plugins/chat/assets/javascripts/discourse
Martin Brennan 24ec06ff85
FEATURE: Reintroduce better thread reply counter cache (#21197)
This was reverted in 38cebd3ed5.
The issue was that I was using Discourse.redis.delete_prefixed
which does a slow redis KEYS lookup, which is not advised in
production. This commit removes that, and also ensures the periodical
thread count update only happens if threading is enabled.

I changed to use a redis INCR/DECR for reply count
cache. This avoids a round trip to redis to GET the current
count, and also avoids multi-process issues, where
if there's two processes trying to increment at the
same time, they may both receive the same value, add one
to it, then both write the same value back.
Then, it's only n+1 instead of n+2.

This also prevents almost all chat scheduled jobs from
running if chat is disabled, the only one remaining is
the message retention job.
2023-04-24 09:32:04 +10:00
..
adapters FIX: better chat-api error handling (#19550) 2022-12-21 16:11:35 +01:00
components UX: remove new message element from chatpane (#21143) 2023-04-19 01:54:15 +02:00
connectors DEV: Refactoring chat message actions for ChatMessage component usage in thread panel (#20756) 2023-04-06 15:19:52 +02:00
controllers DEV: Move channel creation for category into service (#21167) 2023-04-24 09:15:16 +10:00
helpers DEV: rework the chat-live-pane (#20519) 2023-03-03 13:09:25 +01:00
initializers FIX: Chat composer shortcuts should respect context (#21130) 2023-04-19 09:07:52 +10:00
lib FEATURE: Reacting to MessageBus in chat thread panel (#21070) 2023-04-13 14:45:50 +02:00
models FEATURE: Initial chat thread indicator and disabling echo mode in channels (#21047) 2023-04-12 11:09:06 +10:00
modifiers/chat DEV: uses container resize event instead of mutation (#20757) 2023-03-21 11:30:32 +01:00
pre-initializers DEV: adds a addChatDrawerStateCallback API (#20640) 2023-03-10 18:49:59 +01:00
routes FEATURE: Reacting to MessageBus in chat thread panel (#21070) 2023-04-13 14:45:50 +02:00
services FEATURE: Reintroduce better thread reply counter cache (#21197) 2023-04-24 09:32:04 +10:00
templates UX: various tweaks on thread (#21083) 2023-04-13 10:08:12 +02:00
widgets UX: update chat icon to d-chat (#20744) 2023-03-21 10:40:42 -04:00
admin-chat-route-map.js
chat-route-map.js FEATURE: Chat side panel with threads initial skeleton (#20209) 2023-02-14 11:38:41 +10:00
preferences-chat-route-map.js