2
0
mirror of https://github.com/status-im/status-go.git synced 2025-01-12 15:45:07 +00:00

275 Commits

Author SHA1 Message Date
Igor Sirotin
9fa396e797
chore: nix-shell make generate () 2024-02-27 19:35:43 +00:00
Michal Iskierko
df930b1d73 feat: New field in TokenCriteria proto
AmountInWei will have a wei-like units.
Amount field becomes deprecated because it kept string with float value.

Comparison (in case of Decimals == 5):
Amount (deprecated) = "1.2"
AmountInWei = "120000"

Issue 
2024-02-27 16:25:26 +01:00
Patryk Osmaczko
eeaff0d3e3 fix: sync&backup channels encryption keys
fixes: 
2024-02-26 16:41:30 +01:00
Mikhail Rogachev
7cc4c12642
Feat: Add social links to the profile showcase ()
* 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 ()
feat: delete all messages for banned member and ban/unban AC notifications
2024-02-22 11:25:13 +01:00
Pablo Lopez
3f19972c8e
enable custom community storenodes ()
* enable custom community store nodes

* fix

* fix

* fix

* fix

* cleanup

* fix

* migration

* fix

* cleanup

* fix

* cleanup

* fix

* fix

* cleanup

* message to update the community storenodes

* rename

* fix test

* wait for availability only if global storenode

* fix test

* fix typo

* sync community storenodes

* remove unused

* add tests

* fix imports

* fix todo

* unused

* pr comments

* pr feedback

* revert merge deleted

* fix lint

* fix db and perform ms request

* typo

* fix log

* fix go imports

* refactor handle message

* cleanup public message

* add tests

* fix test

* cleanup test

* fix test

* avoid making one file to big to keep codeclimate from complaining

* fix lint

* revert

* Update protocol/storenodes/database.go

Co-authored-by: richΛrd <info@richardramos.me>

* Update protocol/messenger_mailserver_cycle.go

Co-authored-by: richΛrd <info@richardramos.me>

* PR comment

* fix tx

* proto files

* pr comment

---------

Co-authored-by: richΛrd <info@richardramos.me>
2024-02-20 17:49:39 +02:00
Igor Sirotin
85c0e282ae
feature: profile showcase preferences sync&backup () 2024-02-17 18:07:20 +00:00
Igor Sirotin
add46fbda0
chore: make generate with nix-shell () 2024-02-16 12:48:27 +00:00
Mikhail Rogachev
526e3d74f1
Feat: proof of membership for profile showcase communities ()
* 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
Mikhail Rogachev
3ea2002904
Feat: Modify grants for profile showcase use ()
* chore: regenerate proto binaries

* feat: remove unused grant code for community's canPost
2024-02-11 15:11:04 +03:00
Andrea Maria Piana
605fe40e32 Fix encryption metadata issues
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 
2024-01-30 12:14:54 +01:00
Mikhail Rogachev
fb98ee93ce
Correct profile showcase tokens and collectibles ()
* 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
Godfrain Jacques
5f6f7e502d
(fix/status-go) fix profile picture update/removal ()
This PR fixes [9947]() and contains :

    - Commit to fix the changing of custom picture and having the change
      reflected on contact's side
    - Commit to fix the deleting of picture and having the change reflected
      on contact's side
    - Rename confusing `ImageType` to `ImageFormat`
2024-01-24 12:09:28 -08: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 () 2024-01-21 12:55:14 +02:00
Dario Gabriel Lipicar
0d2c3cef7c feat: implement token management settings for collectibles 2024-01-18 11:46:35 -03:00
Sale Djenic
280f48877d chore(savedaddresses)!: favourite property removed and primary key updated
- favourite column removed from the saved_addresses table
- favourite property removed from the SavedAddress struct
- ens name removed from the primary key, the primary key now is composed of address and is_test columns
- ens parameter removed from wakuext_deleteSavedAddress
- wallet_getSavedAddresses moved to wakuext_getSavedAddresses (to keep them all in a single place)
- saved addresses related endpoints removed from the wallet service, even they logically belong there, a reason for that
is avoiding emitting sync message if one uses calls from the wallet service, while that's not the case in ext service. Once
we refactor this and introduce devices syncing mechanism in the wallet service, we should not only these but other wallet
related endpoints move there (removed: wallet_getSavedAddresses, wallet_addSavedAddress and wallet_deleteSavedAddress).

Affected area:
Saved addresses
2024-01-10 19:30:56 +01:00
Ibrahem Khalil
e1b52f9eae
Add joined at key to communities () 2024-01-09 20:36:47 +02:00
Godfrain Jacques
9d8b55e3d9
This PR (status-go) fixes ()
- Add album_images column to the user_messages table
- Migrate the database
2024-01-08 10:18:57 -08:00
Cuteivist
7814f39cd7
feat: Add advanced token settings () 2024-01-05 12:12:53 +01:00
Sale Djenic
a8357dceac feat: color field added to saved address
- `color` column added to `saved_addresses` table
- `colorId` parameter exposed via `SavedAddress` struct

Affected area - saved addresses.

The following endpoints return or receive `SavedAddress` instance:
- `UpsertSavedAddress`
- `GetSavedAddresses`
- `AddSavedAddress`
2023-12-29 10:39:52 +01:00
Patryk Osmaczko
1d3c618fb4 feat: encrypt CommunityDescription fields
Extended `CommunityDescription` with a `privateData` map. This map
associates each hash ratchet `key_id` and `seq_no` with an encrypted
`CommunityDescription`. Each encrypted instance includes only data
requiring encryption.

closes: 
closes: 
closes: 
2023-12-22 18:17:06 +01:00
Mikhail Rogachev
1317f0c796
hotfix: Update profile showcase proto () 2023-12-22 22:43:27 +07:00
Mykhailo Prakhov
134137f9c5
feat: implemented a mechanism to retrieve shard information for a given community ID ()
* feat: a mechanism to retrieve shard information for a given community ID
2023-12-22 13:37:37 +01:00
Cuteivist
04873ef880
feat: token order API () 2023-12-04 11:18:05 +01:00
Vitaly Vlasov
1794b93c16 Always set PubsubTopic in filters 2023-11-18 02:26:34 +02:00
Patryk Osmaczko
6bb806caad feat: introduce messages segmentation 2023-11-13 17:32:00 +01:00
Mikhail Rogachev
03c32f620f
feat: Profile showcase data sharing ()
* 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 () 2023-11-09 16:24:35 +00:00
frank
054356fed2
remove sync AC state () 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 ()
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
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: 
2023-10-30 10:11:32 +00:00
frank
06a9fe4f81
fix: sync decision on join community request ()
* fix: sync community request decision

* make generate

* simplify test

* make generate
2023-10-26 12:17:18 +08:00
Patryk Osmaczko
b321f28c9d refactor: update community access enum naming 2023-10-25 17:34:37 +02: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
Patryk Osmaczko
345851c396 feat: ensure unique control node across devices
closes: 
2023-10-22 21:50:41 +02:00
frank
624996a7e9
only sync decisions/state of AC notifications () 2023-10-22 17:41:20 +08:00
Patryk Osmaczko
0881d8cdb0 Add queue for processing community description & configurable control node 2023-10-17 21:00:24 +01:00
Jonathan Rainville
c8910d69fe
feat(pairing): sync 1-1 chats and groups on pairing devices ()
Fixes 
2023-10-17 09:24:15 -04:00
Igor Sirotin
176bdd297d
feat: url unfurling settings () 2023-10-13 15:31:56 +01:00
Igor Sirotin
aded258ccb
feature: Unfurl status links () 2023-10-13 13:25:34 +01:00
Khushboo-dev-cpp
ac813ef5d8
chore: Remove include watch only accounts settings as it is out dated and not needed anymore () 2023-10-13 11:23:24 +02:00
Jonathan Rainville
466dccc809
feat(backup): add 1-1 chats and group chats to backup ()
* feat(backup): add 1-1 chats and group chats to backup

* add active

* add clock

* add muted
2023-10-12 17:15:05 -04:00
richΛrd
ba5ed725ce
waku2: static shards ()
- 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
Patryk Osmaczko
653df822da fix: derive community.Encrypted() from permissions 2023-10-12 01:45:33 +02:00
Mykhailo Prakhov
db9adb631f
feat: share requests to join and revealed addresses with privileged roles ()
- share requests to join with new privileged roles during reevaluating member role
- share requests to join with new members, joined the community as TOKEN_MASTER, ADMIN
- share requests to join revealed addresses to ADMINS and TOKEN_MASTERS
- refactor common test functionality to make them more predictable
- removed unused CommunityToken protobuf
2023-09-20 10:37:46 +02:00
frank
6bcf5f1289
Removed settings.Usernames and reactivate PreferredName ()
* sync preferred name;
remove settings.usernames

* update account name when handle settings.preferred_name from backup message

* fix Error:Field validation for 'KeycardPairingDataFile' failed on the 'required' tag

* bump version

* rebase
2023-09-16 09:20:23 +08:00
Sale Djenic
6894295ac3 feat: register and maintain keycard local pairing file by status-go
Closes: 
2023-09-13 17:15:32 +02:00
Ibrahem Khalil
22ec4ac586
Link previews not working on message edit () 2023-08-31 10:21:25 +03:00