Commit Graph

623 Commits

Author SHA1 Message Date
Sebastian Kürten 4496df723a Add checkstyle configuration and apply to all modules 2022-08-22 11:37:48 +02:00
Torsten Grote bcc7a4b93b Merge branch '2352-do-not-create-files-for-upload-while-connected' into 'master'
Don't create files for upload while directly connected to contact

Closes #2352

See merge request briar/briar!1697
2022-08-16 14:28:07 +00:00
Torsten Grote 4fe9fa3315 Merge branch '2228-mailbox-client-manager' into 'master'
Add mailbox client manager

Closes #2228

See merge request briar/briar!1696
2022-08-16 14:20:42 +00:00
akwizgran 079ef5b3c0 Add helper method for checking client/server compatibility. 2022-08-16 15:11:53 +01:00
akwizgran de76986ee4 Rename event, only broadcast it when adding a new contact. 2022-08-16 15:06:38 +01:00
akwizgran 0af371d026 Update comments. 2022-08-16 14:14:14 +01:00
akwizgran a57c784b47 Add comments for group visibility. 2022-08-16 14:06:12 +01:00
akwizgran 9990fb3b8f When our mailbox's API versions change, send them to contacts. 2022-08-12 16:38:15 +01:00
akwizgran a1f25c8101 Attach group visibility to MessageSharedEvent.
This allows listeners to decide whether to act on the event.
2022-08-10 12:33:53 +01:00
akwizgran 46352f664c Add mailbox client manager. 2022-08-05 14:16:15 +01:00
akwizgran 7a6d075984 Don't repeatedly ack the same messages. 2022-08-04 15:51:44 +01:00
akwizgran 16fc4f4527 Allow read-only transaction when not marking message as sent. 2022-08-03 17:57:35 +01:00
akwizgran 8657216345 Broadcast an event when sending a mailbox update. 2022-08-03 17:57:35 +01:00
akwizgran 42e2926d61 Always sort lists of API versions for easier comparison. 2022-08-03 17:57:35 +01:00
akwizgran 1699d6b5f8 Check properties of events. 2022-08-02 15:24:20 +01:00
akwizgran 848872a803 Broadcast events for pairing and unpairing. 2022-08-02 12:59:27 +01:00
akwizgran 04ed3a652a Pass mailbox properties to hook when pairing. 2022-08-02 12:59:27 +01:00
akwizgran d20457f338 Remove redundant method for recording successful connection. 2022-08-02 12:59:26 +01:00
akwizgran 0ae5361281 Merge branch '1777-lifecycle-manager' into 'master'
Allow process to exit if an exception is thrown during shutdown

Closes #1777

See merge request briar/briar!1668
2022-06-29 14:23:16 +00:00
Sebastian Kürten 4bca9decc1 Let StringUtils throw FormatException instead of IllegalArgumentException 2022-06-29 14:13:42 +02:00
akwizgran feb8854678 Add @Inject constructor. 2022-06-23 14:22:25 +01:00
akwizgran d82509f3ce Address review feedback. 2022-06-23 11:00:13 +01:00
Torsten Grote 54e434d812 Merge branch '2291-mailbox-upload-worker' into 'master'
Mailbox upload worker

Closes #2291

See merge request briar/briar!1673
2022-06-20 11:39:44 +00:00
Torsten Grote 7f987667fe Merge branch '2336-get-next-send-time' into 'master'
Consider latency when getting next send time from DB

Closes #2336

See merge request briar/briar!1671
2022-06-17 13:14:38 +00:00
Torsten Grote 43d28608f5 Merge branch '2291-mailbox-upload-plumbing' into 'master'
Plumbing for mailbox upload worker

See merge request briar/briar!1670
2022-06-17 13:07:22 +00:00
akwizgran a2fb388aa6 Add creation of files for upload by MailboxFileManager. 2022-06-16 18:11:52 +01:00
akwizgran e2a63ee361 Consider latency when getting next send time from DB. 2022-06-16 17:05:30 +01:00
akwizgran ff9f706670 Add plumbing for creating outgoing sync sessions. 2022-06-16 15:51:16 +01:00
akwizgran 10ab60569b Replace DeferredSendHandler with OutgoingSessionRecord. 2022-06-16 15:51:15 +01:00
akwizgran d77d1d67aa Include new visibility in GroupVisibilityUpdatedEvent. 2022-06-16 15:51:15 +01:00
akwizgran 924425522a Split containsAnythingToSend() into methods for acks and messages. 2022-06-16 15:51:15 +01:00
akwizgran 356e0ee07b Move MAX_LATENCY to MailboxConstants. 2022-06-16 15:51:15 +01:00
Torsten Grote 1c6fb6491a Use /versions for mailbox connectivity check
Briar's mailbox status screen used the status API endpoint for its connectivity check. Now, it uses the versions endpoint instead, so that if we've warned the user that Briar and the Mailbox are using incompatible API versions, and the user has upgraded one of the apps to fix the issue, the user can use the "check connection" button in the status screen to check that the issue has been fixed.

(This is specifically needed for the case where the user has upgraded the Mailbox, because in the case where the user has upgraded Briar, Briar should automatically check the mailbox's API versions when it comes back online after upgrading.)
2022-06-13 10:07:40 -03:00
akwizgran de3a87fff5 Return early when starting/stopping if not in expected state. 2022-06-09 18:01:32 +01:00
akwizgran 2201585a34 Skip HyperSQL tests if the test environment has crypto restrictions. 2022-06-07 11:11:41 +01:00
Torsten Grote 08bf13e44f Move check for common mailbox versions into a helper method
and use this in the UI for knowing which app needs to be updated.
2022-06-06 11:04:55 -03:00
Torsten Grote 0f4aa8027a Include mailbox server versions in MailboxStatus
so we know if the mailbox is incompatible with Briar
2022-06-06 11:00:04 -03:00
akwizgran b128220be3 Add MailboxFileManager for downloads (uploads to be added later). 2022-06-03 17:55:19 +01:00
akwizgran 6aa24af94c Add ConnectionManager method for incoming mailbox connections. 2022-06-03 17:13:20 +01:00
akwizgran de63a50662 Add mailbox plugin. 2022-06-03 17:13:20 +01:00
Torsten Grote 971dbf5df2 Merge branch '2229-mailbox-client' into 'master'
Add connectivity check tasks, refactor mailbox properties

See merge request briar/briar!1650
2022-05-31 12:45:27 +00:00
akwizgran 3ebbb2a8cf Merge branch '2175-mailbox-problem-notification' into 'master'
Show notification warning when own mailbox is unreachable

Closes #2175

See merge request briar/briar!1648
2022-05-26 20:10:13 +00:00
Torsten Grote 54339afab8 Factor mailbox problem detection into MailboxStatus and constants 2022-05-26 14:07:06 -03:00
akwizgran 94ce6bbb2c Reject mailbox owner properties for mailbox update. 2022-05-26 14:49:33 +01:00
akwizgran 845d505d2b Merge branch '2320-mailbox-metadata-format-exception' into 'master'
Bump major version of mailbox update client to avoid startup failure

Closes #2320

See merge request briar/briar!1647
2022-05-26 12:45:55 +00:00
akwizgran ef6e3bb2a7 Refactor MailboxProperties and MailboxUpdateWithMailbox. 2022-05-26 13:40:31 +01:00
akwizgran 8ec998f645 Replace Supplier<Boolean> with more legible ApiCall interface. 2022-05-26 13:40:31 +01:00
akwizgran 274963d9d1 Add MailboxApiCaller for calling API endpoints with retries. 2022-05-24 15:10:07 +01:00
akwizgran 18b3865a86 Factor out Cancellable interface from TaskScheduler. 2022-05-24 15:10:07 +01:00
akwizgran f08688708a Bump client major version to ensure group metadata gets created. 2022-05-23 16:12:23 +01:00