Skip to content

Commit ab64791

Browse files
Update pusher/util.py
Co-authored-by: Evgenii Breikin <[email protected]>
1 parent 6242ea7 commit ab64791

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pusher/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
import six
1212
import sys
1313
import base64
14+
SERVER_TO_USER_PREFIX = "#server-to-user-"
1415

1516
channel_name_re = re.compile(r'\A[-a-zA-Z0-9_=@,.;]+\Z')
16-
server_to_user_channel_re = re.compile(r'\A#server-to-user[-a-zA-Z0-9_=@,.;]+\Z')
17+
server_to_user_channel_re = re.compile(rf'\A{SERVER_TO_USER_PREFIX}[-a-zA-Z0-9_=@,.;]+\Z')
1718
app_id_re = re.compile(r'\A[0-9]+\Z')
1819
pusher_url_re = re.compile(r'\A(http|https)://(.*):(.*)@(.*)/apps/([0-9]+)\Z')
1920
socket_id_re = re.compile(r'\A\d+\.\d+\Z')

0 commit comments

Comments
 (0)