Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhoneNumber's allow_* columns are inappropriate #1603

Closed
jace opened this issue Jan 24, 2023 · 0 comments · Fixed by #1624
Closed

PhoneNumber's allow_* columns are inappropriate #1603

jace opened this issue Jan 24, 2023 · 0 comments · Fixed by #1624

Comments

@jace
Copy link
Member

jace commented Jan 24, 2023

The PhoneNumber model introduced in #1572 had a late change introducing three additional columns: allow_sms, allow_wa and allow_sm. These columns are poorly thought out and may need to be removed:

  1. These are preference columns and need to be reset when a phone number is released from an exclusive lock. However, there is no signal handler for such a release, only one for zero reference counts. Since no reset happens, obsolete preferences are imposed on the next owner.

  2. These columns do not indicate availability on WhatsApp and Signal Messenger, only explicit preference to use them. However, such preference is useless without availability, so downstream uses (such as User.transport_for_whatsapp) are depending on a misleading preference column.

  3. There is no record of who set these flags, or when.

  4. Choosing to block SMS is a legitimate preference and has no additional dependency (unlike WA/SM availability), but this should be called block_sms, not allow_sms, and likely should be on UserPhone, not PhoneNumber.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant