Commit Graph

1088 Commits

Author SHA1 Message Date
Mikhail Rogachev 1f3a860867
fix: ignore contact requests from mutual and dismissed contacts (#3754)
https://github.com/status-im/status-desktop/issues/11483
2023-07-14 17:37:38 +04:00
Andrea Maria Piana 1a9742a3c7 Remove unsopported DROP statement 2023-07-14 08:23:38 +01:00
Andrea Maria Piana 3f5f87d1d1 Don't panic if config is nil in community
I have encountered a crash in the app after syncing, looks like a
community has been created without a Config.
This crashes the app after the user logs in.
This commit prevents the app from crashing, but does not fix the
underlaying issue (that's something I will have to investigate).
Added tests to validate the behavior.

Check community exists
2023-07-14 08:23:38 +01:00
Andrea Maria Piana 7da855c0bf Use base test messenger suite 2023-07-13 14:01:55 +01:00
Andrea Maria Piana 23ca4ba204 Use base test messenger suite 2023-07-13 14:01:55 +01:00
Mikhail Rogachev 8bcc493477
Fix: mutual state messages behaviour (#3640)
* feat: don't remove sent mutual state messages on accepting a CR

* fix: don't send mutual state message for a new contact

* chore: move mutual state messages to `addContact`

* fix: use one chat for mutual state messages and contact requests

* fix: change `added` mutual state updatede messages to `accepted`

* feat: Use different content type for each mutual state event system message

* chore: use constants for mutual event system messages test, review fixes

* chore: fix tests related to local contacts map
2023-07-12 11:12:58 -04:00
Igor Sirotin 244b4273de
fix: don't store ourselves as a contact (#3627) 2023-07-12 12:46:56 +03:00
Michal Iskierko ff0628c23b feat(Collectibles): Handle ERC20 burn and mint
Modify API to handle also ERC20 tokens.
Modify community_tokens table - keep supply as string since string is easly convertible to bigint.BigInt.
Use bigint.BigInt for supply functions and fields.

Issue #11129
2023-07-12 10:41:17 +02:00
Sale Djenic 7063ad11aa chore: synchronization improvements applied to keycards
This is the second step of improvements over keypairs/keycards/accounts.
- `SyncKeycardAction` protobuf removed
- `SyncKeypair` protobuf is used for syncing keycards state as well as for all
keycards related changes
- `last_update_clock` column removed from `keypairs` table cause as well as
for accounts, any keycard related change is actually a change made on a related
keypair, thus a keypair's clock keeps the clock of the last change
- `position` column added to `keypairs` table, needed to display keycards in
the same order accross devices
2023-07-11 15:14:49 +02:00
Ibrahem Khalil 0c57890a84
[status-mobile-16467] Fix delete for me on receiver side using wrong chatID (#3732) 2023-07-10 22:26:32 +03:00
Jonathan Rainville 2c275058ad
feat(community): add api to edit shared address (#3723) 2023-07-10 10:11:37 -04:00
Jonathan Rainville e9d8f4cab2
feat(communities): enable RequestCommunityInfo to use a privateKey (#3681) 2023-07-07 14:26:38 -04:00
Patryk Osmaczko 2613064356 chore: remove unused `applicationLayer` parameter of `HandleMessages` 2023-07-07 16:33:44 +02:00
Andrea Maria Piana 5a2757e785 Remove long running randomised test 2023-07-07 14:49:40 +01:00
Andrea Maria Piana c3ae0e98fe Enable lightclient 2023-07-07 14:49:40 +01:00
Patryk Osmaczko cd1ba1abaa refactor: remove unused parameter from `handleArchiveMessages` 2023-07-07 11:17:14 +02:00
Patryk Osmaczko 5bb787fadb chore: rename RawMessage.SkipEncryption->SkipProtocolLayer
`SkipEncryption` was misleading, as it wasn't really always related with
encryption.
2023-07-07 10:30:50 +02:00
Sale Djenic 61527f8c78 chore: synchronization improvements applied to keypairs/accounts
This is the first step of improvements over keypairs/keycards/accounts.
- `SyncKeypairFull` protobuf removed
- `SyncKeypair` protobuf is used for syncing all but the watch only accounts
- `SyncAccount` is used only for syncing watch only accounts
- related keycards are synced together with a keypair
- on any keypair change (either it's just a keypair name or any change made over an
account which belongs to that keypair) entire keypair is synced including related keycards
- on any watch only account related change, that account is synced with all its details
2023-07-05 14:41:26 +02:00
Pascal Precht 4305147f7a feat: add cropping support for community token assets
This commit extends the `AddCommunityToken` API to also expect an
optional `CroppedImage`, which will be used instead of the `ImageBase64`
path provided by `CommunityToken`, to calculate the actual base64
encoded image.
2023-07-05 11:46:23 +02:00
Mikhail Rogachev 511d6bfc54
feat: add parsing for new links format (#3665)
* feat(share-links): Add protobuf and encode/decode url data methods

* feat(new-links-format): Adds generators for new links format

* feat: add parsing for new links format

* feat: add messenger-level pubkey serialization and tests

* feat: fix and test CreateCommunityURLWithChatKey

* feat: impl and test parseCommunityURLWithChatKey

* feat: fix and test CreateCommunityURLWithData

* feat:  impl and test parseCommunityURLWithData (not working)

* feat: UrlDataResponse as response share urls api

* feat: impl& tested ShareCommunityChannelURLWithChatKey

* feat: impl & tested ParseCommunityChannelURLWithChatKey

* fix: bring urls to new format

* feat: add regexp for community channel urls

* feat: impl & test contact urls with chatKey, Ens and data

* fix: encodeDataURL/encodeDataURL patch from Samyoul

* fix: fix unmarshalling protobufs

* fix: fix minor issues, temporary comment TestParseUserURLWithENS

* fix: allow url to contain extra `#` in the signature

* fix: check signatures with SigToPub

* chore: lint fixes

* fix: encode the signature

* feat: Check provided channelID is Uuid

* fix(share-community-url): Remove if community encrypted scope

* fix: review fixes

* fix: use proto.Unmarshal instead of json.Marshal

* feat(share-urls): Adds TagsIndices to community data

* feat: support tag indices to community url data

---------

Co-authored-by: Boris Melnik <borismelnik@status.im>
2023-07-04 17:48:52 +04:00
Pascal Precht 8184ae62ed fix: mark community as no longer spectated when joined
Fixes https://github.com/status-im/status-desktop/issues/11334
2023-07-04 15:35:37 +02:00
Andrea Maria Piana 55f7ac420d Make sure image URL are preserved when deleting a message for me
When deleting a message for me, the image url wasn't preserved,
resulting in the image disappearing on the client side.
This commit adds the processing of returned messages so that the image
is preserved.
2023-06-30 11:12:26 +01:00
Michal Iskierko 6ec50d52aa feat(AssetsDeployment): Assets deployment
- Add ERC20 contract
- Add decimals field to community_tokens db table
- Adjusting API to handle assets deployment
- Add decimals field to CommunityTokenMetadata

Issue #10987
2023-06-29 16:10:05 +02:00
Andrea Maria Piana 40a59b3aca Allow passing nameserver on login
Nameserver is passed by the OS on creation/restore, this commit adds the
ability to pass it at login time.
We don't want to store it on disk since that's bound to change, and
currently there's a bug on golang that prevents getting the DNS from the
system on android.
2023-06-29 13:05:46 +01:00
Andrea Maria Piana 190094e40d Correctly shutdown messengers 2023-06-29 13:04:49 +01:00
Andrea Maria Piana d91d11a01c Call before dispatch for group chat messages 2023-06-29 13:04:49 +01:00
Andrea Maria Piana db56132d01 Avoid publishing on a channel if manager stopped 2023-06-29 13:04:49 +01:00
frank bbb17c6ce8 fix: unable to perform backup 2023-06-29 13:04:49 +01:00
frank 09c5223d77
fix: ROW_NUMBER() not work on ios for some reason (#3687) 2023-06-29 18:45:57 +08:00
Roman Volosovskyi 18a0bc3130
Set installation name on account creation and pairing 2023-06-29 10:14:12 +02:00
Patryk Osmaczko c53723705c chore: add TestBecomeMemberPermissions integration test 2023-06-29 10:02:09 +02:00
Patryk Osmaczko 0bf114bc3c chore: cleanup communities_messenger_token_permissions_test 2023-06-29 10:02:09 +02:00
Pascal Precht db65d42912 fix: default to attaching all support chainIDs in membership requests
There's only one scenario in which a `RevealedAccount` will have an
empty `ChainIDs` list attached to it:

When the community in question requires users to satisfy certain
criteria to join, and the user's wallet does not own the necessary funds
on any of the supported chains.

If there are **no** permissions to join on the community, then we want
to reveal all (selected) accounts with all supported chainIDs.

This is necessary so that, once the community *does* become
permissioned, it'll have address + chain information from all joined
members.

Closes: https://github.com/status-im/status-desktop/issues/11255
2023-06-29 08:46:02 +02:00
Sale Djenic 5738cf7e21 keypairs pairing details added to local pairing 2023-06-28 14:04:47 +02:00
Sale Djenic 413120e299 feat: local pairing - adding support for syncing from a profile which is migrated to a Keycard 2023-06-28 14:04:47 +02:00
Khushboo-dev-cpp e1004b4aec
feat: Add new settings for include watch-only accounts (#3676) 2023-06-28 12:05:06 +02:00
Patryk Osmaczko a2a2e61163 refactor: extract communities_messenger_token_permissions_test
`communities_messenger_test` was unnecessarily polluted with passwords
and addresses.
2023-06-28 07:56:51 +02:00
Ibrahem Khalil fc353d5dff
Only send PNs to chats that are unmuted (#3673) 2023-06-27 19:19:21 +04:00
Pascal Precht b8b402da8d feat: store check channel permission responses
This commit adds new tables to the database and APIs in `Messenger` and
communities `Manager` to store `CheckChannelPermissionsResponse`s.

The responses are stored whenever channel permissions have been checked.

The reason we're doing this is so that clients can retrieve the last
known channel permission state before waiting for onchain checks to
finish.
2023-06-27 12:13:59 +02:00
Pascal Precht a8678575a7 fix: admins are not allowed to kick or ban other admins 2023-06-27 09:14:26 +02:00
Andrea Maria Piana efad2ef6a2 Add BeforeDispatch callback 2023-06-26 13:36:20 +01:00
Andrea Maria Piana 14e3eafaeb Handle async raw message confirmations
Sometimes confirmation for raw messages are received before the record
is actually saved in the database.

In this case, the code will preserve the Sent status.
2023-06-26 13:36:20 +01:00
Alexander 83238283b4
Updates ring width and palette to match the designs (#3671) 2023-06-26 13:17:59 +01:00
Patryk Osmaczko 783a6b9153 fix: remove rekeying unencrypted communities 2023-06-23 16:33:58 +02:00
MishkaRogachev ecf493e6cd chore: less flaky AccountManagerMock for community tests 2023-06-23 14:54:44 +01:00
Andrea Maria Piana 6e19098dee Run tests separately, make sure messenger is shutdown, fix torrent test 2023-06-23 11:30:04 +01:00
Jonathan Rainville 9c596343be
feat(communities): enable selecting addresses to pass when joining (#3656)
Improve `RequestToJoinCommunity`  to accept `Addresses` in the request. If `Addresses` is not empty, we then only pass to the owner the selected addresses. The others are ignored.
Does not validate that the addresses in the slice are part of the user's wallet. Those not part of the wallet are just ignored.
2023-06-22 14:59:07 -04:00
Boris Melnik 3e7d1a5f34
fix(migration): Fixes mute_till migration (#3653) 2023-06-22 18:49:58 +03:00
Ibrahem Khalil d3e650d5e5
Make chat muting only works on one chat and not to completely block PNs from a user (#3647) 2023-06-22 08:06:32 +03:00
Mikhail Rogachev 2fb87b5f0d
Chore: improve mocking for community tests (#3637)
* chore: different wallet addresses for different users in community tests

* chore: fix naming for account.Manager interface
2023-06-21 16:13:31 +04:00