{"action":"created","issue":{"url":"https://api.github.com/repos/ssbc/secure-scuttlebutt/issues/131","labels_url":"https://api.github.com/repos/ssbc/secure-scuttlebutt/issues/131/labels{/name}","comments_url":"https://api.github.com/repos/ssbc/secure-scuttlebutt/issues/131/comments","events_url":"https://api.github.com/repos/ssbc/secure-scuttlebutt/issues/131/events","html_url":"https://github.com/ssbc/secure-scuttlebutt/pull/131","id":112496085,"number":131,"title":"rewrite links","user":{"login":"dominictarr","id":259374,"avatar_url":"https://avatars.githubusercontent.com/u/259374?v=3","gravatar_id":"","url":"https://api.github.com/users/dominictarr","html_url":"https://github.com/dominictarr","followers_url":"https://api.github.com/users/dominictarr/followers","following_url":"https://api.github.com/users/dominictarr/following{/other_user}","gists_url":"https://api.github.com/users/dominictarr/gists{/gist_id}","starred_url":"https://api.github.com/users/dominictarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominictarr/subscriptions","organizations_url":"https://api.github.com/users/dominictarr/orgs","repos_url":"https://api.github.com/users/dominictarr/repos","events_url":"https://api.github.com/users/dominictarr/events{/privacy}","received_events_url":"https://api.github.com/users/dominictarr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-21T02:01:26Z","updated_at":"2015-10-21T15:55:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ssbc/secure-scuttlebutt/pulls/131","html_url":"https://github.com/ssbc/secure-scuttlebutt/pull/131","diff_url":"https://github.com/ssbc/secure-scuttlebutt/pull/131.diff","patch_url":"https://github.com/ssbc/secure-scuttlebutt/pull/131.patch"},"body":"After noticing that links was not handling some cases the other day, (in particular, queries where not filtered by rel at all) I rewrote links.\r\n\r\nThis bug was introduced by upgrading links to use sigils.\r\nhttps://github.com/ssbc/secure-scuttlebutt/pull/125\r\n\r\nThis makes a breaking change: if a `source` (or source sigil) was not provided,\r\npreviously it defaults to the message as the source. but the author as the source makes more sense. You can get the message easily - from the `.key`\r\nproperty (and have links return you the whole message with values: true)\r\nMaking source always be a feed is also more consistent with the query\r\ninput. It doesn't really make sense to query the source as a message\r\nanyway.\r\n\r\nThis did mean changing the tests, but I grepped through patchwork and scuttlebot and we havn't actually used a source value in a links query (not in the product code, there are examples in the tests)\r\n\r\nthere are some times when you might want to do so - like, to check if Alice has blocked Bob, you could query `links({source: alice, dest: bob, rel: follows})` but in the cases we are doing that we have an in memory structure, so this change wouldn't actually break any code."},"comment":{"url":"https://api.github.com/repos/ssbc/secure-scuttlebutt/issues/comments/149941659","html_url":"https://github.com/ssbc/secure-scuttlebutt/pull/131#issuecomment-149941659","issue_url":"https://api.github.com/repos/ssbc/secure-scuttlebutt/issues/131","id":149941659,"user":{"login":"pfraze","id":1270099,"avatar_url":"https://avatars.githubusercontent.com/u/1270099?v=3","gravatar_id":"","url":"https://api.github.com/users/pfraze","html_url":"https://github.com/pfraze","followers_url":"https://api.github.com/users/pfraze/followers","following_url":"https://api.github.com/users/pfraze/following{/other_user}","gists_url":"https://api.github.com/users/pfraze/gists{/gist_id}","starred_url":"https://api.github.com/users/pfraze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfraze/subscriptions","organizations_url":"https://api.github.com/users/pfraze/orgs","repos_url":"https://api.github.com/users/pfraze/repos","events_url":"https://api.github.com/users/pfraze/events{/privacy}","received_events_url":"https://api.github.com/users/pfraze/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T15:55:54Z","updated_at":"2015-10-21T15:55:54Z","body":"much clearer! :+1: "}}