Closed MorryGun closed 8 months ago
@MorryGun Good catch. It's failing because it can no longer look up the inviter by the stored ID.
We could either lazy remove these invites on load, or proactively on a UserModel.UserRemovedEvent
event.
Care to PR a fix?
I don't think deleting invited is safe, I'd rather delete the inviter ID - as long as an email is sent, it is not needed anymore? BTW, if this is the case, what is the point of storing it in a DB?
The problem is that if the authority to make an invitation rested in a User that no longer exists, we should probably delete the invite.
BTW, if this is the case, what is the point of storing it in a DB?
It's returned in the API, so we can't break backwards compatibility. We, for one, use the inviter in our UI to show if you (or who) created the invitation.
Settled on lazy removing the inviterId. We may add removal of invites in the future.
Steps to reproduce:
Expected result: 200 with a list of existing invitations Actual result: 400 with message {"error":"unknown_error"}