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

Add poll start/end read receipts (PSB-183) #1633

Merged
merged 3 commits into from
Nov 14, 2022

Conversation

alfogrillo
Copy link
Contributor

This PR adds the sending of read receipts for the following event types:

  • org.matrix.msc3381.poll.start
  • org.matrix.msc3381.poll.end
  • m.poll.start
  • m.poll.end

@alfogrillo alfogrillo requested review from a team and paleksandrs and removed request for a team November 11, 2022 15:25
@codecov
Copy link

codecov bot commented Nov 11, 2022

Codecov Report

Base: 36.22% // Head: 16.02% // Decreases project coverage by -20.19% ⚠️

Coverage data is based on head (2a6a1dc) compared to base (3fea0a8).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #1633       +/-   ##
============================================
- Coverage    36.22%   16.02%   -20.20%     
============================================
  Files          582      583        +1     
  Lines        92408    92557      +149     
  Branches     40165    39036     -1129     
============================================
- Hits         33471    14830    -18641     
- Misses       57935    77242    +19307     
+ Partials      1002      485      -517     
Impacted Files Coverage Δ
MatrixSDK/MXSession.m 8.36% <100.00%> (-31.55%) ⬇️
MatrixSDKTests/MatrixSDKTestsData.h 0.00% <0.00%> (-100.00%) ⬇️
MatrixSDK/Crypto/Data/MXOlmSession.m 0.00% <0.00%> (-100.00%) ⬇️
MatrixSDK/Utils/MXDateProvider.swift 0.00% <0.00%> (-100.00%) ⬇️
MatrixSDK/Crypto/Utils/MXCryptoTools.m 0.00% <0.00%> (-100.00%) ⬇️
MatrixSDK/Crypto/Devices/MXDeviceList.h 0.00% <0.00%> (-100.00%) ⬇️
MatrixSDK/Crypto/Data/MXOlmSessionResult.m 0.00% <0.00%> (-100.00%) ⬇️
MatrixSDK/Crypto/Migration/MXCryptoVersion.h 0.00% <0.00%> (-100.00%) ⬇️
MatrixSDK/JSONModels/Sync/Room/MXRoomSyncState.m 0.00% <0.00%> (-100.00%) ⬇️
MatrixSDK/JSONModels/Sync/MXPresenceSyncResponse.m 0.00% <0.00%> (-100.00%) ⬇️
... and 182 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.

kMXEventTypeStringPollStart,
kMXEventTypeStringPollEnd,
// unstable event types
kMXEventTypeStringPollStartMSC3381,
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it would be a good idea to add "Unstable" to the constant name instead of using a comment? E.g.
kMXEventTypeStringPollStartMSC3381Unstable and kMXEventTypeStringPollEndMSC3381Unstable. I am usually against comments in general because you have to maintain them, better to explain yourself with the code.

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 don't think is a good idea: having constants ending for MSCxywz is already an hint about the event type being unstable.
The reason for the comment is to try to make people to group all the unstable event type together so that it would be easier to delete them when we'll need to do it.
I don't mind to delete the comment if you think isn't very helpful btw.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK. I would remove the comment then, but it is up to you

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 agree we can live without it.
Removed here -> 2a6a1dc

@alfogrillo alfogrillo merged commit 2c92512 into develop Nov 14, 2022
@alfogrillo alfogrillo deleted the alfogrillo/poll_receipts branch November 14, 2022 10:28
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.

2 participants