Commit Graph

277 Commits

Author SHA1 Message Date
Vitaly Vlasov 3ef445dbcf fix_: share all future addresses storage 2024-07-18 12:08:40 +03:00
Patryk Osmaczko 9403475572 chore(communities)_: request missing channels' encryption keys in a loop
closes: status-im/status-desktop#14683
2024-07-16 16:44:50 +02:00
Michal Iskierko 3145ab05ff feat(community tokens)_: Upgrade ERC721 contract to enable batch transfers
Add version field to proto and database.

Issue #4947
2024-07-08 11:30:51 +02:00
Mikhail Rogachev 1362d10620
feat_: implement connector service (#5375) (#5403) 2024-06-24 07:29:40 -07:00
Michal Iskierko ad9032d036 feat_: recovery retracking pending transsactions
Add ReTrackOwnerTokenDeploymentTransaction function which will runs community tokens transactions listening.
Add deployment transaction hash to community_tokens table.

Issue #14699
2024-05-28 13:06:24 +02:00
Mikhail Rogachev 4f493a533e
chore(identity)_: remove old social links implementation (#5214) 2024-05-24 10:35:34 +02:00
Jakub Sokołowski c7397e18dd
chore(all)_: remove obsolete eth.staging fleet
And leftovers of `eth.test` fleet which no longer exists.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-05-17 20:21:00 +02:00
Alexander c46e395a58
Extend peersyncing to sync 1-to-1 messages (#4962)
* fix_: extend peersyncing to sync 1-to-1 messages

* fix_: tests
2024-05-14 12:20:13 +02:00
Parvesh Monu 6eb40bf781 chore_: Remove old status community from the database 2024-05-13 21:17:25 +08:00
Mykhailo Prakhov cb4c19cece
feat(encryption)_: request control node to resend ecnryption keys during restoring account by a seed phrase (#5142) 2024-05-10 10:04:46 +02:00
frank 8c5a735438 feat_: retry sending specific messages 2024-05-02 05:40:49 +08:00
Patryk Osmaczko 9e5462eb9e feat_: introduce forward error correction in segmentation layer
closes: #4330
2024-04-17 22:05:53 +02:00
Patryk Osmaczko 21eba9928c chore_: bump `hash_ratchet_encrypted_messages_key_id` migration
This is to ensure proper migration from release branch.
2024-04-10 16:40:57 +02:00
Patryk Osmaczko dcf3ed2388 fix_: improve performance of `GetHashRatchetMessages`
This time with proper migration timestamp.

part of: #5036
2024-04-10 14:27:14 +02:00
yqrashawn aa73a0512c
feat: add contact customization color (#4869) 2024-04-03 22:49:57 +08:00
Mikhail Rogachev 30e143ca40
Fix(Profile): Remove profile showcase from general response via signal (#4982)
* Fix(Profile): Remove profile showcase from general responce via signal

* Fix(Profile): Restore community membership validation for the prodile showcase

* feat: Make profile validation optional

* fix: review fixes
2024-03-29 11:22:44 +01:00
Sean Hagstrom b911297a3d
Feature: store and retrieve a contact's bio (#4916)
* chore: create migration for adding bio field to contacts table

* feature: update contact persistence to save and query contact bio

* test: ensure that the protocol can store and retrieve contact bio data
2024-03-19 18:09:13 +00:00
Andrea Maria Piana 2311da2475 Port back migrations from release branch 2024-03-14 13:27:12 +00:00
Andrea Maria Piana 67dfff2324 Add index to hash ratchet & cache processed description 2024-03-13 11:35:11 +00:00
Mikhail Rogachev 6522d52016
Feat: Simplify profile showcase preferences (#4854)
* Feat: simplify profile showcase preferences

* Feat: remove old profile showcase preferences on save

* Feat: add getters for showcase entries limits
2024-03-08 17:20:23 +01:00
Igor Sirotin 7f671f7632
chore: make generate with custom `-modtime` (#4896) 2024-03-08 09:25:17 +00:00
Igor Sirotin 571f30777e
chore: make generate with nix-shell (#4853) 2024-03-01 13:58:24 +00:00
Igor Sirotin 9fa396e797
chore: nix-shell make generate (#4824) 2024-02-27 19:35:43 +00:00
Mikhail Rogachev 7cc4c12642
Feat: Add social links to the profile showcase (#4775)
* feat: add social links to the profile showcase

* fix: deprecate old social links, add synced profile showcase to response
2024-02-26 16:53:40 +03:00
Mykhailo Prakhov 3959948c4c
chore: fix ban/unban flow and delete all messages feature (#4743)
feat: delete all messages for banned member and ban/unban AC notifications
2024-02-22 11:25:13 +01:00
Patryk Osmaczko e2cab1a8ae fix: ensure community events eventual consistency
- Extracted `community_events_factory.go`
- Introduced `eventsProcessor`
  - Improved processing logic order
  - Improved events filtering
- Introduced concept of `EventTypeID` to prevent redundant events handling
- Added sanity check before events appliance when reading community from
  database
- Removed reject&re-apply scheme (no more ping-pong issue)
- Fixed and added more variants to eventual consistency test

fixes: status-im/status-desktop#13387
fixes: status-im/status-desktop#13388
2024-02-20 21:07:01 +01:00
Cuteivist a866b8025e
feat: Community token received notification (#4682) 2024-02-19 14:55:38 +01:00
Igor Sirotin 85c0e282ae
feature: profile showcase preferences sync&backup (#4729) 2024-02-17 18:07:20 +00:00
Igor Sirotin add46fbda0
chore: `make generate` with nix-shell (#4745) 2024-02-16 12:48:27 +00:00
Mikhail Rogachev 526e3d74f1
Feat: proof of membership for profile showcase communities (#4713)
* chore: move profile showcase structures to the indentity package

* feat: implement proof of membership for unecrypted communities

* feat: implement proof of membership for encrypted communties with grants
2024-02-15 22:13:12 +03:00
Andrea Maria Piana 605fe40e32 Fix encryption metadata issues #4613
This commit fixes a few issues with communities encryption:

Key distribution was disconnected from the community description, this created a case where the key would arrive after the community description and that would result in the client thinking that it was kicked.
To overcome this, we added a message that signals the user that is kicked. Also, we distribute the key with the community description so that there's no more issues with timing.
This is a bit expensive for large communities, and it will require some further optimizations.

Key distribution is now also connected to the request to join response, so there are no timing issues.

Fixes an issue with key distribution (race condition) where the community would be modified before being compared, resulting in a comparison of two identical communities, which would result in no key being distributed. This commit only partially address the issue.
2024-02-07 10:25:41 +00:00
Michal Iskierko 73a5189398 feat(BridgeMessage): Add new type of chat message content: BridgeMessage
BridgeMessage is a type of chat message content which will be sent from  Matterbridge.
It contains fields:
- bridge name - depends on the used bridge, eg. "discord", "slack", etc...
- user name - username the message was received from
- content - message content
- user avatar
- message id
- parent message id - used in case of replies

Message is saved to a separated table: bridge_messages, similarly to discord messages.
The user_messages table is untouched.
bridge_messages table contains user_messages_id in order to join with user_messages table.

Issue #13098
2024-01-30 12:14:54 +01:00
Mikhail Rogachev fb98ee93ce
Correct profile showcase tokens and collectibles (#4511)
* feat: add profile showcase collectibles & assets missing fileds

* feat: resolve collectible identification issue

* feat: add validation for collectible visibility relative account

* feat: separate profile showcase assets on verified and unverified tokens

* fix: make chainId uint64, comment collectible account check

* chore: re-generate protobuf binaries with right protoc version

* Update protocol/messenger_profile_showcase.go

Co-authored-by: Igor Sirotin <sirotin@status.im>
2024-01-25 20:48:27 +04:00
Andrea Maria Piana e65760ca85 Add basic peersyncing
This commit adds basic syncing capabilities with peers if they are both
online.

It updates the work done on MVDS, but I decided to create the code in
status-go instead, since it's very tight to the application (similarly
the code that was the inspiration for mvds, bramble, is all tight
together at the database level).

I reused parts of the protobufs.

The flow is:

1) An OFFER message is sent periodically with a bunch of message-ids and
   group-ids.
2) Anyone can REQUEST some of those messages if not present in their
   database.

3) The peer will then send over those messages.

It's disabled by default, but I am planning to add a way to set up the
flags.
2024-01-23 12:46:17 +00:00
Ibrahem Khalil 436d229856
Add last opened at key for community (#4514) 2024-01-21 12:55:14 +02:00
Ibrahem Khalil e1b52f9eae
Add joined at key to communities (#4513) 2024-01-09 20:36:47 +02:00
Godfrain Jacques 9d8b55e3d9
This PR (status-go) fixes #12821 (#4516)
- Add album_images column to the user_messages table
- Migrate the database
2024-01-08 10:18:57 -08:00
Mykhailo Prakhov 134137f9c5
feat: implemented a mechanism to retrieve shard information for a given community ID (#4499)
* feat: a mechanism to retrieve shard information for a given community ID
2023-12-22 13:37:37 +01:00
Vitaly Vlasov 384543d3a6 Re-send messages with ResendAutomatically=true 2023-11-30 10:46:38 +02:00
Patryk Osmaczko 2c55b9c676 feat: cache curated communities in db
closes: status-im/status-desktop#12277
2023-11-16 17:21:28 +01:00
Patryk Osmaczko d04f99d56d chore: cleanup message segments
closes: #4297
2023-11-15 16:52:35 +01:00
Patryk Osmaczko 6bb806caad feat: introduce messages segmentation 2023-11-13 17:32:00 +01:00
Mikhail Rogachev 03c32f620f
feat: Profile showcase data sharing (#4209)
* feat: Add profile showcase messaging part with ecrypted data

* feat: Separate profile showcase categories to provide ablity to store custom data

* fix: review fixes

* feat: move profile showcase out of contact data

* fix: create index on contact id for profile tables

* chore: remove logger from link preview
2023-11-09 22:59:01 +04:00
Igor Sirotin f8236fb555
fix: link previews public keys (#4272) 2023-11-09 16:24:35 +00:00
frank 054356fed2
remove sync AC state (#4241) 2023-11-02 23:07:03 +08:00
Mykhailo Prakhov eb437e9d8d
feat: kick all members after ownership change and auto-accept after sharing the address (#4187)
feat: kick all members after the ownership change and auto-accept after sharing the address
2023-10-31 15:20:40 +01:00
Andrea Maria Piana d47b5733c0
fix order of drop statement 2023-10-30 10:56:32 +00:00
Andrea Maria Piana 360c2d50d4 Fix issues with out of order encryption and batched messages
This commit fixes 3 issues:

1) In some cases, the hash ratchet was not correctly found
2) Out of order messages were not processed correctly as the wrong error
   was returned
3) Batched non datasync messages were not processed correctly

Fixes: #4170
2023-10-30 10:11:32 +00:00
frank 06a9fe4f81
fix: sync decision on join community request (#4190)
* fix: sync community request decision

* make generate

* simplify test

* make generate
2023-10-26 12:17:18 +08:00
Andrea Maria Piana 23f71c1125 Fix encryption id && rekey with a single message
This commit changes the format of the encryption id to be based off 3
things:

1) The group id
2) The timestamp
3) The actual key

Previously this was solely based on the timestamp and the group id, but
this might lead to conflicts. Moreover the format of the key was an
uint32 and so it would wrap periodically.

The migration is a bit tricky, so first we cleared the cache of keys,
that's easier than migrating, and second we set the new field hash_id to
the concatenation of group_id / key_id.
This might lead on some duplication in case keys are re-received, but it
should not have an impact on the correctness of the code.

I have added 2 tests covering compatibility between old/new clients, as
this should not be a breaking change.

It also adds a new message to rekey in a single go, instead of having to
send multiple messages
2023-10-24 20:48:54 +01:00