-
Notifications
You must be signed in to change notification settings - Fork 742
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 mentions using matrix.to rather than client defined permalink base url #5544
Fix mentions using matrix.to rather than client defined permalink base url #5544
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.
It seems fine to me, I added some comments
@@ -105,6 +105,28 @@ internal class PermalinkFactory @Inject constructor( | |||
?.substringBeforeLast("?") | |||
} | |||
|
|||
fun createHtmlMentionSpanTemplate(forceMatrixTo: Boolean): 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.
I would combine createMdMentionSpanTemplate
and createHtmlMentionSpanTemplate
and pass MENTION_SPAN_TO_HTML_TEMPLATE_BEGIN
or MENTION_SPAN_TO_MD_TEMPLATE_BEGIN
as parameter to avoid code duplication.
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.
Fair point. I actually made an enum at the interface level so it's not bind to what's in the factory :)
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.
Nice!
Type of change
Content
Mentions permalinks are now based on the client defined permalink base url if available rather than using matrix.to (default).
Motivation and context
Fixes #5521
Tests
Tested devices
Checklist