Open Justinzobel opened 4 days ago
So apparently you can set:
'default_phone_region' => 'none',
To dismiss the notification in the admin panel, but I'm not sure what effects it will have on the rest of Nextcloud.
If this is indeed the solution it should be updated at https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#default-phone-region to indicate this can be done.
As far as the setup check is concerned, it simply has to have a value.
As far as it's usage in the code elsewhere is concerned, it is (primarily) used to parse, validate, and reformat the number into E.164 format (i.e. +41446681800
).
It's basically used to convert entered phone numbers into their proper E.164 format if they are not already in that format. If they're already in that format, it doesn't matter.
Put another way, if you can enter the number here without specifying a default country code - and it parses without an error - you're golden. That uses the same library we use to validate/etc.
Now we get to enforcing E.164 for all your users...
The Nextcloud server is global and has no specific region.
Unfortunately I don't know of a universally accepted "the world" and/or "none" equivalent two-letter country code. Even ZZ
doesn't really work for these purposes.
Technically, if there is no default configured, we already require a E.164 number (i.e. one that starts with +
) and won't accept anything less:
Users won't be able to enter their sort of "local" / friendly numbers, but any assumptions we'd be making would also be wrong for a truly diverse user base anyway.
I guess since the setup check (and other spots where we check for a missing country code) merely look for an empty value, we could add our own recognized value that we consider "set by the admin intentionally to accept E.164 only... just like if there was no region configured".
Perhaps none
or outright just e164
.
To dismiss the notification in the admin panel, but I'm not sure what effects it will have on the rest of Nextcloud.
For users that enter an already fully compliant E.164 number, it'll be fine. For users that enter anything else, it should just fail to parse (which is what you want anyway).
Excellent. I'll set my server to none
then. Documentation of the ability to do this (should it not cuase any issues) would be awesome, thanks!
Is your feature request related to a problem? Please describe. The annoying message asking me to set a default phone region
Describe the solution you'd like The ability to set "none" for
default_phone_region
in the configuration to disable the message.Describe alternatives you've considered N/A
Additional context The Nextcloud server is global and has no specific region.