Rotonde / rotonde-client

Rotonde Base Client
https://client-neauoire.hashbase.io/
MIT License
227 stars 49 forks source link

Use hashes() when checking relationships; Fix dat cmd & enhance dat, undat #124

Closed 0x0ade closed 7 years ago

0x0ade commented 7 years ago

This should fix finally the issue @frozenpandaman is dealing with in #16.

We'll (finally) check the portal's port list against all of our hashes. A "hash" can be 1327ca6d4caf3c4665f5b82d72a5dc716ddf24f58f253e857c5703b9b6a69838 (resolved) or elifessler.com (the current domain name).

Latter should get resolved to the actual hash when the portal gets registered, anyway, but it will still cause issues when someone on an older version has got elifessler.com in their ports and eli is checking their portal from 1327...9898.

We could try resolving the URLs in followed portals' ports, but

  1. it'd strain the user's data connection even more
  2. it'd cause unnecessary refreshes once we resolved it
  3. it will be unnecessary once enough people move on to 1.8+ and after some time passes.

(Alternatively, check if the dat field in our own portal.json contains a "masked" URL to check against, but we're moving away from the dat field as it's just causing a handful of other issues...)

This PR also fixes the dat command not working properly and makes the dat and undat commands refresh the portals list and feed.

frozenpandaman commented 7 years ago

Awesome, looks great, thank you @0x0ade!