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

Parse permalink using parseMatrixEntityFrom from the SDK #2709

Merged
merged 3 commits into from
Apr 15, 2024

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Apr 15, 2024

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Create new PermalinkData type for link to Events.
Keep matrixToConverter for now to first convert to matrix.to link. At some point it may be done by the SDK.
Remove API PermalinkParser.parse(Uri), not really necessary anymore.

Motivation and context

Use common code from the SDK.

Screenshots / GIFs

Tests

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

Create new PermalinkData type for link to Events.
Keep matrixToConverter for now to first convert to matrix.to link. At some point it may be done by the SDK.
Remove parse(Uri)
@bmarty bmarty requested a review from a team as a code owner April 15, 2024 15:51
@bmarty bmarty requested review from ganfra and removed request for a team April 15, 2024 15:51
) : EventLink

data class EventIdAliasLink(
val roomAlias: String,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create RoomAlias and RoomOrAliasId value classes? I really think it'll be easier to manage like that

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, maybe, but I thought you created it?

And I am pretty sure that when we build a permalink for an event, the roomId is used, even if a room Alias is availalbe. The main reason is that roomId are immutable (module room upgrade...), and aliases can change.

Can this be handled separately?

Copy link

sonarcloud bot commented Apr 15, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Contributor

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/NiE76j

Copy link

codecov bot commented Apr 15, 2024

Codecov Report

Attention: Patch coverage is 26.31579% with 14 lines in your changes are missing coverage. Please review.

Project coverage is 73.11%. Comparing base (89d2f43) to head (9ee36e9).

Files Patch % Lines
...id/libraries/matrix/api/permalink/PermalinkData.kt 25.00% 12 Missing ⚠️
...ement/android/libraries/matrix/api/room/Mention.kt 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2709      +/-   ##
===========================================
- Coverage    73.13%   73.11%   -0.03%     
===========================================
  Files         1478     1478              
  Lines        35707    35712       +5     
  Branches      6862     6860       -2     
===========================================
- Hits         26115    26111       -4     
- Misses        6040     6049       +9     
  Partials      3552     3552              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bmarty bmarty merged commit ff6c8df into develop Apr 15, 2024
14 of 16 checks passed
@bmarty bmarty deleted the feature/bma/permalinkParser branch April 15, 2024 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants