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

Dual Sending - Can still receive messages from non V3 clients (Medium) #695

Closed
7 tasks
nplasterer opened this issue May 1, 2024 · 1 comment
Closed
7 tasks
Assignees
Labels

Comments

@nplasterer
Copy link
Contributor

nplasterer commented May 1, 2024

Welcome messages

Each installation has one Welcome topic which we will use for both groups and 1:1. That means that even if you have a client that supports Groups but not 1:1 (the state of play at Groups launch), you’ll be aware of 1:1 convos coming in from newer clients that do support 1:1. We’ll want to make use of the ConversationType enum on the ImmutableMetadata to make sure that we completely ignore these groups as part of the prod launch (we’d want to process the welcome and save the group, but then never touch it again). If we ignore them, we can’t mangle the decoding or permissioning of messages, and we can just wait until you have a 1:1-compatible client version to ever read a message from those conversations.

Dual Sends

When sending a message with dual-send we would send the message normally in the V2 conversation. In V3, we would need to do the following things.

  1. Resolve the wallet_address to an inbox_id
    1. If it can’t be resolved, abort the process. Dual-send isn’t possible here.
  2. Check if there is an existing 1:1 convo with that inbox_id
    1. If not, create one and invite the other member
  3. Send the message

The resolution from 1 can change over time, so we’ll have to be OK with the messages potentially going to multiple places if someone re-assigns their wallet to a different inbox.

  • Welcome messages for 1to1 should be hidden in libxmtp for clients that don't support 1to1 yet
  • Resolver logic for sending messages
  • Validation
    • A client that supports V3 can still recieve a V2 only message
    • A client that supports only V2 can still get messages sent from a V3 client
    • A client that supports V3 can send a V2 and V3 message
    • A client that supports V3 does not show double messages
@tuddman tuddman changed the title Duel Sending - Can still receive messages from non V3 clients (Medium) Dual Sending - Can still receive messages from non V3 clients (Medium) May 28, 2024
@nplasterer
Copy link
Contributor Author

Ffibindings to write V2 messages to the database.
Migration to write retro actively all V2 messages.

It would be nice for Android switch to rust xmtp/xmtp-android#219 --- this is blocked cause streaming is broken for android in V2 would be better to use a similar callback stream like we do for V3

@nplasterer nplasterer moved this to In Progress in V3 Backlog Sep 19, 2024
@nplasterer nplasterer self-assigned this Oct 1, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in V3 Backlog Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

1 participant