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: handle the case where asset name can be missing [WPB-10830] 🍒 #3002

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 10, 2024

BugWPB-10830 [Android] Receiving images is prohibited when shared from iOS from col3 backend

This PR was automatically cherry-picked based on the following PR:

Original PR description:



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?

Issues

  1. iOS does not send asset name when sending images
  2. web sends 2 messages the first one with meta data including name and mimeType, and a second with where to get the asset from

Causes (Optional)

in both cases if asset restriction is on then the message will not be handled correctly and in iOS case it will show prohibated asset, and in web case it will not be visable

Solutions

  1. add fail safe to check mimeType when name is missing, did not cover all cases but the most common mimeType, this should be enugh tho
  2. allow handling of assets with data and no name since it will be handled later in the code by getting the type of the first message

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.

Notes (Optional)

Specify here any other facts that you think are important for this issue.

Attachments (Optional)

Attachments like images, videos, etc. (drag and drop in the text box)


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

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.

@@ -79,7 +79,16 @@ internal class GetMessageAssetUseCaseImpl(
}, { message ->
when (val content = message.content) {
is MessageContent.Asset -> {
<<<<<<< HEAD
Copy link
Contributor

Choose a reason for hiding this comment

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

.

Copy link

sonarcloud bot commented Sep 13, 2024

@MohamadJaara MohamadJaara changed the title fix: handle the case where asset name can be missing 🍒 fix: handle the case where asset name can be missing [WPB-10830] 🍒 Sep 13, 2024
@echoes-hq echoes-hq bot added the echoes: bugs Technical or functional defects in the product label Sep 13, 2024
Copy link
Contributor Author

github-actions bot commented Sep 13, 2024

Test Results

3 200 tests  +6   3 093 ✔️ +4   3m 27s ⏱️ -13s
   548 suites ±0      107 💤 +2 
   548 files   ±0          0 ±0 

Results for commit 4813237. ± Comparison against base commit 3406af8.

♻️ This comment has been updated with latest results.

@MohamadJaara MohamadJaara added this pull request to the merge queue Sep 13, 2024
@datadog-wireapp
Copy link

Datadog Report

Branch report: fix/Images-and-files-from-same-backend-not-received-in-proteus-conversation-cherry-pick
Commit report: 9b7e0d8
Test service: kalium-jvm

✅ 0 Failed, 3093 Passed, 107 Skipped, 10.89s Total Time

Merged via the queue into release/candidate with commit a04b87f Sep 13, 2024
24 of 25 checks passed
@MohamadJaara MohamadJaara deleted the fix/Images-and-files-from-same-backend-not-received-in-proteus-conversation-cherry-pick branch September 13, 2024 17:22
github-actions bot added a commit that referenced this pull request Sep 13, 2024
…3002)

* Commit with unresolved merge conflicts

* merge conflicts

---------

Co-authored-by: Mohamad Jaara <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Sep 16, 2024
…3002) (#3012)

* Commit with unresolved merge conflicts

* merge conflicts

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Mohamad Jaara <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants