Commit Graph

1306 Commits

Author SHA1 Message Date
Andrea Maria Piana d3558d8e09
Disable waku test 2023-11-01 19:27:53 +00:00
Andrea Maria Piana fd76367be7
[Fixes: #4206] Don't remove filters if not needed
Filters were removed and recreated which resulted in a flaky test.
This was not needed as the filters didn't change, and they won't be
recreated if we reinstall the same filter.
2023-11-01 12:47:35 +00: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 e3a8f5630a chore: add `CommunityID` to `ProtectedTopic` 2023-10-31 10:03:31 +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
Andrea Maria Piana 85f8c92cde Delete processed messages & add tests
This commit adds a test for out of order messages, which were only
implicitly tested.
It also deletes them after being processed, otherwise they would be
reproceessed each time a message was sent
2023-10-30 14:11:29 +00:00
Andrea Maria Piana d47b5733c0
fix order of drop statement 2023-10-30 10:56:32 +00: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: #4170
2023-10-30 10:11:32 +00: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
Igor Sirotin a6d46756f5
fix(ImageUnfurler): set title for image links (#4215) 2023-10-26 17:52:52 +01:00
Teodor M. Ionita 4744ee899e Add TestPinMessageInCommunityChat, adjust pin permissions
Also check pin post permission a bit earlier for the sender, with
canPost() in sendPinMessage(), even though there is a later check down
the line in dispatchMessage().

Fixes #4138
2023-10-26 13:22:32 +03:00
frank 06a9fe4f81
fix: sync decision on join community request (#4190)
* fix: sync community request decision

* make generate

* simplify test

* make generate
2023-10-26 12:17:18 +08:00
Mohsen 27b770c41b
fix: publish group member info (#4184) 2023-10-25 21:11:04 +03: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
Jonathan Rainville 6e0d4e697f
chore(messenger_communities): use new name for community Access (#4210) 2023-10-25 13:33:49 -04:00
Cuteivist debf3b6e4d
feat: Added ERC20 community id (#4189) 2023-10-25 18:49:18 +02:00
Boris Melnik 8ae6e3035b
feat(discord): Import single channel from discord (#4160) 2023-10-25 12:32:21 -04: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
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