mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
This PR adds status to mentions in chat and makes those mentions receive live updates. There are known unfinished part in this implementation: when posting a message, status on mentions on that message appears immediately, but only if a user used autocomplete when typing the message. If user copy and paste a message with mentions into chat composer, those mentions won't have user status on them. PRs with fixes for both problems are following soon. Preparations for this PR that were made previously include: - DEV: correct a relationship – a chat message may have several mentions0dcfd7ddec- DEV: extract the logic for extracting and expanding mentions from ChatNotifier75b81b6854- DEV: Always create chat mention recordsfa543cda06- DEV: better split create_notification! and send_notifications logice292c45924- DEV: more tests for mentions when updating chat messagese7292e1682- DEV: extract updating status on mentions into a lib functione49d338c21- DEV: Create and update chat message mentions earlier35a414bb38- DEV: Create a chat_mention record when self mentioning2703f2311a- DEV: When deleting a chat message, do not delete mention recordsf4fde4e49b