{"action":"created","issue":{"url":"https://api.github.com/repos/incuna/incuna-groups/issues/28","labels_url":"https://api.github.com/repos/incuna/incuna-groups/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/incuna/incuna-groups/issues/28/comments","events_url":"https://api.github.com/repos/incuna/incuna-groups/issues/28/events","html_url":"https://github.com/incuna/incuna-groups/pull/28","id":114307473,"number":28,"title":"Add email replies","user":{"login":"adam-thomas","id":6973481,"avatar_url":"https://avatars.githubusercontent.com/u/6973481?v=3","gravatar_id":"","url":"https://api.github.com/users/adam-thomas","html_url":"https://github.com/adam-thomas","followers_url":"https://api.github.com/users/adam-thomas/followers","following_url":"https://api.github.com/users/adam-thomas/following{/other_user}","gists_url":"https://api.github.com/users/adam-thomas/gists{/gist_id}","starred_url":"https://api.github.com/users/adam-thomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adam-thomas/subscriptions","organizations_url":"https://api.github.com/users/adam-thomas/orgs","repos_url":"https://api.github.com/users/adam-thomas/repos","events_url":"https://api.github.com/users/adam-thomas/events{/privacy}","received_events_url":"https://api.github.com/users/adam-thomas/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-30T16:38:52Z","updated_at":"2015-11-03T11:35:58Z","closed_at":"2015-11-03T11:34:08Z","pull_request":{"url":"https://api.github.com/repos/incuna/incuna-groups/pulls/28","html_url":"https://github.com/incuna/incuna-groups/pull/28","diff_url":"https://github.com/incuna/incuna-groups/pull/28.diff","patch_url":"https://github.com/incuna/incuna-groups/pull/28.patch"},"body":"We want users to be able to reply to a discussion by replying to the notification email itself.  This involves an endpoint, /groups/reply, that accepts Meldium POSTs full of JSON data.  The JSON is formatted according to [Mailgun's documentation](https://documentation.mailgun.com/user_manual.html#routes) - the fields we care about here are `body['message']['recipient']` and `body['message']['stripped-text']`.\r\n\r\nThe user is identified by a UUID generated by `django.core.signing` and pasted into a `reply-<uuid>@domain.com` email address.  This address is given as a `Reply-To` header in the email, and the UUID is extracted from it when the email is received.  I'd wanted to use an URL with a <uuid> argument, but Mailgun's routing doesn't seem to be sophisticated enough, unfortunately.\r\n\r\nThese `views` files are getting pretty huge, but I don't want to split them up in this PR since the diff is going to be substantial as it is.  I've made a [separate issue](https://github.com/incuna/incuna-groups/issues/27) for that refactor.\r\n\r\n@incuna/backend review please?"},"comment":{"url":"https://api.github.com/repos/incuna/incuna-groups/issues/comments/153326279","html_url":"https://github.com/incuna/incuna-groups/pull/28#issuecomment-153326279","issue_url":"https://api.github.com/repos/incuna/incuna-groups/issues/28","id":153326279,"user":{"login":"adam-thomas","id":6973481,"avatar_url":"https://avatars.githubusercontent.com/u/6973481?v=3","gravatar_id":"","url":"https://api.github.com/users/adam-thomas","html_url":"https://github.com/adam-thomas","followers_url":"https://api.github.com/users/adam-thomas/followers","following_url":"https://api.github.com/users/adam-thomas/following{/other_user}","gists_url":"https://api.github.com/users/adam-thomas/gists{/gist_id}","starred_url":"https://api.github.com/users/adam-thomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adam-thomas/subscriptions","organizations_url":"https://api.github.com/users/adam-thomas/orgs","repos_url":"https://api.github.com/users/adam-thomas/repos","events_url":"https://api.github.com/users/adam-thomas/events{/privacy}","received_events_url":"https://api.github.com/users/adam-thomas/received_events","type":"User","site_admin":false},"created_at":"2015-11-03T11:35:58Z","updated_at":"2015-11-03T11:35:58Z","body":"Thanks :)"}}