Commit Graph

18 Commits

Author SHA1 Message Date
Kai S. K. Engelbart dcf1b0c58d
Send Pending Messages After Successful Handshake (#111)
Instead of caching pending messages during the handshake and relaying
them afterwards, they are now sent after the handshake has been
completed.

This is possible because the relevant processors (messages and status
changes) are now event handlers which are registered at the event bus,
which means that they can immediately react to pending messages even if
Client#initReceiver has not been fully executed yet.

Because Client#initReceiver exists for that very reason, it is no
longer necessary anymore. ID generator initialization, which was its other part,
is now directly handled in Startup#performHandshake, which is a far more
sensible placement.

Fixes #106

Reviewed-on: https://git.kske.dev/zdm/envoy/pulls/111
Reviewed-by: DieGurke <maxi@kske.dev>
2020-12-02 21:21:00 +01:00
Leon Hofmeister 7a883861be
Apply suggestions by @kske 2020-10-30 12:07:56 +01:00
Leon Hofmeister d4c7813c97
Fix unnecessary authentication token being sent in requests 2020-10-23 18:45:40 +02:00
Leon Hofmeister 44d3082958
Fix bug allowing unauthorized access to a client
Additionally token authentication is now used whenever the client is
online
2020-10-22 23:05:51 +02:00
Leon Hofmeister b2c3cf62c8
Reformat all source files with new formatter 2020-10-19 18:17:51 +02:00
Leon Hofmeister 571a953c40
Add partially working blocking and deletion (for both client and server)
Additionally had to refactor several classes "a little bit".
(Whenever one bug seemed fixed, another one appeared...)
2020-10-19 18:09:19 +02:00
Leon Hofmeister a515ec961a
Add server side contact deletion 2020-10-19 18:09:19 +02:00
Leon Hofmeister 637ad9f61f
Added ability to change user status 2020-10-07 23:43:30 +02:00
Maximilian P. Käfer 829e94fa5f Fixed Bug Regarding Incorrect Pending MessageStatuses in LoginCredentialsProcessor (#61)
Merge branch 'develop' into b/fixing_message_bugs

fixed not receiving pending messageStatus bug

Co-authored-by: delvh <leon@kske.dev>
Reviewed-on: https://git.kske.dev/zdm/envoy/pulls/61
Reviewed-by: kske <kai@kske.dev>
Reviewed-by: delvh <leon@kske.dev>
2020-09-27 15:55:59 +02:00
Kai S. K. Engelbart 8eb7743057
Remove Javadoc header from all source files
Also removed SendEvent and simplified some other calls.
2020-09-25 14:29:23 +02:00
Kai S. K. Engelbart 3e594c1fbd
Handle handshake rejections on invalid token, reuse not expired tokens 2020-09-19 13:33:18 +02:00
Kai S. K. Engelbart f21d077522
Add token-based authentication (without rejection handling) 2020-09-19 11:37:42 +02:00
Kai S. K. Engelbart 63f42ab8d9 Remove ObjectProcessor#getInputClass
Replace an explicit input class declaration with nasty reflection code.
2020-07-25 17:34:19 +02:00
Kai S. K. Engelbart 47ab5d1e0c Fix unread message counter
A bug remains when the total status of a group message is SENT, but the
individual status for the client user is RECEIVED. In this case, the
counter should be incremented but isn't.
2020-07-17 00:27:00 +02:00
Kai S. K. Engelbart afcf1e48a4 Remove filter from ReceivedMessageProcessor, improve handshake
The user is sent after the messages to avoid receiving messages on the
client while switching from handshake to normal mode.
2020-07-16 21:14:37 +02:00
Kai S. K. Engelbart 43c1edae39 Adjust message queries for handshake sync
This causes problems with group messages as the received date is null
sometimes even though the status is RECEIVED.

The ReceivedMessageProcessor on the client filters out the synced
messages at the moment.
2020-07-16 18:32:40 +02:00
Kai S. K. Engelbart 07c4ccf3c8 Prepare handshake synchronization
Common
* Replace LocalDateTime with Instant everywhere

Client
* Display message creation date with system time zone in MessageControl
* LocalDB#users now strictly contains Users
* lastSync time stamp in LocalDB (saved per user)
* isOnline parameter in save function (lastSync updated if true)
* lastSync time stamp in LoginCredentials
* No ClientConfig#getLoginCredentials because of missing information,
  moved to LoginScene
* Pass LocalDB#lastSync to LoginCredentials in LoginScene

Server
* Explicit lastSync parameter for
  PersistenceManager#getPending(Group)Messages

This sends the correct time stamp to the server, however the JPQL
queries have yet to be adjusted.
2020-07-16 17:04:35 +02:00
Kai S. K. Engelbart 40dbc8152a Move Envoy Server Standalone to server/ subdirectory 2020-07-13 11:40:00 +02:00