Commit Graph

266 Commits

Author SHA1 Message Date
Ibrahem Khalil be8568e174
Community member joins the community if he sends a request to join an… (#4321) 2023-12-09 14:46:30 +02:00
Mikhail Rogachev 238a6e2f2d
Fix: Empty community tags in always empty slice, not nil (#4420) 2023-12-08 15:13:36 +07:00
Mykhailo Prakhov fe604b2806
fix: tokenMaster does not have members revealed addresses (#4425) 2023-12-07 17:27:14 +01:00
Mykhailo Prakhov 04c533b8d5
chore: API for getting all non-approved requests to join for all communities (#4422) 2023-12-05 15:50:45 +01:00
Mykhailo Prakhov 058120fad9
chore: parse all non confirmed requests to join of the community during getting all communities (#4409) 2023-12-04 19:20:09 +01:00
Patryk Osmaczko 9820acd74d refactor(communities)_: delegate Community creation in Persistence
In persistence.go, the lack of sufficient knowledge for constructing
fully initialized Community objects required clients to manually call
`initializeCommunity`. This commit addresses the issue by delegating
Community creation to Manager. It also removes queries and logic
duplication.
2023-12-04 12:41:39 +01:00
Mykhailo Prakhov b9197510b1
fix: use community controlNode pubkey instead of community ID for verifying the received community data signer (#4411) 2023-12-04 10:56:54 +01:00
Mikhail Rogachev 317ad2f906
feat: Ignore AC notifications created before the request to join the community (#4385)
* fix: Ignore AC notifications created before the request to join the community

* review fixes
2023-11-29 19:28:04 +04:00
Mykhailo Prakhov 19464eb345
feat: show activity center notification if user must reveal addressed to join/rejoin the community (#4373)
- show activity center notification if user must reveal addressed to join/rejoin the community
- fixed unit test, added validation that ex-owner receive AC notification
2023-11-27 10:54:46 +01:00
Mykhailo Prakhov 5cd20ded4e
chore: fix sending request to join msg's to the new owner (#4371) 2023-11-23 16:58:43 +01:00
Richard Ramos d198ac63fc fix: find free port for torrent 2023-11-22 16:41:27 -04:00
Richard Ramos c012f94681 fix: send request on non protected topics, and add missing shard information on invite 2023-11-18 12:12:06 -04:00
Vitaly Vlasov 1794b93c16 Always set PubsubTopic in filters 2023-11-18 02:26:34 +02:00
Dario Gabriel Lipicar e17d4606b1 fix: implement cancellable collectibles requests 2023-11-17 10:35:30 -03:00
Patryk Osmaczko 2c55b9c676 feat: cache curated communities in db
closes: status-im/status-desktop#12277
2023-11-16 17:21:28 +01:00
Igor Sirotin a178d724b1
fix: correct parsing shared url without data (#4283) 2023-11-10 16:33:37 +00:00
richΛrd 2c954d42cf
feat: replace DefaultPubsubTopic by Shard 32 (#4161) 2023-11-09 20:29:15 -04:00
Mykhailo Prakhov b15fa6d2c8
fix: promote self to community control node event if we are not a community member (#4270) 2023-11-07 14:18:59 +01:00
Patryk Osmaczko 4fddcb54ff refactor: extract Community.ChatID 2023-11-04 00:11:40 +01:00
Patryk Osmaczko 667e427b63 refactor: base community key actions evaluation on Encrypted() property 2023-11-04 00:11:40 +01:00
Patryk Osmaczko 953ed4c8e4 chore: update directory abi and addresses
closes: status-im/status-desktop#12569
2023-11-03 17:56:21 +01:00
Patryk Osmaczko 25f25e9853 chore: populate Community with PubsubTopicPrivateKey
part of: status-im/status-desktop#12408
2023-11-03 11:27:43 +01:00
Sale Djenic 11a3612290 feat: support signing of a join/edit community request from within the app or keycard 2023-11-03 07:49:01 +01: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
Patryk Osmaczko 627ac9449b refactor: remove always nil `shard` parameter in `HandleCommunityDescriptionMessage` 2023-10-31 10:03:31 +01:00
Richard Ramos c1a6771977 fix: non protected pubsub topic for communities 2023-10-30 15:47:32 -04:00
Jonathan Rainville 0cac2af1db
fix(community): getting kicked out of a community should still spectate (#4217)
Fixes https://github.com/status-im/status-desktop/issues/12558

When getting kicked out of  a community, before we used to leave the community completely, but just keep the filters on.
That created a problem when reopening the app, because the community disappeared and could even create a problem in desktop where it tried to open the last opened community but it's no longer there.

The fix now is that when getting kicked out, we instead just remove ourselves from the community and set Joined to false, but we keep the community spectated.
2023-10-27 15:20:08 -04:00
Patryk Osmaczko e304fe3344 chore: enable community rekey loop 2023-10-27 16:29:26 +02:00
Patryk Osmaczko 445135eb94 fix: ensure receivedMessage.CommunityID in chat message handler is set
This enables clients to obtain invitation's community ID even when
description processing is queued.

part of: status-im/status-desktop#12481
2023-10-25 20:10:01 +02:00
Patryk Osmaczko 3452eb72a8 refactor: remove community invitation only access 2023-10-25 17:34:37 +02:00
Patryk Osmaczko b262d7e88c refactor: rename Community.OnRequest() -> AutoAccept() 2023-10-25 17:34:37 +02:00
Patryk Osmaczko b321f28c9d refactor: update community access enum naming 2023-10-25 17:34:37 +02:00
Shinnok 3805662a18
fix(messenger_communities): block messages and reactions to token gated or spectated communities (#4064)
Which specifies that if a user is not a community member & a
chat member, he can't post, react or pin messages in that chat.

Notes:
- also fix&cleanup associated failing tests.
- refactor Community.CanPost() to reflect the new requirement.
- grant code is not fully implemented and is to be removed later.

Fixes https://github.com/status-im/status-desktop/issues/11915
2023-10-25 10:26:18 -04: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 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
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 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 0881d8cdb0 Add queue for processing community description & configurable control node 2023-10-17 21:00:24 +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
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 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
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
Patryk Osmaczko 1410b1e422 fix: ensure community channels are dehydrated on publish 2023-10-10 20:11:31 +02:00