-
Notifications
You must be signed in to change notification settings - Fork 31
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
Fix not being able to DM users with non-ascii usernames #271
base: develop
Are you sure you want to change the base?
Conversation
0f81080
to
3450988
Compare
Remote usernames with multibyte characters in them currently get encoded into mxids in a way that may result in information loss (see matrix-org/matrix-appservice-bridge#346). This makes it impossible to reach some users by MXID alone, so this makes it lookup the MXID in the user store, which contains the original, unmangled username. Fixes GH-268.
3450988
to
d83aed1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The failing test doesn't look trivial.
That should get fixed first.
if (remoteUsers.length > 1) { | ||
log.error( | ||
`Multiple remote users found for ${event.state_key!}:`, | ||
remoteUsers.map(u => `${u.protocolId}://${u.username}`).join(', ') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this supposed to look like an URI with ://
?
The lines below just separate the protocol and username with a colon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah – it follows the convention we often use in the logs, like here.
The regular colon usage below is mostly arbitrary, I think. @Half-Shot?
Which test? |
@tadzik: Have you progressed on your PR about @jaller94 comment? @Half-Shot: What do you think? |
Remote usernames with multibyte characters in them currently get encoded
into mxids in a way that may result in information loss
(see matrix-org/matrix-appservice-bridge#346).
This makes it impossible to reach some users by MXID alone, so this
makes it lookup the MXID in the user store, which contains the original,
unmangled username.
Fixes GH-268.