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: federation stopped system messages [WPB-1815] #2040

Merged
merged 34 commits into from
Aug 16, 2023

Conversation

Garzas
Copy link
Contributor

@Garzas Garzas commented Aug 2, 2023


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?

  • users removed system message for federation stopped
  • federation stopped system messages

Attachments (Optional)

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

Before After
federationMemberRemoved
federationStopped

@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2023

@Garzas looks like you are rolling back kalium to a previous commitish.

This means that the PR's target branch (develop) is using a newer version of Kalium, and the changes in this PR will rollback Kalium to an older version.

develop This PR
67514c7ec1394fbb477c9c3fb92600838f2642a5 a269dd393d8f86ae627c9fe9a1846c09e289622f

Is this intentional?

@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2023

Test Results

546 tests  +5   545 ✔️ +5   6m 50s ⏱️ + 1m 46s
  80 suites ±0       1 💤 ±0 
  80 files   ±0       0 ±0 

Results for commit e8c80fa. ± Comparison against base commit 34ca0ab.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2023

@Garzas looks like you are rolling back kalium to a previous commitish.

This means that the PR's target branch (develop) is using a newer version of Kalium, and the changes in this PR will rollback Kalium to an older version.

develop This PR
67514c7ec1394fbb477c9c3fb92600838f2642a5 a269dd393d8f86ae627c9fe9a1846c09e289622f

Is this intentional?

@AndroidBob
Copy link
Collaborator

Build 819 failed.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2023

@Garzas looks like you are rolling back kalium to a previous commitish.

This means that the PR's target branch (develop) is using a newer version of Kalium, and the changes in this PR will rollback Kalium to an older version.

develop This PR
67514c7ec1394fbb477c9c3fb92600838f2642a5 43504d88c947bd196a3642155f633c2c14755a1d

Is this intentional?

@AndroidBob
Copy link
Collaborator

Build 820 failed.

Comment on lines 273 to 302
is MessagePreviewContent.FederatedMembersRemoved -> {
val membersRemovedContent = (content as MessagePreviewContent.FederatedMembersRemoved)
val isSelfRemoved = membersRemovedContent.isSelfUserRemoved
val otherUsersSize = membersRemovedContent.otherUserIdList.size

val previewMessageContent = when {
isSelfMessage && otherUsersSize > 0 -> {
UIText.PluralResource(R.plurals.last_message_self_removed_users, otherUsersSize, otherUsersSize)
}

!isSelfMessage && isSelfRemoved -> {
if (otherUsersSize == 0) {
UIText.StringResource(R.string.last_message_other_removed_only_self_user)
} else {
UIText.PluralResource(
R.plurals.last_message_other_removed_self_user_and_others,
otherUsersSize,
otherUsersSize
)
}
}

else -> {
UIText.PluralResource(R.plurals.last_message_other_removed_other_users, otherUsersSize, otherUsersSize)
}
}

UILastMessageContent.TextMessage(MessageBody(previewMessageContent))
}

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 cover this section with test ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I didn't start writing any test until kalium PR will be approved: wireapp/kalium#1930

@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2023

@Garzas looks like you are rolling back kalium to a previous commitish.

This means that the PR's target branch (develop) is using a newer version of Kalium, and the changes in this PR will rollback Kalium to an older version.

develop This PR
67514c7ec1394fbb477c9c3fb92600838f2642a5 cb7159437ccb25bfd10468d0de057e33add85150

Is this intentional?

@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Merging #2040 (e8c80fa) into develop (34ca0ab) will increase coverage by 0.70%.
The diff coverage is 74.28%.

@@              Coverage Diff              @@
##             develop    #2040      +/-   ##
=============================================
+ Coverage      39.63%   40.34%   +0.70%     
- Complexity       939      953      +14     
=============================================
  Files            305      305              
  Lines          11269    11297      +28     
  Branches        1506     1512       +6     
=============================================
+ Hits            4467     4558      +91     
+ Misses          6373     6302      -71     
- Partials         429      437       +8     
Files Changed Coverage Δ
...tlin/com/wire/android/migration/MigrationMapper.kt 0.00% <0.00%> (ø)
...lin/com/wire/android/mapper/UIParticipantMapper.kt 36.36% <16.66%> (-2.67%) ⬇️
...e/android/ui/home/conversations/model/UIMessage.kt 57.98% <88.23%> (+13.65%) ⬆️
.../wire/android/mapper/SystemMessageContentMapper.kt 67.76% <100.00%> (+31.80%) ⬆️
...ations/details/participants/model/UIParticipant.kt 100.00% <100.00%> (ø)

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 34ca0ab...e8c80fa. Read the comment docs.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2023

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

@AndroidBob
Copy link
Collaborator

Build 952 succeeded.

The build produced the following APK's:

Copy link
Contributor

@yamilmedina yamilmedina left a comment

Choose a reason for hiding this comment

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

I left a comment, about the localization of the link :D

Co-authored-by: Yamil Medina <yamilmedina@users.noreply.github.com>
@AndroidBob
Copy link
Collaborator

Build 965 succeeded.

The build produced the following APK's:

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2023

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

@yamilmedina yamilmedina changed the title feat: federation system messages [WPB-1815] feat: federation stopped system messages [WPB-1815] Aug 8, 2023
@AndroidBob
Copy link
Collaborator

Build 1009 succeeded.

The build produced the following APK's:

@github-actions
Copy link
Contributor

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

@AndroidBob
Copy link
Collaborator

Build 1010 succeeded.

The build produced the following APK's:

@github-actions
Copy link
Contributor

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

@AndroidBob
Copy link
Collaborator

Build 1120 succeeded.

The build produced the following APK's:

@Garzas Garzas enabled auto-merge August 16, 2023 07:25
@AndroidBob
Copy link
Collaborator

Build 1121 failed.

@Garzas Garzas added this pull request to the merge queue Aug 16, 2023
@github-actions
Copy link
Contributor

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

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 16, 2023
@AndroidBob
Copy link
Collaborator

Build 1124 succeeded.

The build produced the following APK's:

@Garzas Garzas added this pull request to the merge queue Aug 16, 2023
Merged via the queue into develop with commit 1138c26 Aug 16, 2023
14 checks passed
@Garzas Garzas deleted the feat/federation-system-messages branch August 16, 2023 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants