Commit Graph

125 Commits

Author SHA1 Message Date
janherich 80fb8dde8b
Read at startup & write through async queues 2018-02-05 12:28:08 +01:00
Alexander Pantyukhov 74f9ea32a3
[fix #1604]: Commands send, request, location are sent several times if quickly tap on send button
Signed-off-by: Dmitry Novotochinov <trybeee@gmail.com>
2018-02-01 19:16:53 +03:00
Dmitry Novotochinov 008f877cd6
Check admin.peers() before markTrustedPeer() call
addPeer() doesn't add peer right away so markTrustedPeer() could fail.
2018-02-01 14:29:53 +03:00
Dmitry Novotochinov b7dadc78c2
[fix #2754] Don't update contact with old data
When contact-request message arrives, it may contain outdated info
about contact including old profile picture.
2018-01-23 18:57:49 +03:00
Oskar Thoren 3cdb05e5b8
Perf experiment spike: Change 1on1 send/filter to partial pub-key
- Add MANY_WHISPER_TOPICS_ENABLED flag
- Jenknisfile.parameters
2018-01-17 17:15:39 +01:00
Eric Dvorsak b8ddc2b16b
[fix #3057] fix chat-contact.identity must be of type string error 2018-01-17 16:34:49 +01:00
Dmitry Novotochinov 17e886da11
[experiment #3038] Add buffer to process incoming messages asynchronously 2018-01-17 16:31:02 +01:00
Julien Eluard fc92dafca6 Fixed android build script.
Upgraded to latest dependencies and removed useless plugins.
2018-01-17 14:56:52 +01:00
Foo Pang e35edf1e90
[Fix #2810] Support markTrustedPeer in web3.js
Signed-off-by: Dmitry Novotochinov <trybeee@gmail.com>
2018-01-16 19:14:57 +03:00
Foo Pang fe697bfcc8
[Fix #2809] Support requestMessages in web3.js
Signed-off-by: Dmitry Novotochinov <trybeee@gmail.com>
2018-01-16 18:56:16 +03:00
Eric Dvorsak 5c359886e5
[feature] refactor discover events
use re-frame idiomatic register-handler-fx, reg-fx and coeffect.
the events are still not free of side-effects as there is some
db calls involved which will be taken care of in a future PR

it also reduces the events fired at app init from 3 to 1
discover-related event
2018-01-15 16:18:24 +01:00
Dmitry Novotochinov 5f02e4287f
Refactor offline inbox events
- Add error handlers
- Memoize calls to add-peer and mark-trusted-peer
- Use re-frame events to control flow
2018-01-15 12:43:38 +03:00
janherich 24d0b68c1f
Async audit 2018-01-13 01:26:11 +09:00
Oskar Thoren 87dc4ead85
Revert "Async audit"
This reverts commit e379168452.
2018-01-13 00:09:41 +09:00
janherich e379168452
Async audit 2018-01-12 12:47:46 +01:00
Oskar Thoren 413f9c2fad
Introduce OFFLINE_INBOX_MANY_ENABLED flag for perf quickfix
Since offline inboxing and desktop were introduced, we went from testing with
~10 messages to ~1000 messages. This surfaced inefficiencies such as this issue.
It also means someone who joins a public channel such as #status will experience
significant lag when signing in. To remedy this, we put offline inboxing for
public/group chats under a flag until the underlying perf issue has been
resolved.
2018-01-11 18:32:22 +09:00
janherich 201484f37f
Faster msg status updates 2018-01-09 15:00:06 +01:00
Oskar Thoren 751998e980
Intercept received messages and queue them
- Exposes behavior under QUEUE_MESSAGE_ENABLED flag that is turned off in
production.

- Delays messages to allow for reordering of latecoming messages up to 500ms
2018-01-05 17:25:27 +09:00
janherich 52ddccca96
Refactored statuses 2018-01-04 13:49:21 +01:00
Foo Pang 3e8ce2d6d7 [Fix #2683] Do not run sync state loop on upstream RPC networks 2017-12-27 08:40:18 +02:00
alwx a813ff9e9f Chat refactoring: updated console (former sign-up) namespace 2017-12-25 22:16:01 +03:00
Dmitry Novotochinov 484e982bdf
Rename 'peer' parameter to 'mailServerPeer' in shh_requestMessages call
To conform to the latest status-go interface

Update status-go build to 'develop-gb7fb51d9'

Remove "from" parameter as it defaults to 0
2017-12-25 20:54:57 +03:00
Dmitry Novotochinov 26dad8cf33
[ref #2764] Add offline messaging settings screen
Screen shows what whisper node we connected to. No adding/editing
allowed yet, screen is ready-only for now.
2017-12-25 20:11:00 +03:00
janherich c8168e9ff0
Use the correct group chat id 2017-12-24 01:53:44 +01:00
Dmitry Novotochinov 9ca54e9adc
Offline inbox support for public chats
- Add `allowP2P` flag to group messages filter
- Remove `to` option from historic messages whisper request
2017-12-20 15:15:41 +03:00
janherich eb8d0a8a79
Refactored message data-model and view 2017-12-19 12:50:36 +01:00
Oskar Thoren ce3d5936ec
Offline inboxing: End to end MVP
- Turns on flag for dev and Jenkins
- Change enode to peer in requestMessages arg
- Upgrades status-go to get ssh_requestMessages
- Use status-cluster enode
- Fix Android AddPeer binding bug
2017-12-15 10:29:48 +01:00
Oskar Thoren 6aed718984
Offline inbox: Mark mailserver as trusted peer with RPC
Also document get-sym-key memoization
2017-12-07 14:01:52 +01:00
Oskar Thoren 091045a700
Offline inbox: Requests messages on startup
- protocol/web3/inbox: make request-messages work by adding enode peer,
  generating and using symkey, and finally using raw CallRPC for
  shh_requestMessages.

- protocol/core: Clean up log lines
2017-12-06 14:51:12 +01:00
Andrey Shovkoplyas afd7fca6d8 refactored protocol handlers 2017-12-04 23:08:18 +03:00
Oskar Thoren 90a0058a43
Under offline inbox flag: sketch allowp2p, request-messages
- Add OFFLINE_INBOX_ENABLED flag
- Under offline inbox flag: add allowp2p for 1on1 filter
- Add skeleton web3.inbox ns with request-messages
2017-12-04 19:12:50 +01:00
janherich e50d56a4d0 Refactored jail loading + commands/responses 2017-11-21 10:51:15 +01:00
Roman Volosovskyi 5dd2f899ad remove password from db
fix incorrect :bot field in commands and requests
2017-10-27 18:09:00 +02:00
Roman Volosovskyi 88d368e970 fix pending messages with symmetric keys 2017-10-27 14:39:42 +02:00
alwx cb72190a18 API commands scopes, changes for API semantics (#1546) 2017-10-16 09:51:52 +02:00
Roman Volosovskyi a7950af335 remove code related to restarting RPC server on entering background (#2008)
* remove restart-rpc-server, stop-rpc-server, start-rpc-server functions and related code

* clean native code
2017-10-04 21:56:27 +02:00
Roman Volosovskyi cede095746 reset shh keys on starting whisper, fix warnings related to outdated shh keys 2017-10-03 17:54:18 +02:00
Oskar Thorén b5c0b24f30 Push notifications: end to end v1
- Send notification when sending message in 1on1 chat
- Add notify FFI with binds for ObjC and Java
- Add fcm-token to contacts in spec and realm
- Add notifications to db
- Include fcm-token in contact request
- Update fcm-token when it arrives and put it in DB
- Disable copy-paste hijacking and popup
- Turn on notifications flag in Jenkins build
2017-09-18 16:28:04 +03:00
Roman Volosovskyi 43a5d91ca2 upgrade status-go to bugfix-updated-cht-#185-gd84d10d
changes in shh API according to https://github.com/ethereum/go-ethereum/wiki/Whisper-v5-RPC-API
2017-09-18 16:06:22 +03:00
Roman Volosovskyi 8c044d9991 stub for ReactNativeModule 2017-09-15 14:15:32 +03:00
Goran Jovic eac7e06f40 feature #1805 refactored protocol listeners 2017-09-15 14:15:04 +03:00
Goran Jovic a764da2b4b fix #1605 protocol message parser catches all invalid payload as errors 2017-09-11 09:46:24 +03:00
Andrey Shovkoplyas bab4e33ec2 Accounts refactoring #1610 2017-08-21 10:19:03 +03:00
Oskar Thorén db6b80d529 chat, protocol: Introduce Lamport clock semantics for message order
This commit ensures messages are ordered correctly when participants join and
leave a group chat. Specifically, the last received message will appear last.
Previously the user and chat clock was queried and updated in an ad hoc manner.
With this change there are only two clock changes to keep track of:

Sending messages:
time = time+1;
time_stamp = time;
send(message, time_stamp);

Receiving messages:
(message, time_stamp) = receive();
time = max(time_stamp, time)+1;

(See https://en.wikipedia.org/wiki/Lamport_timestamps)

Note that this means we can get rid of all the non-message clock queries and
updates.
2017-08-09 12:34:36 +03:00
Andrey Shovkoplyas b429076cad refactored new-group events using fx and cofx
reorganized modules structure, renamed files, improved requirements
2017-08-04 06:36:16 +03:00
Andrey Shovkoplyas 3d05f99bd4 implemented fx handler, rewrite handlers using fx and cfx, optimized subscriptions, reorganized structure and renamed files, implemented re-frame-test and wrote some tests 2017-07-28 17:25:55 +03:00
Roman Volosovskyi cad5e0c567 fix missed web3 object 2017-07-18 10:17:58 +03:00
Roman Volosovskyi be463e0947 messaging test 2017-07-18 08:41:03 +03:00
Roman Volosovskyi 23399c63e1 extract React Native dependencies 2017-07-17 11:38:48 +03:00
Roman Volosovskyi a2b2851061 upgrade clojurescript to 1.9.671 2017-07-05 11:26:07 +03:00