Refactor Feishu adapter to trim duplicated helpers

This commit is contained in:
Xinyi Wang
2026-03-13 16:51:50 +08:00
parent f16b5b7214
commit 44bda94a36
2 changed files with 59 additions and 124 deletions

View File

@@ -61,6 +61,14 @@ def public_access(allowed):
return not allowed or "*" in allowed
def to_allowed_set(value):
if value is None:
return set()
if isinstance(value, str):
value = [value]
return {str(x).strip() for x in value if str(x).strip()}
def allowed_label(allowed):
return "public" if public_access(allowed) else sorted(allowed)