Skip to content

feat(base): Remember when a user accepts an invite #5333

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

Merged
merged 3 commits into from
Jul 7, 2025

Conversation

poljar
Copy link
Contributor

@poljar poljar commented Jul 2, 2025

I think that this is necessary to make #5322 somewhat secure.

Part of #4926.

  • Public API changes documented in changelogs (optional)

@poljar poljar requested a review from a team as a code owner July 2, 2025 11:16
@poljar poljar requested review from stefanceriu and removed request for a team July 2, 2025 11:16
@poljar poljar self-assigned this Jul 2, 2025
@poljar poljar force-pushed the poljar/shared-history/join-timestamp branch from 2b0094c to b5c854a Compare July 2, 2025 11:28
Copy link
Member

@stefanceriu stefanceriu left a comment

Choose a reason for hiding this comment

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

Makes sense to me 👍

Comment on lines 471 to 472
/// This is useful to remember if the user accepted this a join on using
/// this specific client.
Copy link
Member

Choose a reason for hiding this comment

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

Something's off here, needs rewording I reckon.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just a leftover from the previous version of this sentence.

///
/// This is useful to remember if the user accepted this a join on using
/// this specific client.
pub(crate) invite_accepted_at: Option<MilliSecondsSinceUnixEpoch>,
Copy link
Member

Choose a reason for hiding this comment

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

I never do know how these work: does it need a serde default or some special migration to not break old instances?

Copy link
Contributor Author

@poljar poljar Jul 2, 2025

Choose a reason for hiding this comment

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

No: https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=dfb0cddf843b3f7eb2bda51fe094b5e1

A missing field or a null are treated the same if Option is used. I guess we could add a skip_serializing here since this field will in most cases be None.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link

codecov bot commented Jul 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.75%. Comparing base (be3af5e) to head (6967214).
Report is 45 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5333   +/-   ##
=======================================
  Coverage   88.74%   88.75%           
=======================================
  Files         333      333           
  Lines       90157    90197   +40     
  Branches    90157    90197   +40     
=======================================
+ Hits        80010    80050   +40     
- Misses       6321     6322    +1     
+ Partials     3826     3825    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@poljar poljar force-pushed the poljar/shared-history/join-timestamp branch from d877ecb to 032b8a7 Compare July 2, 2025 12:15
@poljar poljar merged commit ec112ca into main Jul 7, 2025
45 checks passed
@poljar poljar deleted the poljar/shared-history/join-timestamp branch July 7, 2025 10:36
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