229 Commits

Author SHA1 Message Date
frank
837bf2ca42
support local pairing after logged in as receiver; pair installation;(#3202) 2023-02-28 20:32:45 +08:00
Sale Djenic
2d16e7b891 feat(keycard): keycard details are being synced among devices
- sync all keycards state
- sync every keycard change
2023-02-27 16:03:02 +01:00
Sale Djenic
30e20b42a0 chore(keycard): last_update_clock column added to keycards table
`last_update_clock` will be used later for synchronization.
All keypair functions take clock value in consideration when
making a decision whether to perform an action or not.
2023-02-27 16:03:02 +01:00
Sale Djenic
c207c88cd3 chore(keycard): AddMigratedKeyPair renamed to AddMigratedKeyPairOrAddAccountsIfKeyPairIsAdded which better describes what that function does 2023-02-27 16:03:02 +01:00
Sale Djenic
7c1be7255c chore(keycard): keypair tests moved to a new separate test file 2023-02-27 16:03:02 +01:00
Icaro Motta
999d8c0ee0
Support soft deletion for activity center notifications (#3201)
Adds a new column named `deleted` to the table `activity_center_notifications`. 

Related PR in Mobile https://github.com/status-im/status-mobile/pull/15106 for a lot more details of the feature.

Why? Relying on the `dismissed` column for soft deletion is no longer viable because the mobile & desktop clients should display dismissed notifications (sometimes), hence the need for a new column to truly represent soft deletion.
2023-02-24 20:47:04 -03:00
Andrea Maria Piana
11db9f2119
Add test for everyone tag & fix migration order
A migration was added out-of-order, which meant that in clients who
had already run the migration after, it would be skip.
This commit re-adds the migration so it's run, tested against an empty
account and one that had already migrated.
2023-02-24 10:18:26 +00:00
Sale Djenic
b9de89ca38 chore(keycard): keypair improvements
Due to easier maintaining in future the following is done:
- keypairs table removed
- keycard table added, storing only keycards/keypairs
- keycard_accounts table added, storing only accounts migrated to a keycard

Migration is done keeping the current keycard state accurate (no keycard records will be lost).
2023-02-17 12:45:34 +01:00
Mikhail Rogachev
f25088483c
feat: Add seen/unseen activity center setting (#3148)
* feat: Add seen/unseen activity center state

* feat: ActivityCenterState for grouping ActivityCenter unread messages cnt and seen state

* feat: always use messenger's addActivityCenterNotification & add state to the response

* Remove unused activity center endpoints form api and fix test
2023-02-17 14:08:08 +04:00
Richard Ramos
ab2ff4eeb1 feat: protocol stats 2023-02-01 16:43:57 -04:00
Andrea Maria Piana
cefa0089dc
Split clock values for contacts 2023-01-31 15:43:00 +00:00
Andrea Maria Piana
7e1a894ab8 Add compressed key to multiaccount/messages/contacts 2023-01-30 16:40:40 +00:00
Sale Djenic
6e656448ba feat(keycard): ConvertToRegularAccount endpoint added
It converts a keycard user to a regular user, setting all necessary details
that logged in account looks like it has never been a keycard account.
2023-01-27 13:20:52 +01:00
Sale Djenic
902d4b7501 fix(keycard): convert regular to a keycard account process fixed 2023-01-27 13:20:52 +01:00
Sale Djenic
d8e2884d4e feat(keycard): DeleteKeypair endpoint added 2023-01-27 13:20:52 +01:00
Stefan
5ff029dd57 feat: add balance_history DB table and update migration scripts
Updates status-desktop #8226
2023-01-25 22:25:50 +04:00
Richard Ramos
bfe9307f1f fix: don't return an error on empty rows 2023-01-24 16:26:36 -04:00
Igor Sirotin
f9faac4293
feat: ens_usernames database (#3066) 2023-01-20 13:34:30 +03:00
Andrea Maria Piana
ed9ca8392c Upgrade linter to 1.50.0 2023-01-13 17:52:03 +00:00
Sale Djenic
d7caf67a52 feat(keycard): RemoveMigratedAccountsForKeycard endpoint added 2023-01-13 11:09:57 +01:00
frank
ec7c0e9c7d
Sync all devices after initial pairing (#3047) 2023-01-06 20:21:14 +08:00
Parvesh Monu
d40290a649
Persist switcher cards (#3049) 2023-01-05 21:41:57 +05:30
Sale Djenic
dd78445c22 fix: blocked db issue fixed
DB was blocked cause new query execution was tried before current transaction
was committed.
2022-12-28 13:45:46 +01:00
Sale Djenic
d98d83d308 chore: code review comments applied
- sync clock set for all settings prop participating in syncing
- if other sql error happens we return immediately
2022-12-23 15:07:14 +01:00
Sale Djenic
1340a55c1d feat: backup profile data to waku and sync them from waku
Changes applied here introduce backing up profile data (display name and identity
images) to waku and fetch them from waku. Information about those data is sent
as a separate signal to a client via `sync.from.waku.profile` signal.

New signal `sync.from.waku.progress` is introduced which will be used to notify a client
about the progress of fetching data from waku.
2022-12-23 15:07:14 +01:00
Sale Djenic
691c930828 fix: GetAllKnownKeycards new keypair endpoint added
Handling results of `GetAllMigratedKeyPairs` and `GetMigratedKeyPairByKeyUID`
endpoints updated in a way that account address is unique in the address list.
2022-12-12 11:40:56 +01:00
Samuel Hawksby-Robinson
eadb698603 ColourHash is a distinct type that has a discrete pattern
This change codifies that a ColourHash is a slice of [2]int, as code depends on the inner slice to have exactly 2 indexes
2022-11-28 16:26:07 +00:00
Andrea Maria Piana
c85df62d3c Sync community encryption keys 2022-11-15 10:11:01 +00:00
Sale Djenic
fdf4c05968 chore: unused code removed 2022-11-09 18:07:16 +03:00
Boris Melnik
63d46481fd
feat(communities): Cancel request to join community (#2915) 2022-10-28 11:41:20 +03:00
Pascal Precht
0bdb596d3b feat: introduce discord import tool 2022-10-28 09:52:26 +02:00
Andrea Maria Piana
a89f4b2d71 Add read/unread messenger functions for activity center 2022-10-26 17:19:44 +01:00
Samuel Hawksby-Robinson
71170e7099 Added comprehensive logging 2022-10-26 10:26:59 +01:00
Samuel Hawksby-Robinson
8fb069286c Added dumps to payload parsing 2022-10-26 10:26:59 +01:00
Mikhail Rogachev
60cb15739d
feat(ActivityCenter): Add community membership AC notifications (#2886)
* feat(ActivityCenter): Add community request AC notification

* feat(ActivityCenter): Add CommunityID to AC notification

* feat(ActivityCenter): Add membership status for community membership AC notifications

* feat(ActivityCenter): Add tests for community notifications and fix naming

* Add notification for kicked from community action

* feat(ActivityCenter): Fix for missing notification objects for tests
2022-10-26 02:06:20 +04:00
Andrea Maria Piana
bef211b5d6 Send all encryption keys 2022-10-20 12:19:44 +01:00
Stefan
b9d6e6d8c8 feat: sync saved addresses
Main changes:
- Extend saved addresses DB with sync info: sync timestamp, update timestamp
and soft removed flag
- Create custom protobuf message payload to sync saved addresses
- Cleanup saved addresses on each start of messenger, by deleting
soft removed older entries
- Sync all saved addresses on Messenger.SyncDevices calls
- Sync particular changes to saved addresses
- Add SavedAddressManager instance to messenger
  - Note, can't find a clean way to pass the SavedAddressManager to the
  messenger, so we create another one
- Add tests for sync and new DB API

Closes: #7229
2022-10-10 11:26:35 +02:00
Stefan
daee116878 fix: compiling chat_messsage.proto due to unscoped ContentType 2022-10-07 12:49:04 +02:00
Michał
057c7915f4
chore: use provided pictures visibility options when creating settings db entry (#2867)
When initially creating settings, properties 'initialize profile_pictures_show_to'
and 'profile_pictures_visibility' are set according to the provided Setting object.
2022-10-05 12:53:42 +02:00
Pascal Precht
c01ad05525 feat(common): add ThirdPartyID to Message and protobuf.WakuMessage
Usually, message IDs are generated by their payload and signature and
in receiving nodes calculated in based on the same data as well.

There's no ID attached to messages in-flight.

This turns out to be a bit of a problem for messages that are being
imported from third party systems like discord, as the conversion
and saving of such messages and handling of their possible assets and
attachments are done in separate steps, which changes the message
payloads after their IDs have been generated.

Hence, we're introducing a `ThirdPartyID` property to `common.Message`
and `protobuf.WakuMessage` so receiving nodes of such messages (via the
archive protocol primarily) can easily detect third party/imported
messages and give them special treatment.
2022-09-29 11:15:47 +02:00
Richard Ramos
bf9abfc350
feat: make kdf iterations configurable when creating a multiaccount (#2796) 2022-09-27 16:27:20 -04:00
Sale Djenic
698c32f3e3 chore: UpdateKeycardUID function exposed 2022-09-21 15:01:53 +02:00
Pascal Precht
9ee2967e78 feat(message_persistence): add discord message author image payload fields
This also adds some persistence APIs to operate on the new field (later
needed for the discord imoprt tool)
2022-09-19 13:47:16 +02:00
Stefan
5b0d8a7c4e fix: workaround for wrong renaming of migration file for keypairs table
Restore the old, previously renamed, 1662447680_add_keypairs_table.up.sql
file while keeping the current one for those who already migrated to the
new one. The extra migration is noop and saves to keep consistency in
the user data states history.
2022-09-16 12:52:01 +02:00
frank
6e4ac1c495 Use image server for all kind of images and integrate identity rings 2022-09-16 09:52:08 +01:00
Stefan
9db69df9a0 feat: updated migrations for merging favourites with saved addresses
Required by #6546
2022-09-12 13:46:04 +02:00
Sale Djenic
00aa103788 feat: keypairs table added and necessary endpoints exposed via accounts api 2022-09-12 09:52:22 +02:00
Sale Djenic
41f3a19a49 feat: key_uid column added to the accounts table 2022-09-12 08:51:15 +02:00
Patryk Osmaczko
65be6f2b96 feat: add and distribute chatIdentity.FirstMessageTimestamp
`FirstMessageTimestamp` enables members of the community to determine if
there are any messages they can fetch on the community channel(chat).

`FirstMessageTimestamp` is advertised by admin for each community chat
through `CommunityDescription`. It assumes admin is online frequently
enough to capture the first channel message.

For existing communities admin determines first message timestamp by
finding oldest chat message in its local database.

task: status-im/status-desktop#6731
2022-09-09 08:59:39 +02:00
Samuel Hawksby-Robinson
26b33aa09d Added AccountType to enforce strict typing on Accounts
Also a tpyo was fixed, probably introduced by me.
2022-08-25 22:01:43 +01:00