Commit Graph

1750 Commits

Author SHA1 Message Date
Andrea Maria Piana 4b8739a8bc
Polish up and address review feedback 2020-07-27 08:51:28 +02:00
Andrea Maria Piana 63af6aa79b
Use ephemeral keys for sending messsages 2020-07-27 08:51:27 +02:00
Andrea Maria Piana 2be8dff54a
Make sure pn is resent and succesful in tests 2020-07-27 08:51:26 +02:00
Andrea Maria Piana 59d1ee4bb9
full e2e tests 2020-07-27 08:51:25 +02:00
Andrea Maria Piana 149fc5e3eb
Test token invalidation 2020-07-27 08:51:24 +02:00
Andrea Maria Piana d775bb888a
Handle retries & use sendChatMessage for e2e tests 2020-07-27 08:51:23 +02:00
Andrea Maria Piana aa5aa63342
Save response from push notification 2020-07-27 08:51:22 +02:00
Andrea Maria Piana 52e7089e39
Test contact only notifications 2020-07-27 08:51:21 +02:00
Andrea Maria Piana 58817aad5b
Use separate flag for allowonlyfromcontacst 2020-07-27 08:51:20 +02:00
Andrea Maria Piana bec8fbb855
Handle allowedContact lists 2020-07-27 08:51:19 +02:00
Andrea Maria Piana 12a3c5a31a
Add version to notification info 2020-07-27 08:51:18 +02:00
Andrea Maria Piana 026e16533f
Register asynchronously 2020-07-27 08:51:17 +02:00
Andrea Maria Piana 7a54d9b1c9
add unregister 2020-07-27 08:51:16 +02:00
Andrea Maria Piana 7bad800cb8
Add endpoints to enable/disable pns 2020-07-27 08:51:15 +02:00
Andrea Maria Piana be1800f2ec
drive settings from client 2020-07-27 08:51:14 +02:00
Andrea Maria Piana 8130e5b402
Run registration loop when servers are not fully registered 2020-07-27 08:51:13 +02:00
Andrea Maria Piana d2ab7f1bcd
refresh token only on revocation 2020-07-27 08:51:12 +02:00
Andrea Maria Piana 6f8c3025f3
Retrieve and add push notification registration 2020-07-27 08:51:11 +02:00
Andrea Maria Piana e89e36b081
Use resend automatically for datasync 2020-07-27 08:51:10 +02:00
Andrea Maria Piana c88df6c1c7
Handle messages sent to all devices 2020-07-27 08:51:09 +02:00
Andrea Maria Piana 7e8d1353d0
Create server identity on start if necessary 2020-07-27 08:51:08 +02:00
Andrea Maria Piana 3f4575b802
Add grant validation 2020-07-27 08:51:07 +02:00
Andrea Maria Piana 83e859c75f
add migrations 2020-07-27 08:51:06 +02:00
Andrea Maria Piana 20fb8607cb
keep track of queries & actually send pns, hurray 2020-07-27 08:51:05 +02:00
Andrea Maria Piana 1c379984cb
Handle registration with server 2020-07-27 08:51:04 +02:00
Andrea Maria Piana 7e16f940de
Handle query response 2020-07-27 08:51:03 +02:00
Andrea Maria Piana 7f6c8db6db
Handle push notification registration e2e 2020-07-27 08:51:02 +02:00
Andrea Maria Piana d985af4a7e
Implement server persistence for client & basic tests 2020-07-27 08:51:01 +02:00
Andrea Maria Piana 3afde67022
Move message processor to common and allow subscribing to sent messages 2020-07-27 08:51:00 +02:00
Andrea Maria Piana 9da64ef251
add basic config 2020-07-27 08:50:59 +02:00
Andrea Maria Piana 15a3b710a0
Add parsing of messages 2020-07-27 08:50:58 +02:00
Andrea Maria Piana 927f762589
Send gorush notifications 2020-07-27 08:50:57 +02:00
Andrea Maria Piana 6ed7f705b9
validate token type 2020-07-27 08:50:56 +02:00
Andrea Maria Piana 52da9de0c6
Handle query from client 2020-07-27 08:50:56 +02:00
Andrea Maria Piana 2eee956dc6
Store hashes pk 2020-07-27 08:50:55 +02:00
Andrea Maria Piana a15919527b
implement handle push notification registration 2020-07-27 08:50:54 +02:00
Andrea Maria Piana 91c7869d98
implement migrations & persistence for pns 2020-07-27 08:50:53 +02:00
Andrea Maria Piana 24df11bcf9
Pull push notification options from persistence 2020-07-27 08:50:52 +02:00
Andrea Maria Piana eed0df3420
Return decrypted options on validation 2020-07-27 08:50:51 +02:00
Andrea Maria Piana c5077609ee
remove push notification preferences 2020-07-27 08:50:50 +02:00
Andrea Maria Piana f984a041df
decrypt push notification preferences 2020-07-27 08:50:49 +02:00
Andrea Maria Piana e19c799be2
Remove PushNotificationRegister as we can use ApplicationMessage as a wrapper 2020-07-27 08:50:48 +02:00
Andrea Maria Piana 4ded7bf74c
Add skeleton for server and separate namespace for client 2020-07-27 08:50:48 +02:00
Andrea Maria Piana 92b699b59d
Add push notification register message 2020-07-27 08:50:47 +02:00
Andrea Maria Piana c4fa9825a9
Mute chat 2020-07-27 08:50:46 +02:00
Andrea Maria Piana 58fcf809ea
Bug/fix pending peers segfault (#2004)
* Replace mclock with time in peer pools

we used mclock as golang before 1.9 did not support monotonic clocks,
https://github.com/gavv/monotime, it does now https://golang.org/pkg/time/
so we can fallback on the system implementation, which will return
nanoseconds with a resolution that is system dependent.

* Handle case where peer have same discovered time

In some system the resolution of the clock is not high enough so
multiple peers are added on the same nanosecond.

This result in the peer just added being immediately removed.

This code adds a check making sure we don't assume that a peer is added.

Another approach would be to make sure to include the peer in the list,
so prevent the peer just being added to be evicted, but it's slightly
more complicated and the resolution is generally accurate enough for our
purpose so that peers will be fresh enough if they have the same
discovered time.

It also adds a regression test, I had to use an interface to stub the
clock.

Fixes: https://github.com/status-im/nim-status-client/issues/522

* bump version to 0.55.3
2020-07-24 11:14:05 -04:00
Oskar Thorén 26978ca03d
Update README (#2003)
Geth decided to link to this place here https://github.com/ethereum/whisper, and it isn't a very welcoming README. Hopefully this points people in the right direction :)
2020-07-24 11:16:15 +08:00
Roman Volosovskyi 0b3cdf7362
DeleteMultiaccount method 2020-07-13 16:20:02 +03:00
Roman Volosovskyi 6d5a93287b
Separate keystore directory per multiacc
This commit provides `MigrateKeyStoreDir` method which moves multiacc's
keys from a common keystore directory to multiacc specific directory.
2020-07-09 12:41:47 +03:00
Samuel Hawksby-Robinson 157f20a7c8
Added link to specs for key compression API (#1995) 2020-06-24 14:39:42 +01:00