Commit Graph

170 Commits

Author SHA1 Message Date
janherich 12021554f3
Ensure version compatibility 2018-10-02 16:04:05 +02:00
yenda f6a50b2799
[fix 6051] log error during connexion and pass cofx
Signed-off-by: yenda <eric@status.im>
2018-10-02 14:11:05 +02:00
Andrea Maria Piana 165f1a46c7
Propagate signed membership information
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2018-10-02 12:06:28 +02:00
yenda c9e4a11487
[fix 6052] check empty filters
Signed-off-by: yenda <eric@status.im>
2018-10-01 13:12:34 +02:00
janherich 44fbe62773
Chat replies + refactoring 2018-09-28 16:15:47 +02:00
Andrea Maria Piana 0c48d09c71
Add back group chats messages
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2018-09-26 20:58:03 +02:00
yenda e9149786c5
remove usage of merge-effects macro and handlers-macro ns
Signed-off-by: yenda <eric@status.im>
2018-09-25 20:05:52 +02:00
yenda 4bd5d986b0
remove merge-fx macro
Signed-off-by: yenda <eric@status.im>
2018-09-25 15:18:44 +02:00
yenda d422a40fc6
fix event vector
Signed-off-by: yenda <eric@status.im>
2018-09-20 17:07:57 +02:00
yenda b71005d2fa
replace all register-event-db by fx and remove trim-v interceptor
Signed-off-by: yenda <eric@status.im>
2018-09-20 13:37:31 +02:00
Eric Dvorsak 8dc9af8917
refactoring of events into status-im.events
Signed-off-by: Eric Dvorsak <eric@dvorsak.fr>
2018-09-11 15:09:54 +02:00
Eric Dvorsak 80aa0e9286
[feature #5213] allow user to select fleet in settings
- get wnodes from resources/config/fleets.json which is taken from
fleets.status.im
- store wnodes by fleet and not by network since they are always the same
- reset wnodes settings during migration
- add option in developper menu to select fleet
- mailservers are now presented by their real name

Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
2018-09-07 15:33:29 +02:00
Eric Dvorsak 02191f0380
[fix 5715] make generate-sym-key-from-password mergeable
Signed-off-by: Eric Dvorsak <eric@dvorsak.fr>
2018-09-03 19:05:53 +02:00
Eric Dvorsak 728831c9c2
remove unused flags
reorganize config flags
remove offline-inbox-enabled? flag
remove universal-links-enabled flag
remove add-custom-mailservers-enabled? flag
remove spam-button-detection-enabled? flag
remove flags from config files

Signed-off-by: Eric Dvorsak <eric@dvorsak.fr>
2018-08-29 16:30:05 +02:00
Eric Dvorsak bb339dc39b
refactor login flow
simplified flow:

- event `:ui/login` is dispatched
- node is initialized with user config or default config
- `node.started` signal is received, applying `:login` fx
- `:callback/login` event is dispatched, account is changed
in datastore, web-data is cleared
- `:init/initialize-account` event is dispatched

replace event dispatches by function composition

fix bug in universal links where url to be processed after login
was never removed

Signed-off-by: Eric Dvorsak <eric@dvorsak.fr>
2018-08-28 14:46:33 +02:00
Eric Dvorsak dacfe97a58
refactor events and fns to dedicated namespaces
- move init events and fns to dedicated namespace
- move web3 events and fns to dedicated namespaces
- move signal events and fns to dedicated namespace
- move notifications events and fns to dedicated namespace
- cosmetic fixes
- remove print statements
- fix formating
- remove unused imports
2018-08-28 14:44:55 +02:00
Eric Dvorsak 002f3e73d1
refactor :initialize-account into single event
fix tests for :initialize-account refactoring
fix destructuring typo
2018-08-28 14:44:55 +02:00
Andrea Maria Piana 3754e1dbae
[Fixes #5130] Select mailserver round-robin on connection failure
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2018-07-17 08:49:24 +02:00
Andrea Maria Piana b34744133b
[fixes #4745] Don't query mailserver on restored account
When creating a new account / recovery we don't poll the mailserver anymore for historic messages, which solves the immediate issue of fetching only received messages

Handle messages sent from a different device in public chat / restore history. The message will be added, shown correctly as sent by the user, and the status will be set as sent ( need to check for seen race condition, as messages will now be added twice). This means that multidevice should now work for public chats.

Move contact updates to discovery topic. This is necessary as there is a pre-existing bug whereby contact updates would not work anymore after wallet recovery, as the code relies on the initial contact request being stored on the mailserver, which we cannot guarantee (we only pull 7 days of data). Not pulling history anymore exacerbate the problems but does not introduce it.
To make sure that contact updates will work after wallet recovery, we also need to consider a ContactUpdate in the same way we consider a ContactRequest (the other peer has no idea that the user has recovered the wallet). This does not change any behaviour in terms of obscurity/security as ContactRequest are automatically processed (in both case the contact will be set as pending?, not as accepted)
At this stage ContactRequest, ContactRequestConfirmed, ContactUpdate have all the same logic, i.e. update the contact information, leave the pending flag alone.

Only 1 day of history is fetched for newly joined chats, if catching up 7 days is the cap as before.

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2018-07-03 17:21:59 +02:00
Andrea Maria Piana 42509e8fb6
Dont query mailserver when from is greater than to
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2018-07-02 12:21:43 +02:00
Andrea Maria Piana a313557694
Cap maximum number of days requested to mailserver
Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
2018-06-19 20:13:19 +02:00
Eric Dvorsak b40b042b67
[fix 4212] update profiles with concurrent contact-requests 2018-06-15 20:14:52 +03:00
Andrea Maria Piana 2d54c3e2cc
Select random ms until users explicitictly choose one
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2018-06-14 15:02:15 +02:00
Andrea Maria Piana c66c457bbb
Default to value if key is nil
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2018-06-13 13:39:04 +02:00
janherich 4ba78de407
Faster seen marking
Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
2018-06-11 12:16:42 +02:00
Andrea Maria Piana 608c64e88d
Dont run receive-whisper-messages if the user is logged out
This handles a bug whereby we'd run receive-whisper-messages
when the user is logged out.

I could not replicate locally, but a few issues are apparent from
just inspecting the code:

1) there are some race-conditions on logout as we don't wait for all
the filters to be removed. Changing this behaviour is non trivial and
not sure if we can actually handle this completely
(status-go-has-a-message->remove-filter->logout->status-go-deliver-message).
2) no error handling is made in receive-whisper-messages.

This PR defensively handles both cases.

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2018-06-07 14:16:35 +02:00
Pedro Pombeiro d3202dffa7
Disable group chats even in dev mode. Closes #4506 2018-06-06 08:59:41 +03:00
Andrea Maria Piana 75d1c04412
Allow for different password on different mailservers
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2018-06-04 14:28:43 +02:00
Eric Dvorsak 8782ecc06d
[fix 4574] do not send updates to pending contacts
fixes #4574

updates were sent to all pending contacts
fixes that by filtering on the pending? key
2018-06-02 08:31:24 +03:00
Roman Volosovskyi 5d41cdda0c
[#4551] fix error on fetching history for removed chat 2018-06-01 16:25:50 +03:00
Eric Dvorsak 68eb36f7b1
[fix] support offline contact request, confirmation and update
- fix a bug in profile where app would was returning directly to profile
screen after photo capture, showing updating to user but not actually saving
and broadcasting it
- adds support for offline contact request, confirmation and updates by
leveraging the :sent and :not-sent signal from status-go. Each chat
in the protocol layer uses a `resend?` field to keep track of the current
state of the contact, between `nil`, `contact-request`,
`contact-request-confirmation` and `contact-update`. There is no case
were it can be more than one case because if `contact-request` or
`contact-request-confirmation` was not sent yet `contact-update` is not
necessary as the latest contact infos will be sent with the request/confirmation

Signed-off-by: Eric Dvorsak <eric@status.im>
2018-05-31 17:43:37 +02:00
Eric Dvorsak ee7895fe43
[fix 4387] query mailserver in batches of 24 hours 2018-05-31 16:58:53 +03:00
janherich 874e88fc38
Fix seen statuses
Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
2018-05-29 14:48:27 +02:00
Eric Dvorsak 203f399aca
use from parameter for mailserver requests
Signed-off-by: Eric Dvorsak <eric@dvorsak.fr>
2018-05-29 10:19:08 +02:00
Eric Dvorsak 3430bfe61e
Update last-received everytime a message is received from inbox 2018-05-29 09:58:32 +02:00
Andrea Maria Piana 9cfb591068
Remove chat / clear history
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2018-05-28 16:28:16 +02:00
Eric Dvorsak 21f9aa1b10
[fix 4466] improve peer-summary-change-fx
do not request messages from inbox everytime a peer is added or removed

Signed-off-by: Eric Dvorsak <eric@dvorsak.fr>
2018-05-28 15:31:16 +02:00
janherich e1da12d8a2
Fast message grouping/sorting
Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
2018-05-24 13:38:40 +02:00
janherich 84208aeb85
Correct :shh/post accumulation
Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
2018-05-23 19:55:27 +02:00
Eric Dvorsak 50072ffe3f
[fix 4177] handle discovery signals
Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
2018-05-23 17:01:57 +02:00
Andrea Maria Piana 735a5b403d
Add custom mailservers feature-toggled
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2018-05-23 15:35:25 +02:00
Roman Volosovskyi dcefb0795d
Activate whisper envelope deduplication (performance).
Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
2018-05-22 16:55:20 +02:00
Eric Dvorsak 1d94a4d1cb
[fix] mailbox get-current-wnode-address
wrong symbol was introduced in recent PR

Signed-off-by: Eric Dvorsak <eric@dvorsak.fr>
2018-05-18 16:37:40 +02:00
Roman Volosovskyi 9b5058d632
handle multiple incoming messages at once 2018-05-18 14:12:46 +03:00
Connor Christie 24d5fabe2e
Add support for custom network upstreams
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2018-05-18 11:25:21 +03:00
Eric Dvorsak 225d2e2ec0
[fix] request the right topic from inbox when adding new key
Signed-off-by: Eric Dvorsak <eric@dvorsak.fr>
2018-05-15 10:24:25 +02:00
Eric Dvorsak baa471a929
remove message cache
message cache was initialized when logging-in so it was basically useless
it was causing a bug when switching account and getting a contact request
from the same user in 2 accounts without killing the app because the cache
was not reset and the subsequent contact requests were ignored

Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
2018-05-14 14:45:49 +02:00
Dmitry Novotochinov cd41cefa96
Handle mailserver connection error
* Do not try to reconnect when offline
* If online, but mailserver is disconnected, show notification
* Tap on notification starts reconnecting process

Signed-off-by: Eric Dvorsak <eric@dvorsak.fr>
2018-05-14 11:25:45 +02:00
Eric Dvorsak a0a79595ce
Rename multi-send-with-pubkey into multi-send-by-pub-key
previous naming was confusing because it actually sends using
the symkey of each chat whose simkey is passed as an argument

Signed-off-by: Eric Dvorsak <eric@dvorsak.fr>
2018-05-12 11:52:47 +02:00
Andrey Shovkoplyas 94becb5094
updated status-go to latest
Signed-off-by: Eric Dvorsak <eric@dvorsak.fr>
2018-05-11 15:42:16 +02:00
janherich 62a9f26e30
First stage of realm transactions 2018-05-10 17:21:23 +02:00
Andrea Maria Piana 291932db08
publish using pk in 1-to-1
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2018-05-09 20:26:41 +02:00
Eric Dvorsak b7ab49d305
[fix] recover lost contact requests and following messages
- Fetch discovery topic from offline inboxing
- Send ContactRequestResponse on discovery channel with new-key message
for recovery of invited contacts

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2018-05-09 18:57:47 +02:00
Dmitry Novotochinov 428f1d47ee
Request offline message when app returns from background
* Add "connecting" mailserver status
* Send push notification when "envelope.sent" signal received

Signed-off-by: Dmitry Novotochinov <trybeee@gmail.com>
2018-05-09 15:29:27 +03:00
Roman Volosovskyi 8c1cd9d3d4
reformat remaining namespaces 2018-05-08 11:36:32 +03:00
Eric Dvorsak f8e535f9bc
[fix 3843] query mailserver when going back online
Signed-off-by: Eric Dvorsak <eric@dvorsak.fr>
2018-05-03 22:40:59 +02:00
Andrey Shovkoplyas de03fc2d6a
fixed error on invalid utf-8 from dapp
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2018-05-03 15:32:30 +03:00
Roman Volosovskyi e830183011
track sent/received events;
force sent/received ratio tracking;
send mixpanel events when state is changed to online;
2018-05-01 19:25:25 +02:00
Roman Volosovskyi 8cd77653f4
fix cyclic deps related to status-im.transport.message.v1.* namespaces;
move account-update to sparate ns;
fix a few more cyclic deps;
2018-05-01 19:25:24 +02:00
psdp ef0024c5dc
Replace accounts/accounts by account/account in app-db [#3907]
Signed-off-by: Goran Jovic <goranjovic@gmail.com>
2018-05-01 16:40:36 +02:00
Dmitry Novotochinov a8a03067a1
Add resend and delete message actions
* Set message status based on signal from Go
* Set status as "not-sent" on app start if no signal received

Signed-off-by: Dmitry Novotochinov <trybeee@gmail.com>
2018-04-27 11:03:42 +03:00
Roman Volosovskyi 6b073fe350
move merge-fx to separate ns 2018-04-25 11:33:48 +02:00
Andrea Maria Piana baf211e1f3
Send signed transaction to deleted chats 2018-04-25 08:55:39 +02:00
Andrey Shovkoplyas 55d3095b7a
[#3888] [#2704] added personal_sign and CallPrivateRPC methods support
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2018-04-19 17:43:50 +03:00
janherich 80cb7ada68
Remove Jarrad from contacts 2018-04-16 11:59:00 +02:00
Eric Dvorsak 3612fd8c47
[fix 3806] Provide separate MailServers for each network
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2018-04-16 12:28:50 +03:00
janherich a82c087a0f
Refactor subs + fix group chat issues 2018-04-16 10:58:26 +02:00
janherich f406feacc7
Contact refactoring 2018-04-11 14:57:51 +02:00
Andrea Maria Piana 3256d67c2e
Add clock values for public group/chats
I have extended and modified the current algorithm for message ordering
so that it applies for group and public chats alike.

We use Lamport timestamps but we prefix the unix timestamp, which should
maximize the chances of the message being seen on the top of the chat.

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2018-04-10 12:19:42 +01:00
Eric Dvorsak df17c50612
Add new protocol
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2018-04-05 15:40:30 +01:00