Commit Graph

35 Commits

Author SHA1 Message Date
Torsten Grote
a69a4028b0 Fix Blog Sharing Backend and Add Blog Sharing Integration Tests 2016-08-03 13:01:24 -03:00
Torsten Grote
64b596d0f9 Show Responses to Forum Invitations in Private Conversation
Closes #472
2016-08-01 12:13:51 +01:00
Torsten Grote
c577efacbe Show all Forum Invitations, not only the first 2016-07-07 14:48:28 -03:00
Torsten Grote
fa5304c145 Add tests to ensure Forum Posts are synchronized both ways
even after re-sharing an existing forum.
2016-07-07 14:48:06 -03:00
Torsten Grote
f7965edc71 Add Blog Manager Integration Test 2016-06-28 14:43:55 -03:00
Torsten Grote
59320f02b7 Remove MAX_GROUP_DESCRIPTOR_LENGTH
Closes #441
2016-06-22 11:47:38 -03:00
str4d
9ae64124d3 Factor out generic sharing code from ForumSharingManger 2016-06-18 19:02:48 +12:00
Torsten Grote
4acb59b22a Address Race-Condition when Two Contacts Share Same Forum
with each other at the same time.

Closes #388
2016-06-02 14:02:32 -03:00
str4d
7ac7fae30e Update comments 2016-05-28 00:16:24 +00:00
Torsten Grote
d3b83a50a6 Let the ForumValidator return parent posts as dependency
and add integration tests that make sure that dependencies are handled
properly.
2016-05-26 13:49:59 -03:00
Torsten Grote
5561532c5d Implement new message validation logic
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.
2016-05-26 13:49:59 -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
21b237a629 ForumManager: Added parent id to metadata and a unit test 2016-05-24 15:12:37 -03: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
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
Torsten Grote
db4b79fcae Clean up Introduction Session States
for introducer when both introducees have been deleted.

Closes #372
2016-05-12 18:21:18 -03:00
akwizgran
8ceaabddf4 Fixed dependencies of ForumSharingIntegrationTest. 2016-05-11 17:23:53 +01: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
d4abfe77a1 Merge branch '339-forum-sharing-integration-tests' into 'master'
Forum Sharing Integration Tests

This adds integration tests for these cases:
* normal invitation session where invitee accepts
* normal invitation session where invitee declines
* session where invitee leaves again after she joined
* session where sharer leaves after invitee has joined
* session where sharer leaves before invitee can respond
* sharer reuses the session ID of the previous session
* after accepting the invitation, the invitee invites the sharer to the same forum
* after session contacts delete each other and session states get cleaned up

Closes #339

See merge request !173
2016-05-10 14:46:02 +00:00
akwizgran
ff8301521c Replaced Timer with ScheduledExecutorService. #258 2016-05-06 12:11:34 +01:00
Torsten Grote
685e1422a5 Do not allow session ID reuse and clean up sessions for introducee
It was possible that a malicious introducer sends new request with the
same session ID that was used previously and thus causing introducees to
have multiple states for the same session ID.
This commits prevents that from happening and adds an integration test
for that scenario.

Also if an introducee removes an introducer, all past session states
will be deleted from the database. For this, a test was added as well.

Closes #371
Closes #372
2016-05-04 20:39:22 -03:00
Torsten Grote
49c9af27b9 Forum Sharing Integration Tests
This adds integration tests for these cases:
* normal invitation session where invitee accepts
* normal invitation session where invitee declines
* session where invitee leaves again after she joined
* session where sharer leaves after invitee has joined
* session where sharer leaves before invitee can respond
* sharer reuses the session ID of the previous session
* after accepting the invitation, the invitee invites the sharer to the same forum
* after session contacts delete each other and session states get cleaned up

Closes #339
2016-05-04 17:04:42 -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
akwizgran
e9f77ecd37 Use assertEquals() for more informative failure messages. 2016-04-25 17:05:22 +01:00
Torsten Grote
11e6d64e4d Show relevant decline responses in the conversation
* If the user has already declined, we don't show that the other
  introducee has declined as well. The backend doesn't have that information, so
  this is compatible with the principle of showing what we know.
* If the user has already accepted or hasn't yet responded, we show the
  decline response in the private conversation with the introducer. If
  the user hasn't yet responded, we hide the accept/decline buttons
  in the introduction request message.

Messages an introducee receives in a `FINISHED` state are now being
ignored and deleted.

Closes #295
2016-04-21 11:08:15 -03:00
akwizgran
5457588dbd Placeholder test was causing tests to fail in AS 2.0. 2016-04-21 12:20:26 +01:00
Torsten Grote
36ef536e82 Integration Tests for Introduction Client
* normal session where both introducees accept
* normal session where the first introducee declines
* normal session where the second introducee declines
* one session where a contact is introduced to herself
* one session where two identities of the same contact
  are introduced to each other

This introduces a new IntroductionAbortedEvent to signal when the
protocol was aborted. It is not yet used in the UI.

It closes #276
2016-04-20 11:35:51 -03:00
akwizgran
205dc66572 Test cleanup. #280 2016-04-05 14:19:10 +01:00
akwizgran
9714713d73 Add transports to DB during startup. #269 2016-03-28 13:47:23 +01:00
Ernir Erlingsson
10764d727b rebased with master 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
5aba1d79f1 Fixes after comments, also removed the CryptoComoponent from the IdentIcons 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
95d89553d5 merged with master 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
25324697ac cleanup and added missing desktop modules 2016-03-14 21:01:21 +01:00
Ernir Erlingsson
1be400eb84 Switched Roboguice/Guice out for Dagger 2 2016-03-14 21:01:21 +01:00