arj03 / ssb-browser-demo

A secure scuttlebutt client interface running in the browser
Other
58 stars 11 forks source link

Validate message ID before trying to navigate to it #270

Closed KyleMaas closed 3 years ago

KyleMaas commented 3 years ago

Just tried to navigate to a thread by ID, but there was a typo in the ID I copied which made the message ID invalid. Had me puzzled as to why I couldn't see it. Would be nice to warn the user that they're trying an invalid message ID and it will never show up.

KyleMaas commented 3 years ago

Is there any existing functionality that could validate a message ID or would we be better off just using a regular expression for now?

arj03 commented 3 years ago

There sure is: https://github.com/ssb-js/ssb-ref :)

KyleMaas commented 3 years ago

Perfect. Why I figured I'd ask before tackling this.