Commit Graph

521 Commits

Author SHA1 Message Date
Icaro Motta 206730a777
Show "Added to group chat" notifications (#14785)
Partially implements https://github.com/status-im/status-mobile/issues/14712
Fixes #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"))
```
2023-01-23 13:54:51 -03:00
Mohamed Javid 2f52cb1f0c
Show Admin Notifications in Activity Center (#14748)
* [Feature][#14713] Added Admin Notifications in Activity Center

* [Feature][#14713] Admin Notification UI fixes

* [Feature][#14713] Admin Notification PR Feedbacks

* [Feature][#14713] Admin Notification PR Feedbacks

* [Feature][#14713] Admin Notification accessiblity label update
2023-01-14 02:14:02 +08:00
Jamie Caprani 73c4be8dee
Communities Join Screens - Implement all permutations of Context Drawer options (#14700) 2023-01-13 09:35:41 +00:00
Andrea Maria Piana 7a5871a03f
[Fixes: #14623] Enable mutual contacts by default and show banner 2023-01-12 09:16:02 +00:00
Alexander 43da198c3f
Communities join screens - add toast after joining/leaving (#14735)
* Add toast after joining/leaving a community

* leftover removal

* Better code for adding toasts

* Fixes

* Lint fix
2023-01-10 19:10:26 +01:00
yqrashawn 02a1c3597f
feat: undo delete with toast (#14618) 2023-01-10 10:02:23 +08:00
John Ngei 043e218320
show selected list item context actions view (#14676)
* show selected list item context actions view

* show selected list item context actions view

* fixed showing thumnails on communities
2023-01-09 16:36:17 +03:00
Jinho Jang 944bfe2655
Update translation (#14483) 2023-01-04 12:18:26 +01:00
Parvesh Monu 63ace4da76
Improve switcher last content (#14626) 2023-01-04 03:32:51 +05:30
Omar Basem b85eb4184a
feat: group details screen (3.3) (#14654)
* feat: group details screen (3)
2022-12-30 18:14:24 +04:00
Ibrahem Khalil ef21312162
New chat flow (#14607) 2022-12-29 15:57:42 +02:00
Jamie Caprani aca8c9250f
add Non Token Gated - Manual Approval Required flow (#14513)
chore: add flow for closed community overview page
2022-12-26 16:05:03 -08:00
andrey 8ff32f4fc3
Revert "Group details screen (3) (#14494)"
This reverts commit e21b8d4396.
2022-12-23 07:32:23 +01:00
Omar Basem e21b8d4396
Group details screen (3) (#14494)
* group details screen (3)
2022-12-23 07:18:09 +04:00
Omar Basem ba41d4b271
Photo Selector 2 (#14487)
* Photo Selector (2)
2022-12-20 07:36:06 +04:00
Icaro Motta 269d13e2f8
Move Activity Center to new app structure (#14554) 2022-12-16 10:45:00 -03:00
Siddarth Kumar fc07fbf787
UI for mobile to mobile local pairing - updated (#14514)
* 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
2022-12-16 18:40:56 +05:30
Volodymyr Kozieiev 68ea7cdfc5
Communities now correctly listed in pending/joined sections. (#14515) 2022-12-13 20:55:32 +00:00
yqrashawn bd84a36582
feat: new delete message (#14232) 2022-12-09 15:35:41 +08:00
Roman Volosovskyi 9be8a5b961
Add peers stats screen 2022-12-08 13:28:09 +01:00
frank f7af7ca25d
Allow owner/admin to delete messages of a community (#14366) 2022-12-02 20:13:02 +08:00
Christoph Pader f18044c9dc
Implement Token Gating (#13899)
* feat: implement token gating component

* fix: add .calva to gitignore
2022-12-01 13:30:07 +00:00
Mohamed Javid bc7578ae85
[Feature] Added Mentions in Activity Center (#14451)
* [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
2022-11-29 21:55:33 +08:00
Omar Basem 49e9738ff8
Group Details Screen (2) (#14427)
* feat: group details screen (2)
2022-11-29 10:41:19 +04:00
Omar Basem 14c243803f
Photo Selector (1) (#14426)
* feat: photo-selector (1)
2022-11-24 15:29:54 +04:00
flexsurfer bab0fc7ac0
move chats home (#14419)
* move chats home
2022-11-23 14:33:40 +01:00
frank 32d85d5059
Allow styling text in composer when selecting it with native actions (#14249) 2022-11-23 10:28:44 +08:00
Omar Basem 5492fb472f
Group Details Screen (#14377)
* feat: group details screen
2022-11-21 16:03:49 +04:00
Icaro Motta 0f7ccce3df
Implement identity verification flow (#14365) 2022-11-16 16:46:04 -03:00
John Ngei e44d4c83c0
communites home screen context actions (#14371) 2022-11-16 17:48:18 +03:00
Omar Basem ea7548d54a
Confirmation Dialog (#14348)
* feat: confirmation dialog
2022-11-15 17:34:38 +04:00
Omar Basem 57526a45ad
Bottom sheet missing actions (#14332)
* feat: bottom sheets
2022-11-11 17:02:39 +04:00
John Ngei a1c1be8f8a
updated communities home and discover screen (#14018) 2022-11-09 15:41:34 +03:00
Omar Basem f17f57cc5e
Messages home items (#14256)
* feat: messages home items
2022-11-08 13:01:02 +04:00
du64 ab1dd7e794
Fix typo (replace backtick with apostrophe) (#14255) 2022-10-29 17:24:29 +02:00
Andrea Maria Piana b774ecbcb4
Add chat actions in home screen
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.
2022-10-27 17:53:30 +01:00
Omar Basem c423aa7970
Unpin messages (#14204)
* feat: pinned messages new ui
2022-10-26 17:18:50 +04:00
Icaro Motta 910bafc5f4
Display contact verification requests and allow users to decline them (#14223) 2022-10-26 07:48:07 -03:00
Omar Basem 2ae57f7b21
Messages contact requests (#14221)
* feat: messages contact requests
2022-10-26 10:42:53 +04:00
Parvesh Monu 0ff6fb25f4
Shell & Bottom Tabs Migration (#14099)
* Shell & Bottom Tabs Migration

* Added accessibility ids for elements in the new UI
2022-10-24 18:35:06 +05:30
Roman Volosovskyi d281ef8e21
[#14120] Remove Ropsten and Rinkeby test networks 2022-10-21 13:20:40 +02:00
Jamie Caprani 0826ef57f2
feat: add leave community feature to redesign (#14169) 2022-10-21 02:06:53 -07:00
Omar Basem 153dbb2de1
Messages home tabs new UI in ui2 (#14183)
* feat: messages home new ui
2022-10-20 08:54:27 +04:00
yqrashawn bc050af9ed
feat: delete for me logic without UI (#14007) 2022-10-12 21:21:20 +08:00
Parvesh Monu 46fd30597a
Implementation of Dynamic Button Component (#14127) 2022-10-11 14:10:54 +05:30
erikseppanen c2c281d9c6
[13939] Implement system message into quo2 components (#14061) 2022-10-06 10:59:39 -04:00
Parvesh Monu 1f6ebbb5e8
remove ens banner component (#14112) 2022-10-06 12:31:07 +05:30
Icaro Motta 73983b2abd
[#13967] Displays filtering tabs and read/unread filter (#14105) 2022-10-05 14:44:37 -03:00
Brian Sztamfater 5fa203c6f2
feat: implement new message context drawer
Signed-off-by: Brian Sztamfater <brian@status.im>
2022-09-26 12:01:35 -03:00
Icaro Motta afbdb4c0b4
[#13964 #13962] Display contact requests (#14014) 2022-09-19 11:08:21 -03:00