fix(msteams): harden availability check and migrate docs to README
- Check both jwt and cryptography in MSTEAMS_AVAILABLE guard so partial installs fail early with a clear message instead of at runtime - Add aclose() to test FakeHttpClient so stop() won't crash - Move MSTEAMS.md into README.md following the same details/summary pattern used by every other channel - Note in README that validateInboundAuth defaults to false
This commit is contained in:
@@ -32,7 +32,10 @@ from nanobot.channels.base import BaseChannel
|
||||
from nanobot.config.paths import get_workspace_path
|
||||
from nanobot.config.schema import Base
|
||||
|
||||
MSTEAMS_AVAILABLE = importlib.util.find_spec("jwt") is not None
|
||||
MSTEAMS_AVAILABLE = (
|
||||
importlib.util.find_spec("jwt") is not None
|
||||
and importlib.util.find_spec("cryptography") is not None
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
import jwt
|
||||
|
||||
Reference in New Issue
Block a user