Skip to content

Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.

Merge remote-tracking branch 'origin/mattermost-search-expired-session' into e2e-testing

Petr Bauch3680a4318f7a
diff --cc core/switch_core/bridges/collaboration/mattermost/adapter.py
index 0870d1afc,71626f520..909a71639
--- a/core/switch_core/bridges/collaboration/mattermost/adapter.py
+++ b/core/switch_core/bridges/collaboration/mattermost/adapter.py
@@@ -103,11 -98,13 +103,17 @@@ _MAX_BOT_ICON_BYTES = 5 * 1024 * 102
# to wait for ever, so a server that accepts the connection and never answers
# would hold the call, and anything waiting on it, indefinitely.
_MM_REQUEST_TIMEOUT_SECONDS = 10.0
+# How long a bot socket's closing handshake may take before the connection is
+# dropped: it runs on the socket's own thread, between one connection and the
+# next.
+_MM_SOCKET_CLOSE_TIMEOUT_SECONDS = 2.0
+ # How long a directory search made while the adapter is still connecting waits
+ # for it. A bridge is searched as soon as it is registered (the gateway's
+ # directory dialog, the setup scripts), and connecting is a log-in and two
+ # reads, so it is normally under a second.
+ _CONNECT_WAIT_SECONDS = 15.0
+
# Mattermost channel types a bot can be *added* to: open and private channels.
# Membership of a DM ("D") or group DM ("G") is a property of the conversation
# existing rather than of anyone joining, so Mattermost raises no `user_added`