{"action":"created","issue":{"url":"https://api.github.com/repos/r888888888/danbooru/issues/3250","repository_url":"https://api.github.com/repos/r888888888/danbooru","labels_url":"https://api.github.com/repos/r888888888/danbooru/issues/3250/labels{/name}","comments_url":"https://api.github.com/repos/r888888888/danbooru/issues/3250/comments","events_url":"https://api.github.com/repos/r888888888/danbooru/issues/3250/events","html_url":"https://github.com/r888888888/danbooru/issues/3250","id":246599665,"number":3250,"title":"Show unvote link as applicable upon page load","user":{"login":"BrokenEagle","id":21149935,"avatar_url":"https://avatars3.githubusercontent.com/u/21149935?v=4","gravatar_id":"","url":"https://api.github.com/users/BrokenEagle","html_url":"https://github.com/BrokenEagle","followers_url":"https://api.github.com/users/BrokenEagle/followers","following_url":"https://api.github.com/users/BrokenEagle/following{/other_user}","gists_url":"https://api.github.com/users/BrokenEagle/gists{/gist_id}","starred_url":"https://api.github.com/users/BrokenEagle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrokenEagle/subscriptions","organizations_url":"https://api.github.com/users/BrokenEagle/orgs","repos_url":"https://api.github.com/users/BrokenEagle/repos","events_url":"https://api.github.com/users/BrokenEagle/events{/privacy}","received_events_url":"https://api.github.com/users/BrokenEagle/received_events","type":"User","site_admin":false},"labels":[{"id":30776620,"url":"https://api.github.com/repos/r888888888/danbooru/labels/Enhance","name":"Enhance","color":"02e10c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-07-30T18:12:14Z","updated_at":"2017-08-01T08:57:22Z","closed_at":null,"body":"From the [Danbooru forums](http://danbooru.donmai.us/forum_topics/9127?page=194#forum_post_134176):\r\n> worldenddominator said:\r\n> \r\n> Make the vote link would say \"unvote\" from the beginning if I open a post that I've recently voted (i.e. that I can't vote now).\r\n\r\nOne way to do this would be to add a show function to the favorites controller that would return whether the vote for a post is positive, negative, or does not exist.  Then make the Javascript do a vote query upon loading the post show page.  One benefit to this approach is that it would also expose the vote status to a user through the API.  Additionally, the code for checking if a post has already been voted on could be removed from the post show page since it would no longer be possible to vote on a post that has already been voted on without unvoting it first."},"comment":{"url":"https://api.github.com/repos/r888888888/danbooru/issues/comments/319311188","html_url":"https://github.com/r888888888/danbooru/issues/3250#issuecomment-319311188","issue_url":"https://api.github.com/repos/r888888888/danbooru/issues/3250","id":319311188,"user":{"login":"Type-kun","id":3628092,"avatar_url":"https://avatars2.githubusercontent.com/u/3628092?v=4","gravatar_id":"","url":"https://api.github.com/users/Type-kun","html_url":"https://github.com/Type-kun","followers_url":"https://api.github.com/users/Type-kun/followers","following_url":"https://api.github.com/users/Type-kun/following{/other_user}","gists_url":"https://api.github.com/users/Type-kun/gists{/gist_id}","starred_url":"https://api.github.com/users/Type-kun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Type-kun/subscriptions","organizations_url":"https://api.github.com/users/Type-kun/orgs","repos_url":"https://api.github.com/users/Type-kun/repos","events_url":"https://api.github.com/users/Type-kun/events{/privacy}","received_events_url":"https://api.github.com/users/Type-kun/received_events","type":"User","site_admin":false},"created_at":"2017-08-01T08:57:22Z","updated_at":"2017-08-01T08:57:22Z","body":"Post vote link can be changed to \"unvote\" server-side if the vote already exists; it just takes a single query, and it can be made instant if two-column index on post id + user id is used. The information about user's votes can be exposed through the api separately if necessary.\r\n\r\n> It would make sense to promote these two functions as buttons underneath the image.\r\n\r\nOther potential place for those place would be below the search bar but above the tag list.\r\n"}}
{"actor":{"display_login":"Type-kun"}}