Commit Graph

377 Commits

Author SHA1 Message Date
Torsten Grote
c3a14d9275 Add a new event that is broadcasted when a contact is verified
Also, don't support unverifying contacts.
2016-08-19 12:41:10 -03:00
Torsten Grote
e690bcb3cc Add introduced contacts as UNVERIFIED
Closes #580
2016-08-19 12:31:00 -03:00
Torsten Grote
caee7fe61b Validate New Messages for Reblogging and Comments of Blog Posts
Also includes unit tests for the new message types.

Closes #591
2016-08-15 14:28:17 -03:00
Torsten Grote
71196e3494 Let clients decide whether to share messages or not 2016-08-11 12:19:10 -03:00
akwizgran
44d13ef28e Merge branch '579-unsubscribe-from-shared-blogs' into 'master'
Allow unsubscribing from shared blogs

Only personal blogs from non-contacts can be removed.
This also adds integration tests that check the conditions under which blogs can actually be removed.

Closes #579

See merge request !268
2016-08-05 17:36:36 +00:00
Torsten Grote
1ec56fa3ef Allow unsubscribing from shared blogs
Only personal blogs from non-contacts can be removed.
This also adds integration tests that check if blogs can actually be removed.

Closes #579
2016-08-05 14:08:09 -03:00
Torsten Grote
17db03d40a Return proper Invitation objects in SharingManager
Fixes #470
2016-08-05 13:07:16 -03:00
Torsten Grote
a69a4028b0 Fix Blog Sharing Backend and Add Blog Sharing Integration Tests 2016-08-03 13:01:24 -03:00
Torsten Grote
a552d1b6a6 Show blog invitation requests and responses in private conversation 2016-08-03 13:01:24 -03:00
Torsten Grote
6454acdaa5 Post new RSS entries into the user's personal blog
Closes #486
2016-08-02 20:02:40 -03:00
Torsten Grote
8d1a26ba72 Keep track of which RSS entries have been seen
This is done by remembering the time of the latest entry.
All entries newer than that are considered new and will be posted.

Closes #485
2016-08-02 19:19:48 -03:00
Torsten Grote
e527e30712 Implement background task for fetching RSS feeds
* Implemented in briar-core as a `ScheduledExecutorService`
  that gets started when the app starts
* The briar-api has a `FeedManager` interface
  that the UI can use to register and unregister feeds
* In this first iteration, feeds are fetched via HTTP(S), not Tor

Closes #484
2016-08-02 19:18:55 -03:00
Torsten Grote
64b596d0f9 Show Responses to Forum Invitations in Private Conversation
Closes #472
2016-08-01 12:13:51 +01:00
akwizgran
32578e2cab Merge branch '535-formatexception-when-loading-contact-list-after-receiving-invitation' into 'master'
Use Client Layer Events in ContactListFragment

This prevents trying to access the same group metadata in different groups.
Also, the conversation does not need to be reloaded once introduction messages arrive.

Closes #535

See merge request !254
2016-08-01 10:21:31 +00:00
Torsten Grote
bdb876552d Allow Validator to access metadata for pending messages
Database queries for metadata only returned it for messages that were delivered already.
However, there are cases (e.g. a pending message needs to be delivered) where
the validator needs to retrieve the metadata from the database.

For these cases, a special database query has been introduced.
2016-07-29 15:17:18 -03:00
Torsten Grote
e1bdede4f5 Introduce client layer events for forums
The forum UI depended on sync layer events such as MessageStateChangedEvent.
Now, the forum client broadcasts its own high-level event (`ForumPostReceivedEvent`)
with the information the UI needs (`ForumPostHeader`).

Closes #310
2016-07-29 15:16:52 -03:00
Torsten Grote
3d22d43868 Use Client Layer Events in ContactListFragment
This prevents trying to access the same group metadata in different groups.
Also, the conversation does not need to be reloaded once introduction messages arrive.

Closes #535
2016-07-28 14:30:18 -03:00
str4d
ddbac36913 Merge branch '410-my-blogs-tab-with-option-to-add-new-blogs' into 'master'
Micro Blogs UI

**Attention:** This MR includes several other commits which are supposed to end up in separate MRs. I suggest that you review **per commit**. Once the first two commits have green light, I can split out the other commits into other MRs. This way I don't have to work myself through a long rebase chain every time I make a change to the bottom MR.

This MR is full of commits that introduce features that we will not be using initially. The last commit implements the Micro Blogs UI on top of the framework the first commits establish and hides/disables all future features for now.

I suggest we merge this as is and clean things up later when we have a clearer idea what features we will be doing eventually.

![device-2016-06-23-135016](/uploads/600fc7c28c0c6c4a60d8273ffb55f30a/device-2016-06-23-135016.png)
![device-2016-06-22-181934](/uploads/e57cfbc162150bcd01d4683d4164406e/device-2016-06-22-181934.png)
![device-2016-06-23-142422](/uploads/5814f1e13b6d2230f2e4c12a8c5cd599/device-2016-06-23-142422.png)
![device-2016-06-23-142506](/uploads/d3ac268082b98bbcd068f3d6fe0c6712/device-2016-06-23-142506.png)
![device-2016-06-22-181913](/uploads/f5dcc1ed9a40ec5fa8f634864903f4cc/device-2016-06-22-181913.png)

Closes #436 

See merge request !214
2016-07-17 03:35:36 +00:00
Torsten Grote
c577efacbe Show all Forum Invitations, not only the first 2016-07-07 14:48:28 -03:00
Torsten Grote
fd7278b488 Combined Blog Feed
This commit addes a combined blog feed that shows all posts of all
subscribed blogs in the order the blog posts have been received.

For now, this commit also hides other blog functionality like adding
additional blogs and browsing individual blogs.

Closes #417
2016-07-04 14:37:23 -03:00
Torsten Grote
91aa81041e Store and expose time a blog post was received
This is useful when sorting blog posts in the combined feed. It ensures
you do not miss older posts that were just synced to you.
2016-06-23 11:58:25 -03:00
Torsten Grote
a8f51fcb8a Backend for Automatic Personal Blogs
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
2016-06-23 11:58:25 -03:00
Torsten Grote
30fe9f6e2a Change Blog Paradigm to Short-Form
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.
2016-06-23 10:47:44 -03:00
Torsten Grote
59320f02b7 Remove MAX_GROUP_DESCRIPTOR_LENGTH
Closes #441
2016-06-22 11:47:38 -03:00
str4d
13e3eec6b3 Implement BlogSharingManager 2016-06-18 19:02:52 +12:00
str4d
9ae64124d3 Factor out generic sharing code from ForumSharingManger 2016-06-18 19:02:48 +12:00
Torsten Grote
da68ef78f1 Blog Client with Factory and Validator
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 #402
Closes #404
2016-06-15 11:16:28 -03:00
Torsten Grote
b26acdf228 Introduce a PrivateMessageReceivedEvent and use it in the Android app 2016-06-08 10:31:26 -03:00
Torsten Grote
b03d0a206b Add Message Dependencies to Database
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.
2016-05-26 13:49:03 -03:00
Ernir Erlingsson
d2ba7c9b7f generic sorted message tree 2016-05-25 22:12:20 +02:00
Ernir Erlingsson
21b237a629 ForumManager: Added parent id to metadata and a unit test 2016-05-24 15:12:37 -03:00
str4d
0d16dd0358 Merge branch '382-message-dependencies' into 'master'
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
2016-05-20 02:49:04 +00:00
Torsten Grote
3f2b85ac0d Introduce a MessageContext class for more flexibility
This change will allow to pass message dependencies from the client
validators to the ValidationManager.
2016-05-20 02:46:37 +00:00
Torsten Grote
b13bf66165 Add a new activity that shows sharing status of forum
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
2016-05-19 11:42:05 -03:00
Torsten Grote
38a4f73cdc Handle invitations to the same forum by multiple contacts
Closes #391
2016-05-19 11:34:28 -03:00
Torsten Grote
bd01c3732e Also use dedicated classes to represent messages instead of BdfDictionary 2016-05-19 11:32:09 -03:00
Torsten Grote
d2722eed92 Turn local session state into its own class instead of BdfDictionary 2016-05-19 11:30:19 -03:00
Torsten Grote
aad9f5142b Extract ForumFactory from ForumManager
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
2016-05-16 16:56:44 -03:00
akwizgran
f2ab0eff53 Simple metadata queries. #222
Added support for retrieving metadata that matches all key/value pairs in a query.
2016-05-12 17:40:11 +01:00
akwizgran
3193b73687 Merge branch 'start-plugins-async' into 'master'
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
2016-05-11 14:46:55 +00:00
akwizgran
3680cad9b8 Merge branch 'poller-refactoring' into 'master'
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
2016-05-11 14:45:50 +00:00
akwizgran
1bd5c0b195 Merge branch 'aggressive-polling' into 'master'
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
2016-05-10 14:47:04 +00:00
akwizgran
86f409d0bf Don't send dev reports until transport is enabled. 2016-05-06 12:14:47 +01:00
akwizgran
5044f34ba9 Moved all automatic connection logic into poller. 2016-05-06 12:11:39 +01:00
akwizgran
ff8301521c Replaced Timer with ScheduledExecutorService. #258 2016-05-06 12:11:34 +01:00
akwizgran
dd9bc74262 Try to reconnect on connection loss. #262 2016-05-06 12:07:56 +01:00
Torsten Grote
9bef114c35 Forum Sharing Client backend
This commit 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 invitiation. Also, the
Forum Sharing Manger is notified when users leave a forum.

Closes #322
2016-05-04 17:02:22 -03:00
Torsten Grote
d42b49afc2 Allow to get a forum from the ForumManager within a transaction 2016-05-04 17:02:22 -03:00
Torsten Grote
9f9a216305 Prepare for new Forum Sharing Client
Methods for creating, adding and removing forums have been moved to the
`ForumManager`. In order to still handle removing forums properly, a
`RemoveForumHook` has been introduced.

Methods for sharing forums with all current and future contacts have
been removed along with the localGroup where this information was saved.

The `ShareForumActivity` now has the proper label.

The `SessionId` and the `ProtocolEngine` have been moved to the
`clients` package.

This addresses part of #322 and part of what has been discussed in #320.
2016-05-03 11:48:45 -03:00
str4d
c44b6a4095 Implement encrypted feedback 2016-04-28 16:44:01 +12:00