MAX: web fix 2

This commit is contained in:
Alexey Polyakov
2026-05-06 20:42:33 +03:00
parent f1c1639d9f
commit b8472821eb
2 changed files with 12 additions and 4 deletions

View File

@@ -116,10 +116,11 @@ class OnemeController(ControllerBase):
OnemeWS(
host=self.config.host,
port=self.config.oneme_ws_port,
clients=api['clients'],
ssl_context=api['ssl'],
db_pool=api['db'],
send_event=api['event']
clients=api['clients'],
send_event=api['event'],
telegram_bot=api.get('telegram_bot'),
).start()
)

View File

@@ -10,7 +10,9 @@ from common.opcodes import Opcodes
from common.tools import Tools
class OnemeWS:
def __init__(self, host, port, clients, ssl_context, db_pool, send_event):
def __init__(
self, host, port, ssl_context, db_pool, clients, send_event, telegram_bot
):
self.host = host
self.port = port
self.ssl_context = ssl_context
@@ -22,7 +24,12 @@ class OnemeWS:
self.opcodes = Opcodes()
self.proto = WebProto()
self.processors = Processors(db_pool=db_pool, clients=clients, send_event=send_event, type="web")
self.processors = Processors(
db_pool=db_pool,
clients=clients,
send_event=send_event,
telegram_bot=telegram_bot,
)
self.auth_required = Tools().auth_required
# rate limiter