Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Bug: Conversation IDs containing double slashes (//) break the conversation page #169

@nakajima

Description

@nakajima

Describe the bug

I created a conversation with conversationId "https://example.com". When visited on the website, the following error shows up in the console:

image

Messages can't be sent/received and it doesn't appear correctly in the conversation list:

image

Steps to Reproduce

Running the following script will let you see the error:

import { Client } from '@xmtp/xmtp-js'
import { Wallet } from 'ethers'

const wallet = Wallet.createRandom()

async function checkAll() {
  const client = await Client.create(wallet, { env: 'dev' })
  const convo = await client.conversations.newConversation(
    'ENTER YOUR ADDRESS HERE',
    {
      conversationId: 'fizz//buzz',
      metadata: {},
    }
  )

  await convo.send('hi')
}

checkAll().then(() => console.log('Done'))

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions