Partially implements https://github.com/status-im/status-mobile/issues/14712Fixes#14744
### Summary
This PR implements the first, among what will probably be many different kinds of membership notifications. For this PR, I started with implementing a particular flow for private group chats because it's already supported by `status-go` (albeit I had to make some changes, see [PR in status-go](https://github.com/status-im/status-go/pull/3088).
1. `A` and `B` are mutual contacts.
2. `A` creates a private group chat with `B` as member.
3. `B` sees the group chat in the app, but doesn't interact with it.
4. `B` reinstalls the app (remember to back up the seed phrase).
5. `A` mentions `B` in the group chat.
6. `B` should see a group chat notification, which can be accepted/declined.
- [x] Also fixes#14744
### Demo
In the video I'm simulating the steps outlined in the *Summary*, but using the approach described in *Steps to test*, because it's way easier to iterate during development.
[demo.webm](https://user-images.githubusercontent.com/46027/212470798-c135d229-948d-4ba5-98db-ee73cc5495cd.webm)
### Review Notes
Some changes had to be made in `status-go` ([PR](https://github.com/status-im/status-go/pull/3088)), namely:
- According to [Figma](https://www.figma.com/file/eDfxTa9IoaCMUy5cLTp0ys/Shell-for-Mobile?node-id=3806%3A586901&t=xLTAjLXjG1UtorpI-0), users should be able to see `accepted` group chat notifications. Until now, `status-go` hardcoded that `accepted` notifications would *not* be returned in query results, and so it would be impossible to show them to users. This was changed and now the RPC endpoint accepts an additional filter. The implementation on the backend is backwards compatible so as to not break Status desktop.
- The `Membership` tab needs to display various types of notifications (group chat, community, etc), but the membership type doesn't exist on the backend. To overcome this constraint, this PR makes the membership type a logical/virtual type, i.e. a Clojure set of types. `status-go` was changed to support querying for multiple notification types (also backwards compatible).
#### Platforms
- Android
- iOS
### Steps to test
Please, follow the steps described in the Summary and you should be able to test.
But during development, I followed these steps (recommended by @cammellos). I documented them here for reference.
1. Checkout `feature/e2e` in status-go. Apply the diff below.
2. `cd cmd/e2e && ./e2e`
3. This will create a temporary account automatically, let's call it `A`.
4. On another device, create account `B`.
5. Follow the steps documented in bdc406ea2e/cmd/e2e/README.md (L2) in order for user `A` to create a group chat with `B` as member. Don't make `A` and `B` mutual contacts.
6. On `B`'s device, a notification should appear, and `B` should be able to accept or decline the "invitation" (actually *invitation* is another concept and related to another feature).
```diff
modified cmd/e2e/main.go
@@ -283,6 +283,11 @@ func defaultNodeConfig(installationID string) (*params.NodeConfig, error) {
nodeConfig.NetworkID = 1
nodeConfig.LogLevel = "ERROR"
nodeConfig.DataDir = "/ethereum/mainnet_rpc"
+ nodeConfig.HTTPEnabled = true
+ nodeConfig.HTTPPort = 8545
+ nodeConfig.HTTPHost = "localhost"
+ nodeConfig.HTTPVirtualHosts = []string{"localhost"}
+
nodeConfig.APIModules = "wakuext,ext,waku"
nodeConfig.UpstreamConfig = params.UpstreamRPCConfig{
modified protocol/messenger_group_chat.go
@@ -26,17 +26,17 @@ func (m *Messenger) validateAddedGroupMembers(members []string) error {
}
contact, _ := m.allContacts.Load(contactID)
- if contact == nil || !(contact.Added && contact.HasAddedUs) {
- return ErrGroupChatAddedContacts
- }
+ if contact == nil {
+ contact, err = buildContactFromPkString(contactID)
+ if err != nil {
+ return err
+ }
+ }
}
return nil
}
func (m *Messenger) CreateGroupChatWithMembers(ctx context.Context, name string, members []string) (*MessengerResponse, error) {
- if err := m.validateAddedGroupMembers(members); err != nil {
- return nil, err
- }
var response MessengerResponse
logger := m.logger.With(zap.String("site", "CreateGroupChatWithMembers"))
```
* ui for local pairing
lint-fix
removed un-necessary +
addressing some of the feedback on PR
more feedback + removing feature toggle from ui
getting rid of comments/log messages over here
tidy up logs
fix typos and more i18n stuff
swap % with a named parameter
getting rid of global state + lint-fix
get rid of un-used function
icon guidelines and more kebab case stuff :>
moving stuff to events and utils namespace
:main-icons -> :i :)
address feedback and adhere to guidelines etc
fixed the :t/ qualification
moree feedback :-D
referring status-im.utils.security for now
adding "cs" to constants
make tests pass
re-frame to rf
addressing feedback
moving icons to icons2 & renaming stuff
trying to make this file the way it was before
missed out on updating these references
getting rid of the icons moved to icons2
This reverts commit be8552c0d3daaf7a7333cfeaf304d97c86d50d3e.
fixing mistakes
getting rid of the s
* this rename makes sense to me
* adding an alias to the view
* fixed broken up namespaces
* [Feature][#14352] Added mentions in Activity Center
* [Update][#14352] Update in namespace
* [Update][#14352] Code Style
* [Update][#14352] Created commons for AC and fix warning on text
This commit adds the following chat actions on the home screen:
- Mute chat
- Delete chat
- View profile (one to ones only)
- Clear history
It adds also integration tests for muting and deleting a chat.
To accommodate multiple dividers in the bottom sheet, the interface has
been changed to accept a sequence of sequences, instead of a map.
* [Feature][#13915] Added New Messages component
* [Feature] [#13915] Rename component new-messages to new-messages-header
* [Improvements][#13915] Using theme-colors for fetching light/dark colors
* [Improvements][#13915] Moved text to translations and added Quo2 colors for background
* [Fixes][#13915] Naming Conventions and Grouping for New Messages Component
CLJ Refactor x Hydra are cool. Add modal
Swap UI
Swap token input and gas slider in place
Asset selector sheets
WIP
Selector events
Tabs are back
Hide Swaps behind ff, add cards and modals for advanced settings
Fix lint issues
Signed-off-by: Shivek Khurana <shivek@status.im>
New UI and re-frame handlers for setting pfp from url
Add fake chain-id, connect the pfp upload backend to UI
Add toast on setting pfp, new-new-new UI
Show assets based on selected network
Add horzontal padding to traits card
a11y ids and pr review changes
Added emoji in toast, fix chain id nill issue
Restore Podfile
Fix fix podfile
Add placeholder images for collections, hide option to set pfp when image url is empty or ends in mp4 or svg
Improvise missing designs
Fix paddings
New nu placeholders
Sort collections by name
Kinda fix issue 4
Fix lint
Signed-off-by: Shivek Khurana <shivek@status.im>
Baic skeleton 🦴
NFT Details page. The API is not returning properties
Add traits, add opensea link, fetch nfts when new account is added
Toggle privacy options
Hide NFT behind FF
Update sgv
Fix lint and rename opensea to collectibles
Signed-off-by: Shivek Khurana <shivek@status.im>
Fix function typo that caused android version to fail
Fix Issue 1 pointed out by Tetiana. Implement new UI to accomodate slow progress on Android
Fix QA Issue 3 - Hide reset password option for keycard accounts
Add steps to password reset
Align the checkbox on terms of use
Make modal rext align center because it wrapped abruptly
Logout user after password reset
Disable next button to curb recklessness
Remove reset password feature flag
Signed-off-by: Shivek Khurana <shivek@status.im>
Change link on first screen fix#12122
Tos and privacy now open in webview. Added TOS to about fix#12208
New users TOS opt in fixes#12206
Add tos accept screen for existing users fixes#12207
Address reviews and effects to show-hide force tos opt-in screen
clear checkbox state when get started is clicked. Fixes qa-issue 2
Show screen logic and cleanup
Fix issue with banner not showing for second new account, until re-login. Update Terms of service to Terms of Use.
Update tos url
Update e2e
Update e2e 2
Update e2e 3
Signed-off-by: Shivek Khurana <shivek@status.im>
Do not need account-info for password reset
Update status go version
Java API
PR Fixes and hide behind a feature flag
Reset status go version to HEAD
Disable reset password in DEV
Enable reset password in DEV
Signed-off-by: Shivek Khurana <shivek@status.im>
Settings screen
Settings event handler and connection to UI
Both bottom sheets with text in place
Make links inline
Show metrics in progress
Event value in accordion
Repurpose metrics screen for first time users
Onboarding metrics screen working, but not connected to flow. No animations yet.
Show opt-in banner for new accounts
Show opt in screen on login for existing accounts. Don't start metrics service for accounts where metrics are disabled
Tighten start/stop logic
Pagination and loader
Remove prn and fix lint
Ui fixes
Thank you animation
lint fix
PR comment fixes
Get rid of set, fix lint
Have an overshoot but buttons stopped working
add accessibility labels
True modals and fix opt-in displayed multiple times error
Fix icon cutting off on the top on smaller screens
Replace "invite-instructions" to "how-it-works" in all translatiosn
Add pagination to view-data events
Refactor open and close modal functions
Remove dispatch from init-db
Update status go to include pagination of data
Put metrics behind a feature flag
Signed-off-by: Shivek Khurana <shivek@status.im>
Fixes: #12179Fixes: #12133Fixes: #12131
This commit adds a community link in the description that can be copied and
shared by the user.
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit adds a setting in sync section so that user can select the
amount of days the can sync.
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit adds bannning of users in communities for on-request and
invitation only communities.
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>