{"action":"opened","issue":{"url":"https://api.github.com/repos/vanilla/vanilla/issues/8111","repository_url":"https://api.github.com/repos/vanilla/vanilla","labels_url":"https://api.github.com/repos/vanilla/vanilla/issues/8111/labels{/name}","comments_url":"https://api.github.com/repos/vanilla/vanilla/issues/8111/comments","events_url":"https://api.github.com/repos/vanilla/vanilla/issues/8111/events","html_url":"https://github.com/vanilla/vanilla/issues/8111","id":389799770,"node_id":"MDU6SXNzdWUzODk3OTk3NzA=","number":8111,"title":"Embed Comments -  PostController does not check for duplicate discussion's ForeignID ","user":{"login":"dannimajdalani","id":31856281,"node_id":"MDQ6VXNlcjMxODU2Mjgx","avatar_url":"https://avatars0.githubusercontent.com/u/31856281?v=4","gravatar_id":"","url":"https://api.github.com/users/dannimajdalani","html_url":"https://github.com/dannimajdalani","followers_url":"https://api.github.com/users/dannimajdalani/followers","following_url":"https://api.github.com/users/dannimajdalani/following{/other_user}","gists_url":"https://api.github.com/users/dannimajdalani/gists{/gist_id}","starred_url":"https://api.github.com/users/dannimajdalani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dannimajdalani/subscriptions","organizations_url":"https://api.github.com/users/dannimajdalani/orgs","repos_url":"https://api.github.com/users/dannimajdalani/repos","events_url":"https://api.github.com/users/dannimajdalani/events{/privacy}","received_events_url":"https://api.github.com/users/dannimajdalani/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-11T14:49:47Z","updated_at":"2018-12-11T14:49:47Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Details\r\n\r\nPostController does not check if an embedded discussion's ForeignID is already posted, resulting in duplicate discussions created in Vanilla.\r\n\r\n### To Replicate\r\n\r\n- Setup https://github.com/vanilla/stub-embed-providers locally\r\n- Open 2 tabs and try to post a comment in a discussion(that has not already been posted in Vanilla) without refreshing the page in the other tab.\r\n- 2 discussions would be created in GDN_Discussion with the same ForeignIDs\r\n<img width=\"349\" alt=\"screen shot 2018-12-10 at 8 57 47 pm\" src=\"https://user-images.githubusercontent.com/31856281/49773249-51bb1100-fcbe-11e8-9b0e-e2f81d975541.png\">\r\n\r\n\r\n### Possible Solution\r\n\r\nAdd a check for duplicate foreignIDs [class.postcontroller.php#L561](https://github.com/vanilla/vanilla/blob/master/applications/vanilla/controllers/class.postcontroller.php#L561)"}}
{"actor":{"display_login":"dannimajdalani"}}