Commit Graph

1333 Commits

Author SHA1 Message Date
Igor Sirotin c6ff315dfc
fix: set pubsubTopic in request community info from mailserver (#4194) 2023-10-25 11:13:35 +01: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
Igor Sirotin e83be20def
fix: shared links and link previews contain full self information (#4169)
* fix(StatusUnfurler): allow contact without icon
2023-10-24 11:15:32 +01:00
frank 311e463eed
make lint-fix ignore for messenger_handlers.go (#4181)
* make lint-fix ignore messenger_handlers.go

* make lint-fix
2023-10-24 11:42:56 +08:00
Patryk Osmaczko dc6fe5613a fix: decouple permissions reevaluation from torrent client readiness 2023-10-22 21:50:41 +02:00
Patryk Osmaczko bd245ab45b refactor: unify `Owned()` and `ControlledCommunities()` 2023-10-22 21:50:41 +02: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
frank 624996a7e9
only sync decisions/state of AC notifications (#3979) 2023-10-22 17:41:20 +08:00
Patryk Osmaczko eb232d4680 fix: use `messengerSignalsHandler` instead of global object 2023-10-20 18:09:12 +02:00
Patryk Osmaczko 148721b680 chore: add `WaitOnSignaledMessengerResponse` test utility 2023-10-20 18:09:12 +02:00
Patryk Osmaczko fc8ce915af fix: prevent nil dereference in `IsControlNode` for existing communities 2023-10-19 22:11:53 +02:00
Patryk Osmaczko 05db628406 chore: omit `CommunityDescription` queuing if owner is already verified 2023-10-19 22:11:53 +02:00
Mykhailo Prakhov 74c13fd363
fix: setup owner as CommunityDescription signer after minting community owner token (#4168) 2023-10-19 13:03:41 +02:00
Patryk Osmaczko 3292c1c883 feat: rekey community on control node change
closes: status-im/status-desktop#11963
2023-10-18 22:32:29 +02:00
Patryk Osmaczko 246b68a8c0 refactor: rename and simplify `UpdatePrivateKeyAndControlNode` 2023-10-18 22:32:29 +02:00
Patryk Osmaczko 6c4ce3dedf fix: make `testJoinedPrivilegedMemberReceiveRequestsToJoin` less flaky 2023-10-18 17:11:20 +02:00
Patryk Osmaczko a9cde06e44 refactor: simplify community requests logic
With the recent introduction of pending states, the community requests
logic became more complex. This commit simplifies the flow and
appropriately delegates logic to its corresponding abstraction levels:
messenger, manager and community. Additionally, it eliminates
redundancies in notifications and request-saving mechanism.
2023-10-18 17:11:20 +02:00
Patryk Osmaczko b932cc97bb fix: ensure owners and token masters receive revealed addresses with
request to join
2023-10-18 17:11:20 +02:00
frank 3326362b90
optimised finding server cert (#4148)
* optimised finding server cert

* make sure `close(done)` invoked only once

* remove sleep

* resolve IDE warning

* refactor for findServerCert
2023-10-18 14:17:49 +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 (#4102)
Fixes #3547
2023-10-17 09:24:15 -04:00
Igor Sirotin 036173cfed
fix: always unfurl status links (#4159) 2023-10-17 08:25:45 +01:00
Michal Iskierko f2464cccfd fix: HandleCommunityTokensMetadata
Add all tokens in the loop.
Get MaxSupply instead of TotalSupply

Issue #12104
2023-10-15 20:32:47 +02:00
Igor Sirotin 176bdd297d
feat: url unfurling settings (#4128) 2023-10-13 15:31:56 +01:00
Igor Sirotin aded258ccb
feature: Unfurl status links (#4033) 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 (#4153) 2023-10-13 11:23:24 +02:00
Jonathan Rainville 466dccc809
feat(backup): add 1-1 chats and group chats to backup (#4073)
* 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
Richard Ramos de5c7b8e5b feat: shard fleet
Adds shard.test fleet and changes the non protected shard index to 64
2023-10-12 17:07:57 -04:00
Richard Ramos ace5b26137 fix: do not send the requests to join and cancel in the protected topic 2023-10-12 17:07:57 -04:00
Richard Ramos 350a952116 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
2023-10-12 17:07:57 -04: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
Alexander e17a247d0f
Revert unviewed message count changes (#4101) 2023-10-12 14:27:56 +02:00
Patryk Osmaczko 653df822da fix: derive community.Encrypted() from permissions 2023-10-12 01:45:33 +02:00
Jonathan Rainville 11f670636b
fix(communities): set state correctly on request accept or decline (#4144)
Fixes https://github.com/status-im/status-desktop/issues/12413
2023-10-11 15:55:52 -04:00
Vitaliy Vlasov 1fedf5503a Use WakuV2 in MessengerCommunitiesTokenPermissionsSuite 2023-10-11 12:56:38 +03:00
Patryk Osmaczko 1410b1e422 fix: ensure community channels are dehydrated on publish 2023-10-10 20:11:31 +02:00
Jonathan Rainville 736779d94b
fix(communities): make sure to join the community if we are a member (#4118)
Fixes https://github.com/status-im/status-desktop/issues/12368
2023-10-10 14:03:55 -04:00
Igor Sirotin 646e96a4b2 fix: flaky Test_ActiveContactRequestNotification 2023-10-07 09:44:40 +01:00
Igor Sirotin d878884eb5 chore: test suite `activity_center_persistence_test` 2023-10-07 09:44:40 +01:00
Igor Sirotin da3df63eb1
chore: improve requesting contact/community info from mailserver (#4110) 2023-10-06 17:30:22 +01:00
Andrea Maria Piana 9034f0a984 Update waku nodes 2023-10-05 18:20:44 +01:00
Dario Gabriel Lipicar 2bcf08f273 feat: use Alchemy API key for Ethereum main/goerli 2023-10-05 09:40:18 -03:00
Patryk Osmaczko bb7273cf6f feat: allow for pending community request state changes
iterates: status-im/status-desktop#11842
2023-10-05 09:24:45 +02:00
Mikhail Rogachev a17ee052fb
feat: Introduce KickedPending and BannedPending states (#3948)
* feat: introduce KickedPending state for community members

* feat: tests for ban/unban pending states

* fix: remove pending And banned members from public serialization

* feat: add check for banning and kicking privileged users

* fix: process only first event when obtaining PendingAndBannedMembers

* fix: review fixes

* fix: proper conditions for kicking and banning checks

* Fix: fix tests after rebase
2023-10-04 23:47:22 +03:00
Jonathan Rainville eb6ed5ebae
fix(test): fix flaky permission test (#4080)
Fixes #4069
2023-10-04 10:14:11 -04:00
Michal Iskierko c85a110a31 feat(CommunityTokens): New deployment contracts and handling signer pub key
New contracts and contract go functions.
Adjust owner&master tokens deployment flow.
Create deployment signature.
CommunityTokens API for handling signer pubkey.

Issue #11954
2023-10-04 11:33:57 +02:00
Vitaliy Vlasov e1354016a0 Comment away TestMessengerCommunitiesTokenPermissionsSuite 2023-10-04 00:39:33 +03:00
Patryk Osmaczko 9d374bcadc chore: use lamport timestamp for communities
closes: status-im/status-desktop#11961
2023-10-03 21:45:28 +02:00
Mohsen c88b6e53af
[#17288] fix: Mention is displayed as public key in PNs (#4079) 2023-10-03 19:29:27 +03:00
Patryk Osmaczko 53423e58ba fix: use proper migrations for protocol's test database
- use `appdatabse.DbInitializer{}` in tests to ensure consistent migrations

- remove protocol's open database functions due to improper
  initialization caused by missing node config migration

- introduce `PushNotificationServerConfig` to resolve cyclic dependency
  issues
2023-10-03 15:11:58 +02:00
Jonathan Rainville 17cef5f211
feat(messenger_communities): only send updated curated communities (#4056)
Fixes #4029
2023-09-26 12:47:50 -04:00
Patryk Osmaczko 475036e9f2 fix: stop sending channels members over the wire
fixes: status-im/status-desktop#12114
2023-09-26 13:01:30 +02:00
Jonathan Rainville 2afe5a269d
feat: up mention count for 1-1 messages each 2 min (#4035) 2023-09-25 11:29:36 -04:00
Dario Gabriel Lipicar ba5cd9c1a4 feat(wallet): add community info to collectibles 2023-09-22 17:55:30 -03:00
Mykhailo Prakhov 2b53d71708
fix: Prevent (reject event <-> resend event) loop (#4055) 2023-09-22 19:57:27 +02:00
Jonathan Rainville 0f065a9f07
chore(messenger_communities): up unknown curated communities timeout (#4046) 2023-09-22 11:14:06 -04:00
Alexander 717e0f9ba5
Optimized counter increment logic for 1-1 chat messages (#3889)
* Optimized counter increment logic for 1-1 chat messages

* Updated

* Updated condition
2023-09-22 12:31:35 +02:00
Igor Sirotin a89dc020e1
fix: don't save sender as contact for certain message types (#4052) 2023-09-20 17:26:04 +01:00
Mykhailo Prakhov db9adb631f
feat: share requests to join and revealed addresses with privileged roles (#3951)
- 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
Boris Melnik d3c4ba315a
feat(albums): Adds album of images to AC notification (#3977) 2023-09-19 20:17:11 +03:00
frank 6bcf5f1289
Removed settings.Usernames and reactivate PreferredName (#3964)
* 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
Igor Sirotin daf3fc79bf
fix: Discord import tool various fixes for pinned messages (#4001) 2023-09-15 15:19:10 +01:00
Boris Melnik 5e8300d6a1
fix(archives): Skip importing the archives for community when user not a member (#4006) 2023-09-15 10:42:28 +03:00
Sale Djenic 6894295ac3 feat: register and maintain keycard local pairing file by `status-go`
Closes: #4003
2023-09-13 17:15:32 +02:00
Anthony Laibe 740f66a8ff fix: upsert community customer token 2023-09-12 10:40:45 +02:00
Sale Djenic c5fd1ee2c4 fix: converting profile to/from keycard/regular keypair handling 2023-09-07 13:02:25 +02:00
Igor Sirotin 5422b867f3
Hotfix: mark `Chat` and `Pin` archive messages as seen (#3992) (#3999) 2023-09-07 13:33:20 +03:00
yqrashawn b168018eaf
feat: enable passing ring width from mobile (#3903) 2023-09-01 16:17:46 +08:00
Ibrahem Khalil 22ec4ac586
Link previews not working on message edit (#3974) 2023-08-31 10:21:25 +03:00
Andrea Maria Piana 2b8543dfae Set compressed key as alias on contact 2023-08-30 15:11:26 +01:00
frank 347d875acb
fix: Rounded edges of color sections of identity rings (#3968)
* fix: Rounded edges of color sections of identity rings

* bump version
2023-08-30 19:39:58 +08:00
Sale Djenic fbcda780ec feat: handling migrating non profile keycard keypair to app on paired device 2023-08-30 10:17:19 +02:00
Sale Djenic 57dea7b08d fix: saving/updating a keycard updates the accounts' operability
This commit skips deleting a keystore file for account which are not marked as fully operable
and also skips deleting master key keystore file if a keypair is non operable. It also takes into
consideration the operable property of an account when adding/updating/handling a keypair/keycard.

u3
2023-08-30 10:17:19 +02:00
Jonathan Rainville f7b342bb07
feat(shared_addresses): save own shared addresses in DB (#3950) 2023-08-29 14:56:30 -04:00
Andrea Maria Piana 4b9517c0e2 Handle remove event out of order in private group chats
When we received a remove event from a private group chat out of order,
the chat would not be created.
This was causing some issues if later on we received the previous event.
This commit changes the behavior so that a chat is created.
2023-08-29 17:26:09 +01:00
Andrea Maria Piana 4fba5647d1
Use NewContractMaker for messenger 2023-08-29 14:17:49 +01:00
Andrea Maria Piana 6f4f57b7a8
Handle nil error on request to join 2023-08-29 13:04:00 +01:00
Andrea Maria Piana 8c41678520
Fix contract call for communities 2023-08-29 13:02:26 +01:00
Michal Iskierko 8425e6d238 feat(Collectibles): Change Collectibles service name to CommunityTokens.
Issue #12011
2023-08-29 11:01:01 +02:00
frank 38415849cd fix generate_handlers_template.txt 2023-08-28 14:17:33 +01:00
Richard Ramos d62a5736a5 fix: return default pubsub topic, and add more logs 2023-08-25 13:34:34 -04:00
frank 3837428384
continue process after `SaveSyncDisplayName` get `ErrNewClockOlderTha… (#3952)
* continue process after `SaveSyncDisplayName` get `ErrNewClockOlderThanCurrent`

* bump version
2023-08-25 22:28:26 +08:00
Sale Djenic abe43a83ae feat: added an activity center notification that a new keypair was added on a paired device 2023-08-25 11:59:28 +02:00
Richard Ramos d900974519 fix: code review 2023-08-23 13:56:00 -04:00
Richard Ramos f9ec588c4e feat: use protected topics for communities
refactor: associate chats to pubsub topics and populate these depending if the chat belongs to a community or not
refactor: add pubsub topic to mailserver batches
chore: ensure default relay messages continue working as they should
refactor: mailserver functions should be aware of pubsub topics
fix: use []byte for communityIDs
2023-08-23 13:56:00 -04:00
Patryk Osmaczko 8764170149 fix: expose token permission from events
Ensure token permission from events is returned by `tokenPermissions`.
2023-08-23 18:50:26 +02:00
Patryk Osmaczko 2131bd3881 fix: remove `fixupChannelMembers`
This manual migration causes problems because it updates
`CommunityDescription` withouth publishing it.
2023-08-23 18:50:26 +02:00
Sale Djenic e732000d31 fix: remove account if it's marked as removed in received `protobuf.SyncKeypair` message
When we switched to marking removed accounts, the handler remained unchanged. It kept
checking for the account existence in the received `protobuf.SyncKeypair` message, instead
of checking a removed flag.
2023-08-23 14:07:39 +02:00
Patryk Osmaczko a12e87dac6 feat: add pending state for token permissions
iterates: status-im/status-desktop#11852
2023-08-23 10:34:59 +02:00
Patryk Osmaczko a31dea7988 fix: improve stability of `TestReevaluateMemberAdminRoleInClosedCommunity` 2023-08-23 10:34:59 +02:00
Patryk Osmaczko 63131aebbc refactor: merge AddTokenPermission and UpdateTokenPermission 2023-08-23 10:34:59 +02:00
Mykhailo Prakhov 86d969727f
feat: share CommunityTokens between privileged users (#3931)
feat: sync CommunityTokens between privileged users
feat: restore PrivilegeLevel for synchronized CommunityToken
2023-08-22 19:48:42 +02:00
Andrea Maria Piana 8dd1b66d69 Always use protobufs by reference & generate handlers 2023-08-22 12:08:54 +01:00
Anthony Laibe 9d782edb4d feat: wallet custom token with communities 2023-08-22 12:41:35 +02:00
Igor Sirotin 09a988607d
chore: Moved link preview unfurlers to a separate package (#3917)
* MessengerLinkPreviewsTestSuite
2023-08-21 22:31:32 +03:00
Icaro Motta 084d4bac0c
feat: Unfurl image URLs (#3901)
This commit adds support for unfurling static image URLs (not GIFs, not animated WebPs), such as https://placehold.co/600x400@2x.png. It also compresses images before returning them as data URIs to clients.

About compression: the compression strategy leverages the existing function images.CompressToFileLimits. A more comprehensive logic to consider the possibility of multiple image URLs being unfurled simultaneously is yet to be implemented.

Closes #3761
2023-08-21 16:48:07 +00:00
Jonathan Rainville 3bf0bed78d
Fix pending join requests + API to get them (#3902)
Needed for https://github.com/status-im/status-desktop/issues/11851
2023-08-18 15:52:13 -04:00
Jonathan Rainville 5272f99b59
feat(communities): add addresses to check channel permissions functions (#3910) 2023-08-18 15:50:23 -04:00
Mykhailo Prakhov d1db60918d
feat: owner and token master permissions (#3912) 2023-08-18 17:29:44 +02:00