16 lines
403 B
Python
16 lines
403 B
Python
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from typing import Any
|
||
|
|
|
||
|
|
|
||
|
|
class WeChatAuthAdapter:
|
||
|
|
@staticmethod
|
||
|
|
def get_dm_exposure(config: dict[str, Any]) -> str:
|
||
|
|
return config.get("dm_policy", "pairing")
|
||
|
|
|
||
|
|
@staticmethod
|
||
|
|
def get_authorization_url(config: dict[str, Any]) -> str | None:
|
||
|
|
if config.get("wecom_auth_url"):
|
||
|
|
return config["wecom_auth_url"]
|
||
|
|
return None
|