Skip to content

Commit

Permalink
Fixed bug where a channel is auto created by a web api call to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarter committed Aug 29, 2010
1 parent 7975a72 commit b3b3bf1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hookbox/api/internal.py
Expand Up @@ -16,6 +16,8 @@ def authorize(self, secret):
raise ExpectedException("Invalid Security Token")

def publish(self, channel_name, payload='null', originator=None, send_hook=False):
if not self.server.exists_channel(channel_name):
raise ExpectedException("Channel %s doesn't exist" % (channel_name,))
channel = self.server.get_channel(None, channel_name)
channel.publish(self, payload, needs_auth=send_hook, originator=originator)

Expand Down

0 comments on commit b3b3bf1

Please sign in to comment.