-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
canonical_email should be part of the matrix usernames #43
Comments
Matrix user IDs are immutable, so the bridge needs to use an immutable identifier for bridged users. |
I'm pretty sure GAIAs are immutable (eg: i can't change my gmail address while i'm chatting with someone). Ignoring the migration diffculties, this shouldn't be a problem. |
Hmm, maybe. But I don't think hangups.user.User.emails[0] is immutable. It seems to be generated fully from the details at contacts.google.com. Hangups seems to grab the set of emails associated with any match from there (even if nonsensical). |
Ok! what do we think now? Immutable enough? Maybe a config option if we're not sure? I'm willing to take the risk on my bridge. diff --git a/mautrix_hangouts/portal.py b/mautrix_hangouts/portal.py
index 0bb9821..9eaa785 100644
--- a/mautrix_hangouts/portal.py
+++ b/mautrix_hangouts/portal.py
@@ -218,6 +218,7 @@ class Portal(BasePortal):
self.other_user_id = users[0].id_.gaia_id
if not self.mxid:
return
+ self.log.debug([(user.canonical_email, user.emails) for user in users])
puppets: Dict[HangoutsUser, p.Puppet] = {user: p.Puppet.get_by_gid(user.id_.gaia_id)
for user in users}
await asyncio.gather(*[puppet.update_info(source=source, info=user) |
I really think the google account usernames should be part of the matrix usernames, instead of the long (opaque) number.
What I have now:
@hangouts_100121435454675246423:example.com
, this might be hangups.user.UserID but i'm not sure.What I want to have:
@hangouts_somegaia_at_gmail.com:example.com
. hangups.user.User.emails is probably what we should be using.Perhaps this is related to issue #42.
Though, I'm not sure how migration would work though for chats I'm already in.
The text was updated successfully, but these errors were encountered: