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>
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>
- fix contact code validation for universal links
- go to profile when following universal link pointing to
user own contact code
- fix contact code validation for add contact field
spec for validating public-key has been changed to a
regexp that only accept valid normalized public-key
Signed-off-by: Eric Dvorsak <eric@dvorsak.fr>
* Set custom sound
* Tap on notification opens chat
* Show message notifications when app in foreground
Signed-off-by: Dmitry Novotochinov <dmitry.novot@gmail.com>
Fetch transactions state from etherscan every 15 seconds
if there are any unconfirmed transactions
Signed-off-by: Dmitry Novotochinov <dmitry.novot@gmail.com>
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>
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>
This adds a tracking interceptor to `default-interceptors` that replaces the old
`add-post-event-callback` hook. The interceptor gets the required data from
app-db to know if it's online and passes that to a new mixpanel tracking fn that
queues up tracking events, and drains that queue iff the app is online again.
Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
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>
Reduce the overall nesting level in the test. Each `testing'
statement now fits on a single screen, instead of spanning hundreds of
lines.
The final top-level expression went from 16 to 5 consecutive closing
parens.
Signed-off-by: Goran Jovic <goranjovic@gmail.com>
We wanted to move towards having multiple functions
manipulating the data rather than relying on a chain of
dispatched events.
I have refactored ui.screens.contacts.events so that now the
functions mainly manipulate fx, passed as a first parameter.
Their responsability is to make sure their fx are merged in, so
that they can be composed more easily.
Signed-off-by: Eric Dvorsak <eric@dvorsak.fr>
When a contact is removed it is set to pending?.
If the same contact is added again we now dispatch a :start-chat event
which initiate a 1-1 chat with them.
If current locale is xx-YY, looks up xx_YY first, xx then and finally
falls back to us.
goog.i18n.DateTimeSymbols database is used for localization.
Signed-off-by: Eric Dvorsak <eric@dvorsak.fr>
I have uncommented the two namespaces:
contacts.events was mainly an issue with schema validation
and a few features not covered by tests.
the tests in pre-receiver were actually passing, the issue was a
test suite in wallet.events which was run asychronously by re-frame
which meant the http request in the fx was actually being fired.
Signed-off-by: Oskar Thoren <ot@oskarthoren.com>
Error:
Testing status-im.test.utils.pre-receiver
undefined
/Users/oskarth/git/status-react/target/test/status_im/utils/utils.cljs:61
(defn http-get
^
ReferenceError: window is not defined
...
Error encountered performing task 'doo' with profile(s): 'test'
Subprocess failed
Not sure what http-get has to do with this test ns though.
rename test
fix test `supported-locales-are-actually-supported` and improve failing message
fix some coding standards
rename old `str` namespace alias to `string`
fixing cs
rename translation id to label and explain checkpoints
remove non-existent labels in translations
add some comments
add status 0.9.12 as first checkpoint in translations, plus current supported locales
remove non-existent label from base checkpoint and fix locale->checkpoint and supported locales
format checkpoint-0-9-12-labels in several lines
add fn labels-that-are-not-in-current-checkpoint
- 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
fix wallet errors that were sticking when refresh occured
add separate errors for transaction history fetching with visual feedback
update wallet when going on wallet tab
update transaction list when opening transaction modal
- Add wallet key to db
- Add sub for wallet error messages
- Add event handlers to set wallet values
- Cover the above with tests
Oh and add the tests
Add error view
Add exclamation mark, style error message, add message to view
Remove commented styling
Localise wallet error
Add translation
- Add an english translation for the error message
- Change error representation in db to a keyword
- Update handlers to set and clear keywords
Constrain spec, make view conditional
- The spec for error messages now takes a predefined set.
- Error message only pops on error
Fix test
Align maps
Reduce event chain size, move logging to timbre
The ```:account-update``` event was being passed the key
```update-status?``` which has nothing to do with an account as
represented in the db. This resulted in a spec failure when this
key was detected on an attempt to save changes.
I've sanitized this event by pulling out the three account keys,
```[:name :photo-path :status]```
that are relevant to ```profile``` and ensuring that only they get
passed to ```:account-update```.
Profile updates now work as expected.
Add tests covering profile events
Fix the runner
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.
* Make sure suggestions properly popsup when command starts with space
* Added basic tests for splt-command-args
* Properly handle white spaces
* Added tests for commands with whitespaces