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(RC): send pings as self deleting and messsage duration clenup #1877

Merged
merged 8 commits into from
Jul 13, 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

pings are not sent as self deleting

Solutions

  1. set message timer in the knock use case.
  2. clean up message duration and remove duplicated code

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 MohamadJaara requested review from a team, yamilmedina, vitorhugods, mchenani, Garzas and trOnk12 and removed request for a team July 12, 2023 13:53
@github-actions
Copy link
Contributor

github-actions bot commented Jul 12, 2023

Unit Test Results

       6 files         6 suites   6m 37s ⏱️
1 927 tests 1 913 ✔️ 14 💤 0

Results for commit 5825534.

♻️ This comment has been updated with latest results.

@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (release/candidate@57ed185). Click here to learn what that means.
The diff coverage is n/a.

@@                 Coverage Diff                  @@
##             release/candidate    #1877   +/-   ##
====================================================
  Coverage                     ?   54.43%           
  Complexity                   ?     1525           
====================================================
  Files                        ?      969           
  Lines                        ?    35753           
  Branches                     ?     3182           
====================================================
  Hits                         ?    19462           
  Misses                       ?    15001           
  Partials                     ?     1290           

@@ -685,22 +681,13 @@ internal class ConversationDataSource internal constructor(
override suspend fun getConversationUnreadEventsCount(conversationId: ConversationId): Either<StorageFailure, Long> =
wrapStorageRequest { messageDAO.getConversationUnreadEventsCount(conversationId.toDao()) }

override suspend fun getUserSelfDeletionTimer(conversationId: ConversationId): Either<StorageFailure, SelfDeletionTimer> =
Copy link
Member Author

Choose a reason for hiding this comment

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

this fun is not used anywhere

Copy link
Member

@vitorhugods vitorhugods left a comment

Choose a reason for hiding this comment

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

I had some concerns but reading the rest of the PR made it all clear to me.

Nicely done. Good choices.

MohamadJaara and others added 3 commits July 13, 2023 10:21
…ment/ObserveSelfDeletionTimerSettingsForConversationUseCaseArrangement.kt

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

# Conflicts:
#	logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/ProtoContentMapper.kt
@MohamadJaara MohamadJaara enabled auto-merge (squash) July 13, 2023 08:29
@MohamadJaara MohamadJaara merged commit 211ae8a into release/candidate Jul 13, 2023
9 checks passed
@MohamadJaara MohamadJaara deleted the feat/send_pings_as_self_deleting branch July 13, 2023 09:14
MohamadJaara added a commit that referenced this pull request Jul 13, 2023
…1877)

* feat: send self deleting knock messages

* map knock to ephemeral message when sending

* cleanup ephemeral message sending

* detekt

* detekt

* Update logic/src/commonTest/kotlin/com/wire/kalium/logic/util/arrangement/ObserveSelfDeletionTimerSettingsForConversationUseCaseArrangement.kt

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

* update test

---------

Co-authored-by: Vitor Hugo Schwaab <[email protected]>
tmspzz pushed a commit that referenced this pull request Jul 13, 2023
* feat: add timer to all message types (#1870)

* feat: add message timer to all message types

* parse ephemeral pings from/to proto

* feat: accept ephemeral system message

* detekt

* detekt

* fix test

* address PR comments

* address PR comments

* merge conflicts

* feat(RC): send pings as self deleting and messsage duration clenup (#1877)

* feat: send self deleting knock messages

* map knock to ephemeral message when sending

* cleanup ephemeral message sending

* detekt

* detekt

* Update logic/src/commonTest/kotlin/com/wire/kalium/logic/util/arrangement/ObserveSelfDeletionTimerSettingsForConversationUseCaseArrangement.kt

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

* update test

---------

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

* fix mapper

---------

Co-authored-by: Vitor Hugo Schwaab <[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.

4 participants