The bug was introduced in #7055.
`message-type` was stored and used instead of `content-type` which
caused incorrect displaying of the last message preview if the one was a
command.
This commit changes the way how keys are restored:
1. batch of `ssh.addSymKey` requests for all sym keys is sent at once
2. `:status-im.transport.core/sym-keys-added` event is dispatched with
results of all successful `ssh.addSymKey` calls
3. filter is created via `ssh.newMessageFilter`
4. `:shh.callback/filters-added` event is dispatched with all added
filters as a parameter
5. profit
In ideal case only 2 `re-frame` events are dispatched.
Paginating using the count of loaded messages might result in some
messages being skipped and not being loaded in the database, in case of
out-of-order messages received.
This commit changes the behavior to sort by `clock-value` and
`message-id`, which gives a consistent sorting.
The initial idea was to use a cursor `clock-value-message-id` and
iterate on that, but realm does not support filtering on string (</>),
so instead we keep track of messages with identical clock-value and
exclude those in the next page query.
The change might result in pages that have duplicates (so messages needs
to be deduped), but won't result in skipped messages.
In order to get `:last-clock-value` one extra query was executed for
each chat during initialization.
Implementation:
- `:last-clock-value` field was added to `chat` entity
- this field is updated when the message is sent/received
- extra query was removed
The crash was caused by RPC calls which happened after `StopNode` call.
Implementation:
- The first suggestion was to `StopNode` only after all `.stopWatching`
calls are done, but this only lowered probability of the crash,
but did not fix the issue.
- Another suggestion was to prevent RPC calls after `StopNode` call,
but it also only lowered probability of the crash.
- So the last resort was a fix on `status-go` side
https://github.com/status-im/status-go/pull/1329,
and it actually worked.
- Advanced settings are hidden until `Statusgo.Login` is finished
Some more changes
Changes
Fix review items
Rename init-settings to restore-native-settings
Restore application name (thanks @churik !)
Remove org name/domain setting for desktop
Change organization name to include domain
Re-use default values in :desktop/desktop
Signed-off-by: Vitaliy Vlasov <siphiuel@gmail.com>
Leftover after #7032. The node hasn't been started if the user entered a
wrong password, that's why `Statusgo.Verify` call has failed (it works
properly only with running node atm).
Implementation:
- the node is started with "dummy" configs if it's necessary to call
`Statusgo.Verify` method
- on `Statusgo.Verify` callback node is stopped so that it can be
started with proper configs on the next sign in attempt.
- signing in is disabled while the node is running
disable sign in while node is running
_
_
Add section separator for logging-display
Refactor user-login-callback
Add comment to AppConfig class definition
Fix mobile compilation error
Use reference in AppConfig singleton; remove obsolete CMake directives
Styling changes
Disable status-go logs by default on desktop
Signed-off-by: Vitaliy Vlasov <siphiuel@gmail.com>