Skip to content

Conversation

@ohassine
Copy link
Member

@ohassine ohassine commented Nov 21, 2025

BugWPB-21093 [Android] Receive files in conversation list


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

Handle MULTIPART type and retrieve last message preview to be shown in conversation list based on number of attachements and content type.

For:

  • 1 image attachement: "Username shared an Image"
  • Video : "username shared X videos."
  • image: "username shared X images."
  • audio: "username shared X audio messages."
  • file: "username shared X files."

If the user received a mix of files and images/video/audio
We show : "username shared X files."

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.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 21, 2025

Test Results

0 tests   - 4 121   0 ✅  - 4 010   0s ⏱️ - 5m 52s
0 suites  -   694   0 💤  -   111 
0 files    -   694   0 ❌ ±    0 

Results for commit 44e6a16. ± Comparison against base commit 756495d.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 21, 2025

🐰 Bencher Report

Branchlast-message-preview
Testbedubuntu-latest

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkLatencymicroseconds (µs)
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInFiles📈 view plot
⚠️ NO THRESHOLD
685.71 µs
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemory📈 view plot
⚠️ NO THRESHOLD
593,742.30 µs
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmark📈 view plot
⚠️ NO THRESHOLD
1,519,307.85 µs
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmark📈 view plot
⚠️ NO THRESHOLD
27,207.89 µs
🐰 View full continuous benchmarking report in Bencher

@sonarqubecloud
Copy link

@ohassine ohassine changed the title feat: retrieve last message preview for conversation list feat: retrieve last message preview for conversation list (WPB-21093) Nov 21, 2025
Comment on lines +69 to +80
LEFT JOIN (
SELECT
message_id,
conversation_id,
CASE
WHEN COUNT(DISTINCT asset_mime_type) = 1 THEN MIN(asset_mime_type)
ELSE NULL
END AS asset_mime_type,
COUNT(*) attachments_count
FROM MessageAttachments
GROUP BY message_id, conversation_id
) AS AttachmentsContent ON LastMessage.message_id = AttachmentsContent.message_id AND LastMessage.conversation_id = AttachmentsContent.conversation_id
Copy link
Member

Choose a reason for hiding this comment

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

can you please provide some benchmark info about the effect of this join when there are multiple conversations with many assets as last message

@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2026

This PR is stale because it has been open 30 days with no activity. Please update it or close it in case is not relevant anymore.

@github-actions github-actions bot added the stale label Jan 2, 2026
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.

3 participants