mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 02:39:05 +01:00
661140f62394eabd1c05db91aa0cf2e5aacf147a
Message Dependencies This MR adds a new table to the database to hold message dependencies. It introduces two more message states (pending and delivered) and completely changes the validation and message delivery logic. Since this is a **very invasive** change, please **review carefully**. It is better to catch issues now than having to debug things later. If you notice an area without tests, please let me know. I tried to have tests for all changes. Unfortunately, this MR turned out rather large, but most of it are actually tests and you can review one commit after the other without needing to see the full changelog. In order to reflect the new states, things that were previously true for `VALID` messages have been changed to now be true for `DELIVERED` messages. This might have changed the semantics in some places and can have unindented side-effects. The `DatabaseComponent` was extended with methods for: * adding dependencies * getting dependencies and states of a message * getting messages that depend on a message (dependents) and their states * getting messages to be delivered (by startup hook) * getting pending messages to be possibly delivered (by startup hook) The `valid` column in the database was renamed to `state` along with the associated methods to better reflect its new extended meaning. Since pending messages should not be available to clients, many database queries have been modified to only return results for delivered messages. I might have missed some. Please check carefully. Also you might want to think about how you could create arbitrarily large transactions by sending malicious messages. Please note that the database version was bumped in this MR. Closes #382 See merge request !198
Briar is a messaging app designed for activists, journalists, and anyone else who needs a safe, easy and robust way to communicate. Unlike traditional messaging tools such as email, Twitter or Telegram, Briar doesn't rely on a central server - messages are synchronized directly between the users' devices. If the Internet's down, Briar can sync via Bluetooth or Wi-Fi, keeping the information flowing in a crisis. If the Internet's up, Briar can sync via the Tor network, protecting users and their relationships from surveillance.
Description
Languages
Java
97.9%
Kotlin
1.9%