Deduplicate contact exchange protocol
`ContactExchangeTask` was originally extracted from the Bluetooth invitation task; this completes the refactoring.
Closes#365.
See merge request !199
When a contact is added, her personal blog will also be added automatically.
Also, when a new identity is added, a personal blog for that identity is created.
Part of #436
Removes teaser and makes body mandatory.
It also adds support for deleting blogs and
introduces a getAuthorStatus() method to the IdentityManager
that takes a running transaction.
This implements a simple initial blog client that covers the basic blog
actions, but no deletion/removal of blogs, yet.
Classes for Blogs and Blog Post Headers have been introduced along with
the associated factories.
A `BlogPostValidator` has been added that validates incoming blog posts.
Closes#402Closes#404
that handles message dependencies reported from clients.
The MessageValidatedEvent has been renamed into a MessageDeliveredEvent
since there were no real use cases for the former any more.
This adds a new table to the database to hold message dependencies.
It introduces two more message states: pending and delivered
The valid column in the database was renamed to state to better reflect
its new extended meaning.
The DatabaseComponent was extended with three methods for:
* adding dependencies
* getting dependencies of a message
* getting messages that depend on a message (dependents)
* getting messages to be delivered (by startup hook)
* getting pending messages to be possibly delivered (by startup hook)
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.
Since pending messages should not be available to clients, many database
queries have been modified to only return results for delivered
messages.
All added methods and changes should come with updated unit tests.
Please note that the database version was bumped in this commit.
Introduce a MessageContext class to be used by all validators
This change will allow to pass message dependencies from the client validators to the `ValidationManager`.
Please see my thoughts in #382 for more details.
See merge request !197
The new activity shows who you are sharing a forum with and who shares a
forum with you. It is accessible from the overflow menu when in a forum.
Closes#398
The code for creating forums in ForumManager was used by
ForumSharingManager and also needed by InviteeEngine.
This extracts it into its own class.
Closes#375
Clean up Introduction Session States
...for introducer when both introducees have been deleted.
It can't be deleted when only one introducee is removed, because then all messages in the private conversation with the other introducee will disappear, because their corresponding session state can't be found anymore.
Closes#372
See merge request !189
Start plugins asynchronously
This prevents other services from getting stuck behind the plugin manager while the Tor plugin is starting, which takes several seconds. The plugin manager waits for each plugin to start before stopping it.
I've also added some canaries to plugins and services to ensure instances aren't started more than once.
See merge request !181
Poller refactoring, replace Timer with ScheduledExecutorService
* Replace Timer with ScheduledExecutorService (closes#258)
* Move automatic connection logic from PluginManager to Poller
* Reschedule polling when connections are opened or closed, making the poller more responsive to reductions in the polling interval
See merge request !180
Try harder to connect to contacts
* When an outgoing connection is lost, try to reconnect to the contact straight away
* Use periodic polling for Tor, regardless of whether our hidden service descriptor has been published
* Reduce polling intervals for all plugins (this can be reverted if we solve the connectivity issues)
Closes#262, #314. Hopefully helps with #361.
See merge request !177
Forum Sharing Client Backend
This MR replaces the old `ForumSharingManagerImpl` with a new one
which is based on state machines and the `ProtocolEngine`.
There is a `SharerEngine` and a `InviteeEngine` that take care of state
transitions, messages, events and trigger actions to be carried out by
the `ForumSharingManagerImpl`. This is all very similar to the
Introduction Client.
The general sharing paradigm has been changed from sharing as a state to
sharing as an action. Now the UI can allow users to invite contacts to
forums. The contacts can accept or decline the invitation. Also, the
Forum Sharing Manager is notified when users leave a forum.
Please note that you will need the UI to actually test this. It is coming up soon in another MR.
Closes#322
See merge request !170
This allows the lifecycle manager to continue starting other services while plugins are starting, and allows the plugin manager to stop each plugin as soon as it has started.