mirror of
https://github.com/discourse/discourse.git
synced 2024-12-30 07:53:43 +08:00
55bf0e21fb
If an existing user (John) accepts an invite created by Kenny to a group, John may be seen as invited by Kenny, despite already having an account on the site. This fix removes the bug by excluding invites that determine the invited_by after the user's creation date. The delay buffer in the query accounts for invites that also create the user at the same time.
12 lines
178 B
Ruby
12 lines
178 B
Ruby
# frozen_string_literal: true
|
|
|
|
Fabricator(:invite) do
|
|
invited_by(fabricator: :user)
|
|
email "iceking@ADVENTURETIME.ooo"
|
|
end
|
|
|
|
Fabricator(:invited_group) do
|
|
group
|
|
invite
|
|
end
|