-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix validation errors for import user numbers (#5362)
Switching to an import user per organization introduced a bug where creating a new Import User causes a bug because the phone number fails the uniqueness validations. We no longer have a globally constant phone number—we instead generate a random string as our fake phone number that is unique to each organization and guaranteed to not collide again. Explanations for some choices: * We convert the UUID of the org into a url-safe base64 representation because: * It is simple and reversible * It is only 22 bytes, which is shorter than the 36-byte UUID representation (this helps with displaying and copying) * There's guaranteed to be no collisions since organizations are universally unique * We do not include a data migration to migrate the existing "0000000001" numbers because the phone number of a bot user is a filler value with no intrinsic purpose.
- Loading branch information
1 parent
b98529c
commit 453b053
Showing
2 changed files
with
24 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters