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

fix(message): fix in-message embedded link validator (WPB-3554) #2089

Merged

Conversation

github-actions[bot]
Copy link
Contributor

Cherry pick from the original PR:


⚠️ Conflicts during cherry-pick:


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Update the logic to check the embedded link in a message:
1- Show a visit link confirmation dialog when the user click on an embedded link
2- if the link starts with schema [anyString]://[anystring] we don't modify the link
ELSE -> add https:// to the link/text

Testing

Unit tests added

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Send a message with any combination of links you can imagine:
1- the visit link dialog, always must be appear
2- if the link misses the schema the shown link in the above dialog must start with https
3- if the link starts with schema, the shown link in the dialog must be the same as you posted
4- the app must not crash in any cases


References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@github-actions github-actions bot added the cherry-pick PR is cherry-picking changes from another banch label Aug 11, 2023
@AndroidBob
Copy link
Collaborator

Build 1029 succeeded.

The build produced the following APK's:

@mchenani mchenani added this pull request to the merge queue Aug 15, 2023
@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Merging #2089 (e1633fd) into develop (2000815) will increase coverage by 0.00%.
Report is 1 commits behind head on develop.
The diff coverage is 25.00%.

@@            Coverage Diff             @@
##             develop    #2089   +/-   ##
==========================================
  Coverage      39.63%   39.63%           
  Complexity       939      939           
==========================================
  Files            305      305           
  Lines          11262    11269    +7     
  Branches        1506     1506           
==========================================
+ Hits            4464     4467    +3     
- Misses          6369     6373    +4     
  Partials         429      429           
Files Changed Coverage Δ
...android/notification/MessageNotificationManager.kt 0.00% <0.00%> (ø)
.../ui/home/conversations/MessageComposerViewModel.kt 73.68% <50.00%> (-0.39%) ⬇️
.../ui/home/conversations/MessageComposerViewState.kt 84.61% <50.00%> (-6.30%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 98db6d7...e1633fd. Read the comment docs.

@github-actions
Copy link
Contributor Author

Test Results

541 tests  +4   540 ✔️ +4   5m 39s ⏱️ - 1m 25s
  80 suites +1       1 💤 ±0 
  80 files   +1       0 ±0 

Results for commit e1633fd. ± Comparison against base commit 98db6d7.

@github-actions
Copy link
Contributor Author

APKs built during tests are available here. Scroll down to Artifacts!

Merged via the queue into develop with commit 7e00519 Aug 15, 2023
10 checks passed
@mchenani mchenani deleted the rc/fix/in_message_embedded_link_validator-cherry-pick branch August 15, 2023 09:41
@AndroidBob
Copy link
Collaborator

Build 1090 succeeded.

The build produced the following APK's:

@echoes-hq echoes-hq bot added the echoes: product-roadmap Work aligned with the customer-announced roadmap, targeting a specific release date. label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick PR is cherry-picking changes from another banch echoes: product-roadmap Work aligned with the customer-announced roadmap, targeting a specific release date. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants