Graphite-Docs / graphite

Encrypted, secure, user-owned productivity suite
https://graphitedocs.com
GNU General Public License v3.0
589 stars 90 forks source link

Cannot add contact at https://app.graphitedocs.com/contacts #29

Closed Zydnar closed 6 years ago

Zydnar commented 6 years ago

obraz After clicking on desired result in contacts search, code throws GET error https://core.blockstack.org/v1/names/[object%20Object] not found.

Looking at your code problem may be here: https://github.com/Graphite-Docs/graphite/blob/b8ab6ca6f5faf8e7fdcf267ee5dd8a69e4de5243/src/components/messages/Contacts.js#L148 <-- instead of this.props.handleAddContact(manualResults) should be: this.props.handleAddContact(manualResults.name)

OS: Windows 10 x64 Browser: Tested on Chrome 71.0.3551.3 and Firefox 63.0b4

polluterofminds commented 6 years ago

Good catch! Will get a fix out asap. I just refactored the code to handle all name types on Blockstack's naming system, and missed this in the update.

Thanks again. Will post again here when that fix is deployed.

polluterofminds commented 6 years ago

@Zydnar This actually may be a different issue. Do you mind sharing the ID you were trying to add?

Zydnar commented 6 years ago

johnny91 BTW showFirstLink is initialized but never defined so className is undefined lines 133, 147.

Zydnar commented 6 years ago

johnny91.id.blockstack can be added correctly. Before it wasn't in results if I'm not wrong.

polluterofminds commented 6 years ago

Thanks! I can't replicate this. If you are able to reproduce, can you please re-open this issue?

Zydnar commented 6 years ago

Let's say my problem is fixed because I can add the ID I wanted, but problem remains: https://screencast-o-matic.com/watch/cFQDbRqsUh there is something different about this ID it's not blockstack ID. I can ask my friend how he created it.

polluterofminds commented 6 years ago

You are trying to manually add a name without entering the full Blockstack ID. We will get better help text around this, but there are two methods happening behind the scenes:

1) Searching for a name, where a bunch of results of actual Blockstack names will display 2) Manually typing in the full Blockstack username (ID) of a user. This will normally result in the same as number 1, but in the event that no results populate because of inefficiencies with Blockstack's API, the system allows you to click said name and manually add it. However, if you don't type in a full ID and click, there is nothing to be added.

polluterofminds commented 6 years ago

Pull requests are always welcome ;)