discourse/plugins/chat/spec
Régis Hanol 062e4fb4f3
FIX: add server-side limit for DM channels (#30300)
When fetching DM channels, we would fetch all the user's DM channels,
and limit the number of DM channels we display on the client-side using
the `DIRECT_MESSAGE_CHANNELS_LIMIT`.

This is obviously not scalable as users are having more and more
discussions with other users.

This commit ensures we always limit the number of DM channels we send to the
client.

It adds the `MAX_DM_CHANNEL_RESULTS` in `ChannelFetcher` and use it to
limit the records returned by the server. This value should always be
lower than `DIRECT_MESSAGE_CHANNELS_LIMIT` on the client-side, so that
when the user has more "unread DMs" they still show up on the client as
they read them.

While adding a spec, I also updated the spec that ensures we have a
limit on public channels to use `stub_const` to temporarily lower the number
of fixtures we create during the test.
2024-12-16 18:36:29 +01:00
..
components/chat PERF: auto join & leave chat channels (#29193) 2024-11-12 15:00:59 +11:00
fabricators DEV: Display better output when inspecting service steps 2024-12-12 15:21:10 +01:00
integration PERF: optimize chat user membership cleanup when removing a single user (#29833) 2024-11-20 09:21:02 +01:00
jobs PERF: auto join & leave chat channels (#29193) 2024-11-12 15:00:59 +11:00
lib FIX: add server-side limit for DM channels (#30300) 2024-12-16 18:36:29 +01:00
mailers FIX: show group based notifications in chat summary email (#27641) 2024-07-01 12:47:38 +04:00
models DEV: adds blocks support to chat messages (#29782) 2024-11-19 07:07:58 +01:00
queries/chat FEATURE: add mention count to threads (#29739) 2024-11-14 14:10:12 +04:00
requests DEV: adds blocks support to chat messages (#29782) 2024-11-19 07:07:58 +01:00
serializer FIX: serializes interaction for direct messages (#29844) 2024-11-20 11:26:12 +01:00
services PERF: optimize chat user membership cleanup when removing a single user (#29833) 2024-11-20 09:21:02 +01:00
support FIX: serializes interaction for direct messages (#29844) 2024-11-20 11:26:12 +01:00
system UX: Hide admin header for edit/new webhook (#30194) 2024-12-12 10:49:17 +11:00
validators FIX: Remove chat default channel setting (#28170) 2024-07-31 14:12:10 -03:00
plugin_helper.rb DEV: Display better output when inspecting service steps 2024-12-12 15:21:10 +01:00
plugin_spec.rb PERF: auto join & leave chat channels (#29193) 2024-11-12 15:00:59 +11:00