Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking: RN Group Chat - Alpha #213

Closed
46 of 81 tasks
nplasterer opened this issue Jan 22, 2024 · 10 comments
Closed
46 of 81 tasks

Tracking: RN Group Chat - Alpha #213

nplasterer opened this issue Jan 22, 2024 · 10 comments
Assignees

Comments

@nplasterer
Copy link
Contributor

nplasterer commented Jan 22, 2024

Group Chat Alpha - [Targeting March 1, 2024]

RN Android

  • Reproduce utility classes/methods
    • Client
      • update existing create method on client to also create a FfiXmtpClient
      • Existing client should now also have a FfiLogger
      • Have existing SigningKey extend FfiInboxOwner so it can be used to create both V2 and V3 clients
      • If FfiXmtpClient exists get address from account_address()
      • If FfiXmtpClient exists store a reference to installation_id()
      • Conversations on client should also take a libXMTPConversations
      • If FfiXmtpClient exists client create should call register_identity
      • Ability to list_my_installations()
      • Ability to revoke_installation()
    • Conversations
      • Should be able to create a group newGroup() -- create_group()
      • Should be able to list just groups listGroups -- libXMTPConversations.list()
      • Should be able to list an ordered list of conversations & groups list(includeGroups: Boolean = false)
      • Should be able to stream groups libXMTPConversations.stream()
      • Should be able to stream both conversations & groups stream(includeGroups:Boolean = false)
      • Should be able to sync groups so that the libxmtp database gets updated
      • Should be able to stream all messages from both groups and conversations (streamAllMessages(includeGroups: Boolean = false)
    • Conversation/Group methods
      • Should have a unique identifier of the conversation id() equivalent to existing topic
      • Should be able to send() messages of any content type
      • Should be able to resync the libxmtp database sync()
      • Should be able to list messages find_messages() as Decoded and Decrypted Messages
      • Should be able to list members list_members()
      • Should be able to add members add_members()
      • Should be able to remove members remove_members()
      • Should be able to stream messages stream()
      • Should be able to leave a group leave()
      • Can check if a message can be sent can_message()
  • Publish repo README covering Dev Preview features and with Dev Preview badge

RN iOS

  • Reproduce utility classes/methods
    • Client
      • update existing create method on client to also create a FfiXmtpClient
      • Existing client should now also have a FfiLogger
      • Have existing SigningKey extend FfiInboxOwner so it can be used to create both V2 and V3 clients
      • If FfiXmtpClient exists get address from account_address()
      • If FfiXmtpClient exists store a reference to installation_id()
      • Conversations on client should also take a libXMTPConversations
      • If FfiXmtpClient exists client create should call register_identity
      • Ability to list_my_installations()
      • Ability to revoke_installation()
    • Conversations
      • Should be able to create a group newGroup() -- create_group()
      • Should be able to list just groups listGroups -- libXMTPConversations.list()
      • Should be able to list an ordered list of conversations & groups list(includeGroups: Boolean = false)
      • Should be able to stream groups libXMTPConversations.stream()
      • Should be able to stream both conversations & groups stream(includeGroups:Boolean = false)
      • Should be able to sync groups so that the libxmtp database gets updated
      • Should be able to stream all messages from both groups and conversations (streamAllMessages(includeGroups: Boolean = false)
    • Conversation/Group methods
      • Should have a unique identifier of the conversation id() equivalent to existing topic
      • Should be able to send() messages of any content type
      • Should be able to resync the libxmtp database sync()
      • Should be able to list messages find_messages() as Decoded and Decrypted Messages
      • Should be able to list members list_members()
      • Should be able to add members add_members()
      • Should be able to remove members remove_members()
      • Should be able to stream messages stream()
      • Should be able to leave a group leave()
      • Can check if a message can be sent can_message()
  • Publish repo README covering Dev Preview features and with Dev Preview badge

GA - [Targeting March 30, 2024]

  • Integrated with a third party app
    • Successfully received push notifications
  • Publish repo README with GA badge
  • Reference docs for SDK GA

Docs

Docs are currently being drafted documents for a PR. You can check the progress made so far by visiting the preview link. For more information on the PR itself, you can check xmtp/xmtp-dot-org#650.

Nice to have

  • Create sample app
    • Use SDK to demonstrate
      • Initialize client
      • List conversations
      • List messages
      • Send messages
      • Stream conversations
      • Stream messages
      • Wallet Connect
      • Group Chat
        • send messages (any content type)
        • add member
        • remove member
        • list members
        • leave
@peterferguson
Copy link
Contributor

Hey just wondering whether this group implementation will also include a conversationID similar to the v2 conversations?

@humanagent
Copy link

Hey @peterferguson, the conversationID is no longer available for 1:1 conversations. It has been removed from all the SDKs and is not part of the group chat specifications either.

@alexrisch
Copy link
Contributor

alexrisch commented Feb 8, 2024

Issue:
It looks like the messages method on group is returning a json string rather than a DecodedMessage, I might have fixed it with #245, but haven't verified

@alexrisch
Copy link
Contributor

alexrisch commented Feb 8, 2024

Issue:
Client.createFromKeyBundle and Client.create errors when attempting to use functionality enabled by groups, example: client.conversations.newGroup()

Repro:

  const aliceClient = await Client.createRandom({
    env: 'local',
    enableAlphaMls: true
  })
  const key = await aliceClient.exportKeyBundle()
  const aliceKeyClient = await Client.createFromKeyBundle(key, {
    env: 'dev',
    enableAlphaMls: true
  })
  // Errors when Alice creates a group
  const aliceGroup = await aliceKeyClient.conversations.newGroup(
    [...]
  )

@alexrisch
Copy link
Contributor

alexrisch commented Feb 8, 2024

Feature: Export Group type

@alexrisch
Copy link
Contributor

Is prepareMessage needed for groups?

@nplasterer
Copy link
Contributor Author

prepareMessage doesn't seem necessary because of the local database. Messages you send show instantly without the need to prepare them.

@nplasterer
Copy link
Contributor Author

nplasterer commented Feb 19, 2024

Here are some requests for more functionality

  • Prepare message functionality
  • How to handle push notifications for welcomes and existing groups
    • How to fetch just a group
    • Can they pass there own database url so they can manage it
  • StreamAllMessages @richardhuaaa (rust)
  • A way to find out who the group admin is - @neekolas (rust) & @nplasterer (native + RN)
  • Expose pagination on messages in RN - @nplasterer (RN)
  • Setting DB URL & encryption Key
  • listBatchMessages functionality
  • Group protocol consent - Scott (native)
  • Groups frames
  • Ability to "logout" aka delete local database

@neekolas
Copy link
Contributor

I can handle the "find out who the group admin is", which I'm going to interpret as a broader "tell me what this groups permissions are, and where I fit into them".

Will get to groups frames some time later.

@nplasterer nplasterer changed the title Tracking: RN Group Chat Tracking: RN Group Chat - Alpha Mar 12, 2024
@nplasterer
Copy link
Contributor Author

Closing this in favor of the new issue to track our movement towards prod
#309

@github-project-automation github-project-automation bot moved this from In Progress to Done in MLS Work Mar 12, 2024
@nplasterer nplasterer unpinned this issue Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

6 participants