discourse/plugins/chat/lib
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
..
chat FIX: ensures all_mentioned_user_ids is not used as identifier (#21452) 2023-05-09 13:00:19 +02:00
discourse_dev DEV: Reintroduce chat rake dev generate tasks (#21164) 2023-04-20 10:53:10 +10:00
email_controller_helper
onebox/templates UX: update chat icon to d-chat (#20744) 2023-03-21 10:40:42 -04:00
tasks DEV: Reintroduce chat rake dev generate tasks (#21164) 2023-04-20 10:53:10 +10:00
service_runner.rb DEV: Move channel creation for category into service (#21167) 2023-04-24 09:15:16 +10:00