-
Notifications
You must be signed in to change notification settings - Fork 767
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 reply fallback leaking sender locale #1610
Conversation
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.
LGTM thanks for the PR. 2 remarks though
<string name="reply_to_an_image">sent an image.</string> | ||
<string name="reply_to_a_video">sent a video.</string> | ||
<string name="reply_to_an_audio_file">sent an audio file.</string> | ||
<string name="reply_to_a_file">sent a file.</string> |
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.
Should be also removed from the translations file. I'm surprised that lint does not complain...
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.
But maybe for the moment we should keep the strings, even if they are not used anymore.
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.
I changed the commits so all the strings are removed in a single commit (separate from the commit that fixes reply fallbacks) that can be easily reverted if needed
@@ -489,6 +487,6 @@ internal class LocalEchoEventFactory @Inject constructor( | |||
// </blockquote> | |||
// </mx-reply> | |||
// No whitespace because currently breaks temporary formatted text to Span | |||
const val REPLY_PATTERN = """<mx-reply><blockquote><a href="%s">%s</a><a href="%s">%s</a><br />%s</blockquote></mx-reply>%s""" | |||
const val REPLY_PATTERN = """<mx-reply><blockquote><a href="%s">In reply to</a><a href="%s">%s</a><br />%s</blockquote></mx-reply>%s""" |
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.
This is not new but I think a space is missing between the two links.
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.
I added the space now, but is the
No whitespace because currently breaks temporary formatted text to Span
comment referring to that or something else?
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.
No, looking at the history, it seems that before the string was defined on several lines. But I think it's ok like that.
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.
(thanks)
Signed-off-by: Tulir Asokan <tulir@maunium.net>
Signed-off-by: Tulir Asokan <tulir@maunium.net>
This pull request fixes the privacy issue where the sender's locale leaks whenever they reply to a message. It is also more conforming to the spec, as the spec does not state that clients should translate the fallback.
Receiver-side translations should be added in #174
Signed-off-by: Tulir Asokan <tulir@maunium.net>
Pull Request Checklist