Minor cleanups
This commit is contained in:
parent
59ea91519a
commit
c8803bc8cc
@ -17,7 +17,7 @@ from typing import NamedTuple
|
||||
|
||||
from mautrix.bridge.commands import HelpSection
|
||||
|
||||
HelpCacheKey = NamedTuple("FBHelpCacheKey", is_management=bool, is_admin=bool, is_logged_in=bool)
|
||||
HelpCacheKey = NamedTuple("KTHelpCacheKey", is_management=bool, is_admin=bool, is_logged_in=bool)
|
||||
|
||||
SECTION_AUTH = HelpSection("Authentication", 10, "")
|
||||
SECTION_CONNECTION = HelpSection("Connection management", 15, "")
|
||||
|
@ -51,9 +51,6 @@ class Config(BaseBridgeConfig):
|
||||
|
||||
copy("homeserver.asmux")
|
||||
|
||||
if self["appservice.bot_avatar"] == "mxc://maunium.net/ddtNPZSKMNqaUzqrHuWvUADv":
|
||||
base["appservice.bot_avatar"] = "mxc://maunium.net/ygtkteZsXnGJLJHRchUwYWak"
|
||||
|
||||
copy("appservice.public.enabled")
|
||||
copy("appservice.public.prefix")
|
||||
copy("appservice.public.external")
|
||||
|
@ -17,8 +17,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Type
|
||||
|
||||
from ..types.api.auth_api_client import KnownAuthStatusCode
|
||||
from ..types.request import KnownDataStatusCode, RootCommandResult
|
||||
|
||||
|
@ -35,8 +35,8 @@ class PathAttachment(Attachment):
|
||||
s: int
|
||||
|
||||
|
||||
from .media import *
|
||||
from .reply import *
|
||||
from .mention import *
|
||||
from .media import *
|
||||
from .emoticon import *
|
||||
#from .voip import *
|
||||
|
@ -68,6 +68,8 @@ _attachment_type_map: dict[KnownChatType, Type[Attachment]] = {
|
||||
KnownChatType.CONTACT: ContactAttachment,
|
||||
KnownChatType.AUDIO: AudioAttachment,
|
||||
KnownChatType.DITEMEMOTICON: EmoticonAttachment,
|
||||
KnownChatType.STICKER: EmoticonAttachment,
|
||||
KnownChatType.STICKERANI: EmoticonAttachment,
|
||||
KnownChatType.SCHEDULE: OpenScheduleAttachment,
|
||||
KnownChatType.VOTE: VoteAttachment,
|
||||
KnownChatType.MAP: MapAttachment,
|
||||
|
@ -16,7 +16,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Union
|
||||
import time
|
||||
|
||||
from mautrix.bridge import BaseMatrixHandler
|
||||
from mautrix.errors import MatrixError
|
||||
@ -39,7 +38,6 @@ from mautrix.types import (
|
||||
)
|
||||
|
||||
from . import portal as po, puppet as pu, user as u
|
||||
from .db import Message as DBMessage
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .__main__ import KakaoTalkBridge
|
||||
@ -238,7 +236,7 @@ class MatrixHandler(BaseMatrixHandler):
|
||||
event_id: EventID,
|
||||
data: SingleReceiptEventContent,
|
||||
) -> None:
|
||||
self.log.info("TODO")
|
||||
self.log.info("TODO: handle_read_receipt")
|
||||
"""
|
||||
if not user.mqtt:
|
||||
return
|
||||
|
@ -63,7 +63,7 @@ class RPCClient:
|
||||
r, w = await asyncio.open_unix_connection(self.config["rpc.connection.path"])
|
||||
break
|
||||
except:
|
||||
self.log.warn(f'No unix socket available at {self.config["rpc.connection.path"]}, wait for it to exist...')
|
||||
self.log.warning(f'No unix socket available at {self.config["rpc.connection.path"]}, wait for it to exist...')
|
||||
await asyncio.sleep(10)
|
||||
elif self.config["rpc.connection.type"] == "tcp":
|
||||
while True:
|
||||
@ -72,7 +72,7 @@ class RPCClient:
|
||||
self.config["rpc.connection.port"])
|
||||
break
|
||||
except:
|
||||
self.log.warn(f'No TCP connection open at {self.config["rpc.connection.host"]}:{self.config["rpc.connection.path"]}, wait for it to become available...')
|
||||
self.log.warning(f'No TCP connection open at {self.config["rpc.connection.host"]}:{self.config["rpc.connection.path"]}, wait for it to become available...')
|
||||
await asyncio.sleep(10)
|
||||
else:
|
||||
raise RuntimeError("invalid rpc connection type")
|
||||
|
Loading…
Reference in New Issue
Block a user