kamax-matrix / mxisd

Federated Matrix Identity Server
GNU Affero General Public License v3.0
220 stars 112 forks source link

Improve support for phone number without country calling codes #82

Closed ananace closed 5 years ago

ananace commented 6 years ago

I just finished setting up mxisd and noticed that the phone numbers it imports from LDAP are attached directly to the Matrix account, regardless of if they have a calling code or not.

Perhaps there could be a setting for specifying the default calling code to use if none exists in the number itself?

maxidorius commented 6 years ago

Indeed, support is bare minimal in that area, thank you for noticing. Will add to the list of improvement for the next minor release!

maxidorius commented 5 years ago

I'm afraid this won't be possible to implement. A similar suggestion was brought up a while ago and research was already done by another contributor and this is the conclusion:

Because mxisd use two-way lookups, validation and a set of integrations which may or may not bypass some internal checks, this could lead to a horde of split-brain and mismatch scenarios at the 3PID level. Therefore we won't support this and we expect identity stores to return the valid data which mxisd will not touch.

This can be worked around if you store phone numbers with the international prefix (+ or 00) as you can edit LDAP queries. mxisd already adds a leading + per example. You can try doing so for this.

I'm afraid this will be it for any v1.x release. We might reconsider this for v2.x if and whenever it will exist.