We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab64791 commit 739c96eCopy full SHA for 739c96e
pusher/util.py
@@ -92,12 +92,10 @@ def validate_channel(channel):
92
if len(channel) > 200:
93
raise ValueError("Channel too long: %s" % channel)
94
95
- if "server-to-user" in channel:
+ if channel.startswith(SERVER_TO_USER_PREFIX):
96
if not server_to_user_channel_re.match(channel):
97
raise ValueError("Invalid server to user Channel: %s" % channel)
98
- return channel
99
-
100
- if not channel_name_re.match(channel):
+ elif not channel_name_re.match(channel):
101
raise ValueError("Invalid Channel: %s" % channel)
102
103
return channel
0 commit comments