Commit Graph

239 Commits

Author SHA1 Message Date
Samuel Hawksby-Robinson 465afd0131 Refactored BasePayloadReceiver to handle Receive()
Additionally to allow this process flow I refactored RawMessagePayloadReceiver and InstallationPayloadHandler to use a dedicated Marshaller type. Also added a fix to struct extention functionality, we want to ignore the process if there is no public key because that will key encoding. Seems an unnecessary bug to have to handle when you know there is no key.
2023-04-04 11:56:40 +01:00
Boris Melnik 696e061861
fix(unread_count): Skip extra count of new messages for album of images (#3345)
* fix(unread_count): Skip extra count of new messages for album of images

* fix(unread_count): Update migration files
2023-03-31 12:15:06 +03:00
Ibrahem Khalil bd593373b2
Add album count key to messages (#3347) 2023-03-30 12:02:20 +02:00
Sale Djenic e9482e3974 tests: updated due to updating old accounts as a part of migration process 2023-03-28 16:19:27 +02:00
Sale Djenic f10bd00ceb feat: `keypair_name` and `last_used_derivation_index` columns added to `accounts` table
- `keypair_name` added to `accounts` table, all accounts derived from the
same master key have the same keypair name and also no two keypairs share
the same keypair name (keypair name is unique per keypair)
- `last_used_derivation_index` added to `accounts` table, cause we need
to maintain the highest index been used for the derivations made within
the same keypair
2023-03-28 16:19:27 +02:00
Andrea Maria Piana e2082bf5bd Add customization color 2023-03-24 14:22:29 +00:00
Lukáš Tinkl 0eef19f80e feat: dynamic social links
- completely replace social links on save
- respect the order of items and also the URL when comparing

Rationale: for MVP, we'll want the user to be able to add several links
of the same type, and adjust/preserve their order by drag'n'drop

Needed for https://github.com/status-im/status-desktop/issues/9777
2023-03-15 12:41:57 +01:00
Andrea Maria Piana 44a0f5b74d
Add collapsed community categories 2023-03-14 17:13:21 +00:00
IvanBelyakoff 48078393f9
feat: Update saved addresses DB to store ENS, isTest flag and chains (#3183)
prefixes. Changed primary keys and API methods.
Fixed tests and added new ones.
Fixed saved addresses and transaction tests to use ':memory:' sqlite
DB instead of a tmp file to speed up testing by hundred of times.

Fixes #8599
2023-03-06 16:26:46 +03:00
Vitaliy Vlasov 27a76f43ba Compute emojiHash on-the-fly 2023-03-06 13:22:40 +02:00
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