{"action":"created","issue":{"url":"https://api.github.com/repos/zulip/zulip/issues/761","repository_url":"https://api.github.com/repos/zulip/zulip","labels_url":"https://api.github.com/repos/zulip/zulip/issues/761/labels{/name}","comments_url":"https://api.github.com/repos/zulip/zulip/issues/761/comments","events_url":"https://api.github.com/repos/zulip/zulip/issues/761/events","html_url":"https://github.com/zulip/zulip/pull/761","id":153591756,"number":761,"title":"Add is_incoming_webhook field to user_profile","user":{"login":"TomaszKolek","id":5993758,"avatar_url":"https://avatars.githubusercontent.com/u/5993758?v=3","gravatar_id":"","url":"https://api.github.com/users/TomaszKolek","html_url":"https://github.com/TomaszKolek","followers_url":"https://api.github.com/users/TomaszKolek/followers","following_url":"https://api.github.com/users/TomaszKolek/following{/other_user}","gists_url":"https://api.github.com/users/TomaszKolek/gists{/gist_id}","starred_url":"https://api.github.com/users/TomaszKolek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomaszKolek/subscriptions","organizations_url":"https://api.github.com/users/TomaszKolek/orgs","repos_url":"https://api.github.com/users/TomaszKolek/repos","events_url":"https://api.github.com/users/TomaszKolek/events{/privacy}","received_events_url":"https://api.github.com/users/TomaszKolek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-07T12:17:46Z","updated_at":"2016-05-07T17:56:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/zulip/zulip/pulls/761","html_url":"https://github.com/zulip/zulip/pull/761","diff_url":"https://github.com/zulip/zulip/pull/761.diff","patch_url":"https://github.com/zulip/zulip/pull/761.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/zulip/zulip/issues/comments/217656252","html_url":"https://github.com/zulip/zulip/pull/761#issuecomment-217656252","issue_url":"https://api.github.com/repos/zulip/zulip/issues/761","id":217656252,"user":{"login":"timabbott","id":2746074,"avatar_url":"https://avatars.githubusercontent.com/u/2746074?v=3","gravatar_id":"","url":"https://api.github.com/users/timabbott","html_url":"https://github.com/timabbott","followers_url":"https://api.github.com/users/timabbott/followers","following_url":"https://api.github.com/users/timabbott/following{/other_user}","gists_url":"https://api.github.com/users/timabbott/gists{/gist_id}","starred_url":"https://api.github.com/users/timabbott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timabbott/subscriptions","organizations_url":"https://api.github.com/users/timabbott/orgs","repos_url":"https://api.github.com/users/timabbott/repos","events_url":"https://api.github.com/users/timabbott/events{/privacy}","received_events_url":"https://api.github.com/users/timabbott/received_events","type":"User","site_admin":false},"created_at":"2016-05-07T17:56:57Z","updated_at":"2016-05-07T17:56:57Z","body":"Cool!  I made some suggestions for how to tweak this to make it backwards-compatible, and thus something we could merge essentially now (even before we add UI for controlling it).\r\n\r\nThinking a bit more, though, I guess we're likely to create a few more specialized integration types, so maybe we should be storing the bot type data as a `bot_type` enum style field (like how we do e.g. Recipient.STREAM).  So I'm imagining:\r\n```\r\nbot_type = models.PositiveSmallIntegerField(null=True)\r\n\r\nDEFAULT_BOT = 1 # We'd want to add code to the bot creation codepath to set this bit\r\nINCOMING_WEBHOOK_BOT = 2\r\n```\r\nand then we can make a property function for `is_incoming_webhook` that checks `user_profile.bot_type == UserProfile.INCOMING_WEBHOOK_BOT`, to provide nice syntax for checking whether a bot is a webhook bot.\r\n\r\nDoes that seem reasonable?\r\n\r\n"}}