mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
PERF: Async notify users after inviting group (#12697)
Inviting a group generates a notification for each member. If this happens synchronously it may take a while, leading to a poor user experience.
This commit is contained in:
@@ -982,6 +982,7 @@ describe Topic do
|
||||
set_state!(group, user_muted, :muted)
|
||||
|
||||
Notification.delete_all
|
||||
Jobs.run_immediately!
|
||||
topic.invite_group(topic.user, group)
|
||||
|
||||
expect(Notification.count).to eq(3)
|
||||
|
||||
@@ -281,6 +281,7 @@ describe TopicUser do
|
||||
another_user = Fabricate(:user)
|
||||
group.add(another_user)
|
||||
|
||||
Jobs.run_immediately!
|
||||
topic.invite_group(target_user, group)
|
||||
|
||||
expect(TopicUser.get(topic, another_user).notification_level)
|
||||
|
||||
Reference in New Issue
Block a user