diff --git a/zulip/integrations/svn/post-commit b/zulip/integrations/svn/post-commit index 9c44c5d..3d12979 100755 --- a/zulip/integrations/svn/post-commit +++ b/zulip/integrations/svn/post-commit @@ -66,10 +66,11 @@ message = "**{0}** committed revision r{1} to `{2}`.\n\n> {3}".format( destination = config.commit_notice_destination(path, rev) # type: Optional[Dict[Text, Text]] -message_data = { - "type": "stream", - "to": destination["stream"], - "subject": destination["subject"], - "content": message, -} # type: Dict[str, Any] -client.send_message(message_data) +if destination is not None: + message_data = { + "type": "stream", + "to": destination["stream"], + "subject": destination["subject"], + "content": message, + } # type: Dict[str, Any] + client.send_message(message_data)