Skip to content

Conversation

mpretty-cyro
Copy link
Collaborator

@mpretty-cyro mpretty-cyro commented Jun 13, 2025

Adds blinded contact records to Contacts and ConvoInfoVolatile to simplify syncing them between devices and allow libSession to construct the full conversation list

Note: This is based on #51

@mpretty-cyro mpretty-cyro requested a review from jagerman June 13, 2025 06:26
@mpretty-cyro mpretty-cyro self-assigned this Jun 13, 2025
@mpretty-cyro mpretty-cyro force-pushed the feature/blinded-contacts branch from 470d8ad to 47c5164 Compare June 25, 2025 23:04
@mpretty-cyro mpretty-cyro requested a review from jagerman July 17, 2025 05:14
@jagerman jagerman force-pushed the feature/blinded-contacts branch from 0e68cb0 to e883776 Compare July 28, 2025 20:10
@jagerman
Copy link
Member

Rebased on top of #54 with an update applied to use the same type-safe timestamp.

@jagerman jagerman mentioned this pull request Jul 28, 2025
mpretty-cyro and others added 13 commits July 28, 2025 18:40
This uses std::chrono::sys_seconds for the new profile_updated timestamp
field, so that we can avoid the unfortunate bug that happened in earlier
releases where some clients violated the documented restrictions and
passed milliseconds or microseconds: sys_seconds is absolutely
unambiguous as to what it holds and makes such an error virtually
impossible.

- Adds `session::to_sys_seconds(int)` that can get a proper sys_seconds
  from a maybe-s, ms, or µs value by guessing based on the magnitude.

- Add methods for getting/setting sys_seconds timestamps from/into
  configs.
There are a lot of internal calls such as `maybe_int(c,
"key").value_or(0)` and `maybe_string(c, "key").value_or("")`.  This
makes it them slightly less cumbersome by adding `int_or_0` and
`string_or_empty` functions that handle the fallback-to-0/empty
automatically.
@jagerman jagerman force-pushed the feature/blinded-contacts branch from e883776 to 0bcc986 Compare July 28, 2025 21:40
@mpretty-cyro mpretty-cyro enabled auto-merge July 28, 2025 22:13
@mpretty-cyro mpretty-cyro merged commit 1c16029 into session-foundation:dev Jul 28, 2025
1 check passed
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