discourse/plugins/chat/app
Joffrey JAFFEUX 274820d247
FIX: prevents exception when publishing processed (#21104)
This regression happened in bd5c5c4b5f and is due to `message_bus_targets = calculate_publish_targets(chat_channel, chat_message)` expecting a `chat_channel` which was only defined after.

Example exception in logs:

```
Job exception: undefined local variable or method `chat_channel' for Chat::Publisher:Module

/var/www/discourse/plugins/chat/app/services/chat/publisher.rb:91:in `publish_processed!' 
/var/www/discourse/plugins/chat/app/jobs/regular/chat/process_message.rb:21:in `block in execute' 
/var/www/discourse/lib/distributed_mutex.rb:53:in `block in synchronize' 
/var/www/discourse/lib/distributed_mutex.rb:49:in `synchronize' 
/var/www/discourse/lib/distributed_mutex.rb:49:in `synchronize' 
/var/www/discourse/lib/distributed_mutex.rb:34:in `synchronize' 
/var/www/discourse/plugins/chat/app/jobs/regular/chat/process_message.rb:7:in `execute' 
/var/www/discourse/app/jobs/base.rb:249:in `block (2 levels) in perform' 
```

This commit also:
- adds a spec to ensure oneboxing is not regressing anymore
- increment the version on message processed to ensure callbacks are correctly ran

Note we should also have more tests in `Chat::Publisher`, this will be done when we move it to a proper service.

<!-- NOTE: All pull requests should have tests (rspec in Ruby, qunit in JavaScript). If your code does not include test coverage, please include an explanation of why it was omitted. -->
2023-04-16 10:30:33 +02:00
..
controllers/chat FEATURE: Add an emoji deny list site setting (#20929) 2023-04-13 15:38:54 +08:00
helpers/chat FEATURE: Mark all chat channels read with a shortcut (#20629) 2023-03-22 13:24:07 +10:00
jobs DEV: Chat thread reply counter cache (#21050) 2023-04-11 15:40:25 +10:00
models FEATURE: Reacting to MessageBus in chat thread panel (#21070) 2023-04-13 14:45:50 +02:00
queries/chat DEV: Introduce bulk channel tracking publisher (#20838) 2023-03-28 09:36:28 +10:00
serializers/chat FIX: prevents exception if thread is not found (#21099) 2023-04-14 23:03:09 +02:00
services FIX: prevents exception when publishing processed (#21104) 2023-04-16 10:30:33 +02:00
validators/chat DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
views