discourse/plugins/chat/spec/requests
Joffrey JAFFEUX c996b7fe4b
FIX: prevents readonly mode to crash channel_messages#index (#22987)
Prior to this fix `context.membership&.update!(last_viewed_at: Time.zone.now)` would generate an update statement from a GET request which is not permitted by default when in readonly mode.

The usual fix in this case is to check for readonly or rescue an error, however, this common pattern of updating "last seen" or similar can be better handled in a `Schedule::Defer` block, which won't raise the `ActiveRecord::ReadOnlyError` when in readonly and will also prevent the controller to wait for this operation.
2023-08-07 16:34:22 +02:00
..
admin FEATURE: Export chat messages to CSV file (#22113) 2023-06-21 16:13:36 +04:00
chat FIX: prevents readonly mode to crash channel_messages#index (#22987) 2023-08-07 16:34:22 +02:00
core_ext FEATURE: thread pagination (#22624) 2023-07-27 09:57:03 +02:00
chat_controller_spec.rb DEV: Remove old ChatController routes for messages & lookup (#21723) 2023-05-29 09:37:10 +02:00
direct_messages_controller_spec.rb DEV: Refactor DM channel creation into new service pattern (#22144) 2023-07-03 10:18:37 +10:00
emojis_controller_spec.rb DEV: Move `discourse-chat` to the core repo. (#18776) 2022-11-02 10:41:30 -03:00