{"action":"created","issue":{"url":"https://api.github.com/repos/python-otr/pure-python-otr/issues/59","labels_url":"https://api.github.com/repos/python-otr/pure-python-otr/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/python-otr/pure-python-otr/issues/59/comments","events_url":"https://api.github.com/repos/python-otr/pure-python-otr/issues/59/events","html_url":"https://github.com/python-otr/pure-python-otr/pull/59","id":59019507,"number":59,"title":"Add hook for deciding whether to tag a message.","user":{"login":"mmb","id":24275,"avatar_url":"https://avatars.githubusercontent.com/u/24275?v=3","gravatar_id":"","url":"https://api.github.com/users/mmb","html_url":"https://github.com/mmb","followers_url":"https://api.github.com/users/mmb/followers","following_url":"https://api.github.com/users/mmb/following{/other_user}","gists_url":"https://api.github.com/users/mmb/gists{/gist_id}","starred_url":"https://api.github.com/users/mmb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmb/subscriptions","organizations_url":"https://api.github.com/users/mmb/orgs","repos_url":"https://api.github.com/users/mmb/repos","events_url":"https://api.github.com/users/mmb/events{/privacy}","received_events_url":"https://api.github.com/users/mmb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-26T05:02:56Z","updated_at":"2016-01-27T04:14:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/python-otr/pure-python-otr/pulls/59","html_url":"https://github.com/python-otr/pure-python-otr/pull/59","diff_url":"https://github.com/python-otr/pure-python-otr/pull/59.diff","patch_url":"https://github.com/python-otr/pure-python-otr/pull/59.patch"},"body":"It is useful for Context subclasses to be able to decide whether to tag\r\na message based on its content. For example, do not tag CTCP messages in\r\nIRC."},"comment":{"url":"https://api.github.com/repos/python-otr/pure-python-otr/issues/comments/175382073","html_url":"https://github.com/python-otr/pure-python-otr/pull/59#issuecomment-175382073","issue_url":"https://api.github.com/repos/python-otr/pure-python-otr/issues/59","id":175382073,"user":{"login":"mmb","id":24275,"avatar_url":"https://avatars.githubusercontent.com/u/24275?v=3","gravatar_id":"","url":"https://api.github.com/users/mmb","html_url":"https://github.com/mmb","followers_url":"https://api.github.com/users/mmb/followers","following_url":"https://api.github.com/users/mmb/following{/other_user}","gists_url":"https://api.github.com/users/mmb/gists{/gist_id}","starred_url":"https://api.github.com/users/mmb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmb/subscriptions","organizations_url":"https://api.github.com/users/mmb/orgs","repos_url":"https://api.github.com/users/mmb/repos","events_url":"https://api.github.com/users/mmb/events{/privacy}","received_events_url":"https://api.github.com/users/mmb/received_events","type":"User","site_admin":false},"created_at":"2016-01-27T04:14:15Z","updated_at":"2016-01-27T04:14:15Z","body":"Currently weechat-otr relies on a hack to determine whether to tag a message based on its contents:\r\n\r\nhttps://github.com/mmb/weechat-otr/blob/master/weechat_otr.py#L206-L219\r\n\r\nThis hook would provide a cleaner way by moving this code into a normal method in a context subclass. It should be backwards compatible and would be useful to anyone who wanted to dynamically determine whether to tag a message."}}