I am posting to the /invites.json API endpoint with the following JSON:
{
"email": "new.member@example.com",
"skip_email": true,
"max_redemptions_allowed": 1,
"expires_at": << current date + 1 month >>
"group_names": "example_group"
}
Which creates a valid invite, of which I grab the invite link and provide to the user.
However, when the user attempts to redeem the invite, it is failing at https://github.com/discourse/discourse/blob/master/app/controllers/invites_controller.rb#L225 with the generic invite.error_message error from failing to update the database for whatever reason.
I’ve been trying to trace the code, but I’m not seeing anything obvious sticking out.
This is an example record from the invites table:
id | invite_key | email | invited_by_id | user_id | redeemed_at | created_at | updated_at | deleted_at | deleted_by_id | invalidated_at | moderator | custom_message | emailed_status | max_redemptions_allowed | redemption_count | expires_at
1587 | 4b4e........................2307 | example@gmail.com | 1 | | | 2021-04-11 23:51:05.253528 | 2021-04-11 23:51:05.253528 | | | | f | | 0 | 1 | 0 | 2021-05-11 11:51:05.193
