Commit Graph

1070 Commits

Author SHA1 Message Date
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
frank fee033fadb
support mention Non-Latin nickname (#3641)
* support mention non-Latin nickname

* use IndexRune instead of Index

* fix mobile issue #15524

* add another test case
2023-06-21 14:42:14 +08:00
Pascal Precht bf64f97d5a feat: introduce `CheckAllCommunityChannelsPermissions()` API
This API is used to get a permission status of all channels of a given
community.

Clients can use this API to get the provided information for all
community channels with a single RPC call instead of doing one call
for each channel separately.
2023-06-20 10:06:44 +02:00
Pascal Precht 7938297606 feat: introduce `CheckChannelPermissions` API
Similar to `CheckPermissionToJoin()` we now get
a `CheckChannelPermissions()` API.

It will rely on the same `PermissionResponse` types, but gives
information about both `ViewOnlyPermissions` and
`ViewAndPostPermissions`.
2023-06-20 09:42:10 +02:00
Pascal Precht f702b54d08 fix: don't check permissions if revealed accounts aren't legit
This seems to be a bug that was introduced when two features, admin
permissions and "always reveal wallet accounts" where merged.

We need to make sure we **first** check the revealed accounts and only
**then** do we perform permission checks on them. Otherwise we can run
into scenarios where fake addresses are used and users will be accepted
to the community.
2023-06-19 15:27:10 +02:00
Pascal Precht a36202ff30 fix: don't return with error in permissions check when no chain IDs are
found

Turns out that, when we return with an error, instead of
a non-statisfied check permissions response, we can run into cases where
members that should be kicked are not kicked.
2023-06-19 15:26:42 +02:00
Pascal Precht 05e67b1838 fix: add missing private field when converting permission request 2023-06-19 15:26:42 +02:00
frank 0fcf3abd83
Improve/mention input segments (#3631)
* improve calculate input segments relate to mention feature

* bump version

* rename variable
2023-06-19 19:08:45 +08:00
Boris Melnik 1eb92a19a2
feat(communities): Adds muting interval to community (#3549) 2023-06-17 11:19:05 +03:00
frank 9e7f1338f0
refactor function diffText (#3615) 2023-06-16 23:09:37 +08:00
Mikhail Rogachev 51e3d800bb
fix: save revealed accounts regardless of permissions granted (#3609) 2023-06-16 11:10:32 +04:00
Michal Iskierko ccde92377d feat(BurnCollectibles): Add burn collectibles functionality
Change smart contract with new API.
Update gas amount for deployment.
Add Burn() and EstimateBurn() functions.
Add RemainingSupply() functions.

Issue #10816
2023-06-15 15:38:19 +02:00
Andrea Maria Piana 8015cc3e3b Handle race condition when sending envelopes
It happens that an envelope is sent before it's tracked, resulting in
long delays before the envelope is marked as sent.
This commit changes the behavior of the code so that order is now
irrelevant.
2023-06-15 11:28:19 +01:00
Mykhailo Prakhov e058b50a2e
feat: community admin permission functionality (#3569)
* feat: community admin implementation

* fix: code review fixes

* chore: request admin permissions in CheckPermissionToJoin, unit test fix
2023-06-14 10:15:46 -04:00
Pascal Precht 3f231f53e3 Ensure `ChatIds` are handled by token permission requests 2023-06-13 13:42:48 +02:00
mprakhov 83ed3e5ede fix: allow to set token permission as a private 2023-06-13 13:42:48 +02:00
mprakhov 6bc8765d39 chore: new CommunityTokenPermission types 2023-06-13 13:42:48 +02:00
Patryk Osmaczko a402b28b9f chore: resume archives import with delay
closes: status-im/status-desktop#10937
2023-06-13 08:38:15 +02:00
Andrea Maria Piana 37653638bc Make sure the image URL is returned when a replied message is deleted
When we reply to our own message with an image, we didn't set the URL of
the image of the message, which resulted in the image not being
displayed correctly.
2023-06-12 19:22:26 +01:00