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

Hash phone number in MXIDs #579

Open
Gredin67 opened this issue Dec 19, 2022 · 8 comments
Open

Hash phone number in MXIDs #579

Gredin67 opened this issue Dec 19, 2022 · 8 comments
Labels
enhancement New feature or request

Comments

@Gredin67
Copy link

Problem
Currently Localpart template of MXIDs includes the phone number of the WhatsApp contact.

Solution
Would be nice to be able to hash the number to prevent people on Matrix to get access to it.

@Gredin67 Gredin67 added the enhancement New feature or request label Dec 19, 2022
@Gredin67
Copy link
Author

Gredin67 commented Jan 4, 2023

It looks like there is some solution here https://github.com/KrzysztofMadejski/matterbridge/blob/master/bridge/whatsapp/handlers.go#L49

@tulir @sumnerevans Would hiding the phone number be possible/easier if the bridge is only linked to one unique whatsapp account?

@Gredin67
Copy link
Author

Reading public.puppet (jid, avatar, displayname, name_quality, custom_mxid, access_token, next_batch, avatar_url, enable_presence, enable_receipts)
I see that there is already a custom_mxid raw in the public.puppet table, but which is empty, thus seems to be unused.
If not implemented, what would be the procedure (postgresql command) to set a custom_mxid ?

@sumnerevans
Copy link
Member

custom_mxid is used for double puppeting.

@Gredin67
Copy link
Author

OK, if I understand well, double puppeting is not relevant when relaybot is active. Therefore, this parameter could be "re-used to anonymize whatsapp puppet mxid for the relaybot users", e.g. by adding an option with username_template: whatsapp_$custom_mxid where $custom_mxid could be a random number outside the range of msidsn. instead of the current only username_template: whatsapp_{{.}}

Having this $custom_mxid for whatsapp puppets would also allow to handle phone number change of a whatsapp account.

@samip5
Copy link

samip5 commented Mar 14, 2023

OK, if I understand well, double puppeting is not relevant when relaybot is active.

It is relevant if the same whatsapp bridge has both enabled, eg people can be double puppeted (signed in to Whatsapp with their account) and also have other people that are not eg though the relay.

@centralscrutinizer21
Copy link

I would also like to know a viable solution not to expose users mobile number (in my case in a relayed group)

@Gredin67
Copy link
Author

Gredin67 commented Aug 4, 2023

both enabled

I'm talking about the use-case where to have only one user with relaybot enabled. No individual user of the bridge. Maybe some users, each with relaybot enabled, but no double-pupetting activated.

@centralscrutinizer21
Copy link

Hello! anyone found a viable solution to this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

4 participants