[manual] API get_public_streams: Return streams in a dictionary.
This way we can return properties of the streams other than just their names in future versions of the API without breaking old clients. The manual step required is to deploy the updated version of sync-public-streams on zmirror.humbughq.com when we deploy this code to prod. (imported from commit 42b86d8daa5729f52c9961dd912c5776a25ab0b4)
This commit is contained in:
parent
05596740ad
commit
29a463dbf0
|
@ -27,9 +27,10 @@ def fetch_public_streams():
|
||||||
return None
|
return None
|
||||||
|
|
||||||
for stream in streams:
|
for stream in streams:
|
||||||
|
stream_name = stream["name"]
|
||||||
# Zephyr class names are canonicalized by first applying NFKC
|
# Zephyr class names are canonicalized by first applying NFKC
|
||||||
# normalization and then lower-casing server-side
|
# normalization and then lower-casing server-side
|
||||||
canonical_cls = unicodedata.normalize("NFKC", stream).lower().encode("utf-8")
|
canonical_cls = unicodedata.normalize("NFKC", stream_name).lower().encode("utf-8")
|
||||||
if canonical_cls in ['security', 'login', 'network', 'ops', 'user_locate',
|
if canonical_cls in ['security', 'login', 'network', 'ops', 'user_locate',
|
||||||
'mit',
|
'mit',
|
||||||
'hm_ctl', 'hm_stat', 'zephyr_admin', 'zephyr_ctl']:
|
'hm_ctl', 'hm_stat', 'zephyr_admin', 'zephyr_ctl']:
|
||||||
|
|
Loading…
Reference in a new issue