فهرست منبع

Slim the adapter down to platform work

AsyncSingletonSlot, _websocket_url, connect_too_long and the manual
setup-wizard code go away — the client is a plain cached attribute
again and configuration comes from ChattoConfiguration. Module-level
helpers are renamed to the hermes_*_fn convention
(hermes_standalone_sender_fn et al.) so the gateway can find them, and
set_presence takes a PresenceStatus instead of a string.
Paul Klumpp 1 هفته پیش
والد
کامیت
ac84f6b5b2
2فایلهای تغییر یافته به همراه185 افزوده شده و 461 حذف شده
  1. 183 460
      adapter.py
  2. 2 1
      test_adapter.py

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 183 - 460
adapter.py


+ 2 - 1
test_adapter.py

@@ -25,6 +25,8 @@ import pytest_asyncio
 # Import chattolib types for tests - using vendored chattolib from adapter
 # Import chattolib types for tests - using vendored chattolib from adapter
 
 
 # -- Path setup --
 # -- Path setup --
+PLUGIN_ROOT = os.path.abspath(os.path.dirname(__file__))
+sys.path.insert(0, PLUGIN_ROOT)
 sys.path.insert(0, "/opt/hermes")
 sys.path.insert(0, "/opt/hermes")
 sys.path.insert(0, "/root/.hermes/plugins/platforms/chatto")
 sys.path.insert(0, "/root/.hermes/plugins/platforms/chatto")
 
 
@@ -37,7 +39,6 @@ from adapter import (
     validate_config,
     validate_config,
     register,
     register,
 )
 )
-
 from gateway.config import PlatformConfig
 from gateway.config import PlatformConfig
 from gateway.platforms.base import SendResult, MessageEvent, MessageType
 from gateway.platforms.base import SendResult, MessageEvent, MessageType
 
 

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است