{"action":"closed","issue":{"url":"https://api.github.com/repos/pyconsk/django-konfera/issues/195","repository_url":"https://api.github.com/repos/pyconsk/django-konfera","labels_url":"https://api.github.com/repos/pyconsk/django-konfera/issues/195/labels{/name}","comments_url":"https://api.github.com/repos/pyconsk/django-konfera/issues/195/comments","events_url":"https://api.github.com/repos/pyconsk/django-konfera/issues/195/events","html_url":"https://github.com/pyconsk/django-konfera/issues/195","id":187561036,"number":195,"title":"Order status change notification","user":{"login":"ricco386","id":1180686,"avatar_url":"https://avatars.githubusercontent.com/u/1180686?v=3","gravatar_id":"","url":"https://api.github.com/users/ricco386","html_url":"https://github.com/ricco386","followers_url":"https://api.github.com/users/ricco386/followers","following_url":"https://api.github.com/users/ricco386/following{/other_user}","gists_url":"https://api.github.com/users/ricco386/gists{/gist_id}","starred_url":"https://api.github.com/users/ricco386/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricco386/subscriptions","organizations_url":"https://api.github.com/users/ricco386/orgs","repos_url":"https://api.github.com/users/ricco386/repos","events_url":"https://api.github.com/users/ricco386/events{/privacy}","received_events_url":"https://api.github.com/users/ricco386/received_events","type":"User","site_admin":false},"labels":[{"id":439128299,"url":"https://api.github.com/repos/pyconsk/django-konfera/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":442681298,"url":"https://api.github.com/repos/pyconsk/django-konfera/labels/medium","name":"medium","color":"bfd4f2","default":false},{"id":441289447,"url":"https://api.github.com/repos/pyconsk/django-konfera/labels/model","name":"model","color":"0052cc","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/pyconsk/django-konfera/milestones/3","html_url":"https://github.com/pyconsk/django-konfera/milestone/3","labels_url":"https://api.github.com/repos/pyconsk/django-konfera/milestones/3/labels","id":2032779,"number":3,"title":"0.3","description":"","creator":{"login":"ricco386","id":1180686,"avatar_url":"https://avatars.githubusercontent.com/u/1180686?v=3","gravatar_id":"","url":"https://api.github.com/users/ricco386","html_url":"https://github.com/ricco386","followers_url":"https://api.github.com/users/ricco386/followers","following_url":"https://api.github.com/users/ricco386/following{/other_user}","gists_url":"https://api.github.com/users/ricco386/gists{/gist_id}","starred_url":"https://api.github.com/users/ricco386/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricco386/subscriptions","organizations_url":"https://api.github.com/users/ricco386/orgs","repos_url":"https://api.github.com/users/ricco386/repos","events_url":"https://api.github.com/users/ricco386/events{/privacy}","received_events_url":"https://api.github.com/users/ricco386/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":17,"state":"open","created_at":"2016-09-27T17:58:10Z","updated_at":"2017-01-21T20:05:05Z","due_on":"2016-12-06T08:00:00Z","closed_at":null},"comments":2,"created_at":"2016-11-06T13:18:13Z","updated_at":"2017-01-21T20:05:05Z","closed_at":"2017-01-21T20:05:05Z","body":"Let's build a feature that will allow notify about orders. \r\n\r\nWhen new order is created, or the status has changed we can do a post with some data. \r\n\r\nLet's define setting:\r\n```\r\nORDER_NOTIFICATION = {\r\n   'server': 'http://127.0.0.1',\r\n}\r\n```\r\nDefault:\r\n```\r\nORDER_NOTIFICATION = None\r\n```\r\nIn model we create `status_change_notification` function, that will check if setting is set and if so will do a post to server. We should figurout the way that admin can customize the content. Initial post data could be:\r\n```\r\n{\r\n    'uuid': self.uuid, \r\n    'status': self.status,\r\n    ... \r\n} \r\n```\r\nSeveral services support, incoming hooks, when post is done is correct. We need to figure out easy way to modify what is going to be send. For example Slack would support message:\r\n```\r\n{\r\n    \"text\": \"This is a line of text.\\nAnd this is another one.\"\r\n}\r\n```\r\nOne thing that comes to my mind is to have ORDER_NOTIFICATION as a strore it as a string that we can convert to json and post. In string we can uaselly add support for order model attributes.\r\n\r\nThis is just a first draft of the functionality, comments and suggestions are welcome. "}}
{"actor":{"display_login":"ricco386"}}