Files
matrix-rust-sdk/crates/matrix-sdk-sqlite/src
Ivan Enderlin 81efb7c8b3 chore(sqlite): Add the table_name argument to encode_event_id and encode_room_id.
[As Damir pointed out][0]:

> You are supposed to use the table name as the first argument, this
> will ensure that, if you encode the same room ID in two different
> tables, they won't produce the same hash.
>
> This prevents correlation between tables.
>
> Though, sometimes you will need to have a stable hash between two
> tables.

This patch adds the `table_name` argument to `encode_event_id` and
`encode_room_id`, and explain why `keys::EVENTS` is used for the
`EventId` when necessary.

[0]: 733349d656 (r3587244126)
2026-07-15 17:42:11 +02:00
..