Commit Graph

163 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Mikhail Rogachev 1be356af93
feat: Profile showcase backend (#4005)
* feat: profile showcase preferences basic impl

(squashed)

* feat: save preferences in batch for profile showcase

* chore: add validation for profile showcase settings request

and fix migration order
2023-10-24 14:43:18 +04:00
Patryk Osmaczko 345851c396 feat: ensure unique control node across devices
closes: status-im/status-desktop#11962
2023-10-22 21:50:41 +02:00
Patryk Osmaczko 0881d8cdb0 Add queue for processing community description & configurable control node 2023-10-17 21:00:24 +01:00
Igor Sirotin aded258ccb
feature: Unfurl status links (#4033) 2023-10-13 13:25:34 +01:00
richΛrd ba5ed725ce
waku2: static shards (#3944)
- use protected topics for communities
- associate chats to pubsub topics and populate these depending if the chat belongs to a community or not
- mailserver functions should be aware of pubsub topics
- generate private key for pubsub topic protection when creating a community
- add shard cluster and index to communities
- setup shards for existing communities
- distribute pubsubtopic password
- fix: do not send the requests to join and cancel in the protected topic
- fix: undefined shard values for backward compatibility
- refactor: use shard message in protobuffers
2023-10-12 15:21:49 -04:00
Ibrahem Khalil 22ec4ac586
Link previews not working on message edit (#3974) 2023-08-31 10:21:25 +03:00
Michal Iskierko 9d0acc2265 feat(OwnerToken): Owner token and master token deployment
Adding new smart contracts and generated go files.
Deploy token owner function and master token address getter.
Adding deployer and privilegesLevel columns to community_tokens table.
Passing addressFrom to API calls.

Issue #11250
2023-08-14 20:57:00 +02:00
Samuel Hawksby-Robinson d60beb2283 refactor to remove rekeyedAt and use group current key 2023-07-24 17:18:42 +01:00
Samuel Hawksby-Robinson 2536d9c8ba Implemented testing to check rekeying is happening 2023-07-24 17:18:42 +01:00
Samuel Hawksby-Robinson 1e09a4bc37 Fix for community / messenger state changes 2023-07-24 17:18:42 +01:00
Samuel Hawksby-Robinson 03e28eea0d Implement correct getter and setter functionality for Communities 2023-07-24 17:18:42 +01:00
Mykhailo Prakhov 0919a87588
chore: community admin events (#3678)
chore: 
- add CommunityEventsMessage
- refactor community_admin_event to accept a list of events and patch a CommunityDescription
- save/read community events into/from database
- publish and handle community events message
- fixed admin category tests
- rename AdminEvent to Events or CommunityEvents
2023-07-18 17:06:12 +02:00
Jonathan Rainville 9674bc463f
feat(communities): add airdropAddress param to SharedAccounts (#3756)
Adds airdropAddress to the request to join params and a is_airdrop_address flag in the communities_requests_to_join_revealed_addresses table. 

This airdropAddress is used by the owner to know which address to use when airdropping
2023-07-14 13:33:47 -04:00
Andrea Maria Piana 1a9742a3c7 Remove unsopported DROP statement 2023-07-14 08:23:38 +01:00