Update features.py
This commit is contained in:
parent
36482c425a
commit
6aeac4659c
@ -38,7 +38,6 @@ REACTION_EMOJI_RE = re.compile(r"^.{1,16}$")
|
|||||||
HEX_COLOR_RE = re.compile(r"^#[0-9a-fA-F]{6}$")
|
HEX_COLOR_RE = re.compile(r"^#[0-9a-fA-F]{6}$")
|
||||||
PAGE_LINK_RE = re.compile(r"\]\((?:/teams/[^/]+/pages/)?([a-z0-9-]{1,48})\)", re.IGNORECASE)
|
PAGE_LINK_RE = re.compile(r"\]\((?:/teams/[^/]+/pages/)?([a-z0-9-]{1,48})\)", re.IGNORECASE)
|
||||||
|
|
||||||
|
|
||||||
def valid_hex_color(value: object) -> bool:
|
def valid_hex_color(value: object) -> bool:
|
||||||
return bool(isinstance(value, str) and HEX_COLOR_RE.fullmatch(value.strip()))
|
return bool(isinstance(value, str) and HEX_COLOR_RE.fullmatch(value.strip()))
|
||||||
|
|
||||||
@ -424,6 +423,8 @@ def user_can_see_last_active(settings_row, viewer: Optional[dict], target_user_i
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def page_payload(app_module, page, user: Optional[dict]) -> dict:
|
def page_payload(app_module, page, user: Optional[dict]) -> dict:
|
||||||
can_read = bool(
|
can_read = bool(
|
||||||
page["visibility"] == "public"
|
page["visibility"] == "public"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user