mirror of
https://github.com/hanzoai/forum.git
synced 2026-11-02 23:44:53 +00:00
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 "[email protected]"
|
|
end
|
|
|
|
Fabricator(:invited_group) do
|
|
group
|
|
invite
|
|
end
|