discourse/plugins/chat
Joffrey JAFFEUX 54b2a85b27
FIX: ensures all_mentioned_user_ids is not used as identifier (#21452)
When making the list of users to notify we set `all_mentioned_user_ids` key on the `to_notify` Hash.

This hash will be passed around until the actual moment where we send the notifications:

```ruby
identifier_text =
  case identifier_type
  when :here_mentions
    "@here"
  when :global_mentions
    "@all"
  when :direct_mentions
    ""
  else
    "@#{identifier_type}"
  end
```

As not found `all_mentioned_user_ids` would end up being sent as `@all_mentioned_user_ids` which is obviously incorrect.

This commit is a direct fix to the issue and will remove the key as soon as we have used it sooner up in the chain.

This bug was reproducible when doing this sequence of events:

- create a message with a direct mention: `@bob hi`
- edit this message into a global mention `@all hi`
2023-05-09 13:00:19 +02:00
..
app DEV: converts models to native classes (#21418) 2023-05-08 18:24:41 +02:00
assets DEV/ glimmerify chat-channel-status (#21445) 2023-05-09 09:22:25 +02:00
config UX: groups deleted messages (#21411) 2023-05-05 17:08:33 +02:00
db DEV: Chat thread reply counter cache (#21050) 2023-04-11 15:40:25 +10:00
lib FIX: ensures all_mentioned_user_ids is not used as identifier (#21452) 2023-05-09 13:00:19 +02:00
public
spec FIX: ensures all_mentioned_user_ids is not used as identifier (#21452) 2023-05-09 13:00:19 +02:00
test/javascripts DEV/ glimmerify chat-channel-status (#21445) 2023-05-09 09:22:25 +02:00
plugin.rb DEV: Improve add_to_serializer include_* options (#21220) 2023-04-24 12:17:51 +01:00
README.md DEV: Chat service object initial implementation (#19814) 2023-02-13 13:09:57 +01:00

This plugin is still in active development and may change frequently

Documentation

The Discourse Chat plugin adds chat functionality to your Discourse so it can natively support both long-form and short-form communication needs of your online community.

For user documentation, see Discourse Chat.

For developer documentation, see Discourse Documentation.