discourse/plugins/chat/spec
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
..
components/chat FIX: no event when threading is disabled (#21439) 2023-05-09 10:11:29 +02:00
fabricators DEV: Refactor STI/polymorphic associations in chat (#20789) 2023-04-17 15:41:56 +02:00
integration FEATURE: Reintroduce better thread reply counter cache (#21197) 2023-04-24 09:32:04 +10:00
jobs FIX: Thread mention read state and notification links (#21385) 2023-05-04 17:28:51 +02:00
lib FIX: ensures `all_mentioned_user_ids` is not used as identifier (#21452) 2023-05-09 13:00:19 +02:00
mailers DEV: Skip channel-wide mention chat specs (#20770) 2023-03-22 12:44:01 +10:00
models DEV: Create and update chat message mentions earlier (#21388) 2023-05-05 15:47:07 +04:00
queries/chat FIX: Do not count thread messages for channel unreads (#21126) 2023-04-19 08:53:51 +10:00
requests FIX: no event when threading is disabled (#21439) 2023-05-09 10:11:29 +02:00
serializer FIX: Do not serialize thread data if threading disabled (#21107) 2023-04-17 14:29:06 +10:00
services FIX: Incorrect unread count shown in channel when message deleted (#21410) 2023-05-05 15:28:48 +02:00
support DEV: Move channel creation for category into service (#21167) 2023-04-24 09:15:16 +10:00
system DEV: more resilient spec (#21436) 2023-05-08 21:10:57 +02:00
validators DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
plugin_helper.rb FEATURE: Reintroduce better thread reply counter cache (#21197) 2023-04-24 09:32:04 +10:00
plugin_spec.rb UX: update chat icon to d-chat (#20744) 2023-03-21 10:40:42 -04:00