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

Threads: added support to read receipts (MSC3771) #6964

Merged
merged 5 commits into from
Nov 4, 2022

Conversation

gileluard
Copy link
Contributor

resolves #6663

@gileluard gileluard marked this pull request as draft October 24, 2022 20:29
@codecov
Copy link

codecov bot commented Oct 24, 2022

Codecov Report

Base: 11.78% // Head: 11.77% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (3dcaf4a) compared to base (4a98acd).
Patch coverage: 18.60% of modified lines in pull request are covered.

❗ Current head 3dcaf4a differs from pull request most recent head 86f2074. Consider uploading reports for the commit 86f2074 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6964      +/-   ##
===========================================
- Coverage    11.78%   11.77%   -0.02%     
===========================================
  Files         1611     1608       -3     
  Lines       158118   158028      -90     
  Branches     64239    64044     -195     
===========================================
- Hits         18631    18603      -28     
+ Misses      138858   138790      -68     
- Partials       629      635       +6     
Flag Coverage Δ
uitests 54.60% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ot/Modules/Room/DataSources/ThreadDataSource.swift 0.00% <0.00%> (ø)
Riot/Modules/Room/MXKRoomViewController.m 0.00% <0.00%> (ø)
Riot/Modules/Threads/ThreadsCoordinator.swift 0.00% <ø> (ø)
.../Modules/MatrixKit/Models/Room/MXKRoomDataSource.m 13.42% <22.22%> (+0.07%) ⬆️
...tSwiftUI/Modules/Common/Extensions/Publisher.swift 0.00% <0.00%> (-100.00%) ⬇️
.../Service/UserSessionsOverviewServiceProtocol.swift 50.00% <0.00%> (-50.00%) ⬇️
...onsOverview/View/UserSessionListItemViewData.swift 60.00% <0.00%> (-40.00%) ⬇️
...rSessionsOverview/UserSessionsOverviewModels.swift 75.00% <0.00%> (-25.00%) ⬇️
...view/View/UserSessionListItemViewDataFactory.swift 83.33% <0.00%> (-9.21%) ⬇️
...es/UserSessions/Common/View/DeviceAvatarView.swift 42.85% <0.00%> (-7.15%) ⬇️
... and 58 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@gileluard gileluard requested a review from ismailgulek October 25, 2022 07:55
Copy link
Contributor

@ismailgulek ismailgulek left a comment

Choose a reason for hiding this comment

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

Some inline comments, otherwise lgtm

MXKRoomBubbleCellData *cellData = [self cellDataOfEventWithEventId:eventId];
if (cellData)
{
NSString *threadId = readThreadIds[i] == [NSNull null] ? kMXEventTimelineMain : readThreadIds[i];
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
Contributor Author

@gileluard gileluard Nov 1, 2022

Choose a reason for hiding this comment

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

Unthreaded RRs must be propagated to all threads. I've made the needed changes.

@@ -68,7 +68,7 @@ final class ThreadsCoordinator: NSObject, ThreadsCoordinatorProtocol {
// Detect when view controller has been dismissed by gesture when presented modally (not in full screen).
self.navigationRouter.toPresentable().presentationController?.delegate = self

guard parameters.threadId == nil else {
guard parameters.threadId != nil else {
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't remember what this was doing but can you explain this change a bit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the guard as we need the pop completion block to be triggered for all cases. RoomViewControllers where not released when popped and RR where still sent even if the messages were not read.

@gileluard gileluard marked this pull request as ready for review November 1, 2022 21:50
@gileluard gileluard requested a review from ismailgulek November 2, 2022 08:35
Copy link
Contributor

@ismailgulek ismailgulek left a comment

Choose a reason for hiding this comment

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

Some inline comments, otherwise lgtm

Riot/Modules/Room/DataSources/ThreadDataSource.swift Outdated Show resolved Hide resolved
Riot/Modules/MatrixKit/Models/Room/MXKRoomDataSource.m Outdated Show resolved Hide resolved
@gileluard gileluard requested a review from ismailgulek November 2, 2022 14:24
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 4, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@gileluard gileluard merged commit 430473a into develop Nov 4, 2022
@gileluard gileluard deleted the gil/6663-MSC3771_read_receipts_for_threads branch November 4, 2022 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement MSC3771 (read receipts for threads)
2 participants