xmtp / xmtp-js

XMTP client SDKs, content types, and other packages written in TypeScript
https://xmtp.org/docs
211 stars 40 forks source link

Enhancement request: Validate that the conversationId is a valid URI #284

Closed daria-github closed 10 months ago

daria-github commented 1 year ago

Is your feature request related to a problem?

Currently, the UI is able to send invalid conversation IDs to SDK (due to just requiring a string in order to send to the SDK), which creates an empty conversation. This request is for blocking creating this conversation on SDK side if the conversationId provided is not valid.

PR for reference where this was fixed within an individual app, but doesn't solve the root issue: https://github.com/xmtp-labs/xmtp-inbox-web/pull/92

neekolas commented 1 year ago

This feels like a reasonable suggestion, and is easy enough to implement. I'll put this into the SDK v8 workstream and add it in.

rygine commented 10 months ago

the conversationId field has proven to create confusion for developers & end-users, adds non-trivial implementation complexity, and has potential for abuse. the current recommendation is to not use them.