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

feat: composite messages #1916

Merged
merged 27 commits into from
Jul 27, 2023
Merged

feat: composite messages #1916

merged 27 commits into from
Jul 27, 2023

Conversation

MohamadJaara
Copy link
Member


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

list of changes:

Causes (Optional)

Briefly describe the causes behind the issues. This could be helpful to understand the adopted solutions behind some nasty bugs or complex issues.

Solutions

Briefly describe the solutions you have implemented for the issues explained above.

Dependencies (Optional)

If there are some other pull requests related to this one (e.g. new releases of frameworks), specify them here.

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.

MohamadJaara and others added 9 commits July 19, 2023 18:02
* receive composite messages

* map composite to proto

* detekt

* detekt

* db migration

* db migration

* sqm

* map to composite entity

* detekt

* remove is pending state from the DB

* Update logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/MessageContent.kt

Co-authored-by: Vitor Hugo Schwaab <[email protected]>

* Update logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/MessageContent.kt

Co-authored-by: Vitor Hugo Schwaab <[email protected]>

* address PR comments

* detekt

* remove composite message preview mapping

* fix migration

* merge issues

* address PR comments

* address PR comments

* detekt

---------

Co-authored-by: Vitor Hugo Schwaab <[email protected]>
* receive composite messages

* map composite to proto

* detekt

* detekt

* db migration

* db migration

* sqm

* map to composite entity

* detekt

* remove is pending state from the DB

* Update logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/MessageContent.kt

Co-authored-by: Vitor Hugo Schwaab <[email protected]>

* Update logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/MessageContent.kt

Co-authored-by: Vitor Hugo Schwaab <[email protected]>

* address PR comments

* detekt

* remove composite message preview mapping

* fix migration

* feat: use case to execute composite message action

* expose use case to message scope

* missing param

* rename use case

* docs

* map to proto

* merge issues

* address PR comments

* address PR comments

* detekt

* sent the message only to the message original sender

* detekt

* Update logic/src/commonTest/kotlin/com/wire/kalium/logic/data/message/MessageMetaDataRepositoryTest.kt

Co-authored-by: Alexandre Ferris <[email protected]>

* PR comments

---------

Co-authored-by: Vitor Hugo Schwaab <[email protected]>
Co-authored-by: Alexandre Ferris <[email protected]>
* receive composite messages

* map composite to proto

* detekt

* detekt

* db migration

* db migration

* sqm

* map to composite entity

* detekt

* remove is pending state from the DB

* Update logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/MessageContent.kt

Co-authored-by: Vitor Hugo Schwaab <[email protected]>

* Update logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/MessageContent.kt

Co-authored-by: Vitor Hugo Schwaab <[email protected]>

* address PR comments

* detekt

* remove composite message preview mapping

* fix migration

* feat: use case to execute composite message action

* expose use case to message scope

* missing param

* rename use case

* docs

* map to proto

* merge issues

* address PR comments

* address PR comments

* detekt

* handle ButtonActionConfirmation event

* add unit test

* detekt

* detekt

* sent the message only to the message original sender

* detekt

---------

Co-authored-by: Vitor Hugo Schwaab <[email protected]>
* receive composite messages

* map composite to proto

* detekt

* detekt

* db migration

* db migration

* sqm

* map to composite entity

* detekt

* remove is pending state from the DB

* Update logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/MessageContent.kt

Co-authored-by: Vitor Hugo Schwaab <[email protected]>

* Update logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/MessageContent.kt

Co-authored-by: Vitor Hugo Schwaab <[email protected]>

* address PR comments

* detekt

* remove composite message preview mapping

* fix migration

* feat: use case to execute composite message action

* expose use case to message scope

* missing param

* rename use case

* docs

* map to proto

* merge issues

* address PR comments

* address PR comments

* detekt

* handle ButtonActionConfirmation event

* add unit test

* detekt

* detekt

* sent the message only to the message original sender

* detekt

* feat: map composite messages preview

* Update persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/message/MessageMapper.kt

Co-authored-by: Alexandre Ferris <[email protected]>

---------

Co-authored-by: Vitor Hugo Schwaab <[email protected]>
Co-authored-by: Alexandre Ferris <[email protected]>
… [part-5] (#1909)

* include composite messages to message preview

* detekt

* feat: display composite message preview

* add test
* fea: include message buttons into the backup

* import buttons
# Conflicts:
#	logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/MessageContent.kt
#	logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/MessageMapper.kt
#	logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/PersistMessageUseCase.kt
#	persistence/src/commonMain/db_user/migrations/50.sqm
#	persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/message/MessageEntity.kt
#	persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/message/MessageInsertExtension.kt
#	persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/message/MessageMapper.kt
@github-actions
Copy link
Contributor

github-actions bot commented Jul 24, 2023

Unit Test Results

   340 files   -   67     340 suites   - 67   26s ⏱️ - 1m 29s
1 889 tests  - 312  1 820 ✔️  - 283  69 💤  - 29  0 ±0 

Results for commit 7646aec. ± Comparison against base commit e858f56.

♻️ This comment has been updated with latest results.

@MohamadJaara MohamadJaara requested review from alexandreferris, vitorhugods, trOnk12, a team, typfel and mchenani and removed request for a team July 24, 2023 16:45
Comment on lines +289 to +290
MessageEntityContent.ConversationDegradedMLS -> TODO()
MessageEntityContent.ConversationDegradedProteus -> TODO()
Copy link
Member Author

Choose a reason for hiding this comment

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

maybe @borichellow can explain if those options are missing here ?

@MohamadJaara MohamadJaara requested a review from typfel July 25, 2023 13:02
@MohamadJaara MohamadJaara requested a review from typfel July 25, 2023 16:32
@MohamadJaara MohamadJaara enabled auto-merge (squash) July 26, 2023 14:29
@MohamadJaara MohamadJaara enabled auto-merge (squash) July 26, 2023 15:22
@MohamadJaara MohamadJaara enabled auto-merge (squash) July 26, 2023 15:49
@tmspzz tmspzz disabled auto-merge July 26, 2023 16:32
@tmspzz tmspzz enabled auto-merge (squash) July 26, 2023 16:44
@codecov-commenter
Copy link

Codecov Report

Merging #1916 (09c9aba) into develop (6218756) will increase coverage by 0.26%.
The diff coverage is 48.58%.

@@              Coverage Diff              @@
##             develop    #1916      +/-   ##
=============================================
+ Coverage      56.06%   56.33%   +0.26%     
  Complexity        35       35              
=============================================
  Files            986      996      +10     
  Lines          36886    37233     +347     
  Branches        3318     3374      +56     
=============================================
+ Hits           20680    20974     +294     
- Misses         14822    14838      +16     
- Partials        1384     1421      +37     
Files Changed Coverage Δ
...onMain/kotlin/com/wire/kalium/logic/CoreFailure.kt 18.96% <ø> (ø)
...gic/data/conversation/CommitBundleEventReceiver.kt 0.00% <0.00%> (ø)
...otlin/com/wire/kalium/logic/data/id/QualifiedId.kt 73.68% <ø> (ø)
...wire/kalium/logic/data/message/BroadcastMessage.kt 40.42% <0.00%> (ø)
...m/logic/data/message/CompositeMessageRepository.kt 0.00% <0.00%> (ø)
...tlin/com/wire/kalium/logic/data/message/Message.kt 50.38% <0.00%> (-0.60%) ⬇️
...kalium/logic/data/message/PersistMessageUseCase.kt 0.00% <0.00%> (ø)
.../wire/kalium/logic/feature/message/MessageScope.kt 0.00% <0.00%> (ø)
.../feature/message/PersistMigratedMessagesUseCase.kt 38.31% <0.00%> (-1.11%) ⬇️
...m/logic/sync/receiver/ConversationEventReceiver.kt 0.00% <ø> (ø)
... and 27 more

... and 13 files with indirect coverage changes


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 6218756...09c9aba. Read the comment docs.

@tmspzz tmspzz merged commit e215508 into develop Jul 27, 2023
12 checks passed
@tmspzz tmspzz deleted the feat/composit_messages/epic branch July 27, 2023 11:27
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.

6 participants