{"action":"created","issue":{"url":"https://api.github.com/repos/thepracticaldev/dev.to/issues/1641","repository_url":"https://api.github.com/repos/thepracticaldev/dev.to","labels_url":"https://api.github.com/repos/thepracticaldev/dev.to/issues/1641/labels{/name}","comments_url":"https://api.github.com/repos/thepracticaldev/dev.to/issues/1641/comments","events_url":"https://api.github.com/repos/thepracticaldev/dev.to/issues/1641/events","html_url":"https://github.com/thepracticaldev/dev.to/issues/1641","id":402736561,"node_id":"MDU6SXNzdWU0MDI3MzY1NjE=","number":1641,"title":"Deleted posts still appear in the reading list","user":{"login":"rhymes","id":146201,"node_id":"MDQ6VXNlcjE0NjIwMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/146201?v=4","gravatar_id":"","url":"https://api.github.com/users/rhymes","html_url":"https://github.com/rhymes","followers_url":"https://api.github.com/users/rhymes/followers","following_url":"https://api.github.com/users/rhymes/following{/other_user}","gists_url":"https://api.github.com/users/rhymes/gists{/gist_id}","starred_url":"https://api.github.com/users/rhymes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhymes/subscriptions","organizations_url":"https://api.github.com/users/rhymes/orgs","repos_url":"https://api.github.com/users/rhymes/repos","events_url":"https://api.github.com/users/rhymes/events{/privacy}","received_events_url":"https://api.github.com/users/rhymes/received_events","type":"User","site_admin":false},"labels":[{"id":480869965,"node_id":"MDU6TGFiZWw0ODA4Njk5NjU=","url":"https://api.github.com/repos/thepracticaldev/dev.to/labels/bug","name":"bug","color":"ff050d","default":true}],"state":"open","locked":false,"assignee":{"login":"lightalloy","id":30115,"node_id":"MDQ6VXNlcjMwMTE1","avatar_url":"https://avatars2.githubusercontent.com/u/30115?v=4","gravatar_id":"","url":"https://api.github.com/users/lightalloy","html_url":"https://github.com/lightalloy","followers_url":"https://api.github.com/users/lightalloy/followers","following_url":"https://api.github.com/users/lightalloy/following{/other_user}","gists_url":"https://api.github.com/users/lightalloy/gists{/gist_id}","starred_url":"https://api.github.com/users/lightalloy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightalloy/subscriptions","organizations_url":"https://api.github.com/users/lightalloy/orgs","repos_url":"https://api.github.com/users/lightalloy/repos","events_url":"https://api.github.com/users/lightalloy/events{/privacy}","received_events_url":"https://api.github.com/users/lightalloy/received_events","type":"User","site_admin":false},"assignees":[{"login":"lightalloy","id":30115,"node_id":"MDQ6VXNlcjMwMTE1","avatar_url":"https://avatars2.githubusercontent.com/u/30115?v=4","gravatar_id":"","url":"https://api.github.com/users/lightalloy","html_url":"https://github.com/lightalloy","followers_url":"https://api.github.com/users/lightalloy/followers","following_url":"https://api.github.com/users/lightalloy/following{/other_user}","gists_url":"https://api.github.com/users/lightalloy/gists{/gist_id}","starred_url":"https://api.github.com/users/lightalloy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightalloy/subscriptions","organizations_url":"https://api.github.com/users/lightalloy/orgs","repos_url":"https://api.github.com/users/lightalloy/repos","events_url":"https://api.github.com/users/lightalloy/events{/privacy}","received_events_url":"https://api.github.com/users/lightalloy/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2019-01-24T14:38:02Z","updated_at":"2019-02-05T11:11:38Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"**Describe the bug**\r\n\r\nA deleted post appears in the reading list and I can't remove it manually.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n\r\nA DEV user creates a post, someone else adds it to their reading list. The post's author deletes the post. The owner of the reading list still sees the post listed.\r\n\r\n**Expected behavior**\r\n\r\nA deleted post should be removed from the reading list.\r\n\r\n**Desktop (please complete the following information):**\r\n\r\n- OS: macOS\r\n- Browser: Firefox\r\n- Version: 65\r\n\r\n**Additional context**\r\n\r\nIt might also be related to https://github.com/thepracticaldev/dev.to/issues/1061\r\n"},"comment":{"url":"https://api.github.com/repos/thepracticaldev/dev.to/issues/comments/460599647","html_url":"https://github.com/thepracticaldev/dev.to/issues/1641#issuecomment-460599647","issue_url":"https://api.github.com/repos/thepracticaldev/dev.to/issues/1641","id":460599647,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2MDU5OTY0Nw==","user":{"login":"lightalloy","id":30115,"node_id":"MDQ6VXNlcjMwMTE1","avatar_url":"https://avatars2.githubusercontent.com/u/30115?v=4","gravatar_id":"","url":"https://api.github.com/users/lightalloy","html_url":"https://github.com/lightalloy","followers_url":"https://api.github.com/users/lightalloy/followers","following_url":"https://api.github.com/users/lightalloy/following{/other_user}","gists_url":"https://api.github.com/users/lightalloy/gists{/gist_id}","starred_url":"https://api.github.com/users/lightalloy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightalloy/subscriptions","organizations_url":"https://api.github.com/users/lightalloy/orgs","repos_url":"https://api.github.com/users/lightalloy/repos","events_url":"https://api.github.com/users/lightalloy/events{/privacy}","received_events_url":"https://api.github.com/users/lightalloy/received_events","type":"User","site_admin":false},"created_at":"2019-02-05T11:11:38Z","updated_at":"2019-02-05T11:11:38Z","author_association":"COLLABORATOR","body":"It seems like `trigger_delayed_index` is not useful in case of destroying. `trigger_delayed_index` runs `after_destroy`, so this check `record.&persisted?` will always be false and `record.delay.remove_from_index!` won't be executed. An article is actually removed from the index in `before_destroy_actions` (`remove_algolia_index`). So I would specify an option `auto_remove: false` on `algoliasearch` and remove part of the `trigger_delayed_index` method to remove the confusion."}}
{"actor":{"display_login":"lightalloy"}}