- Extract _resolve_message_context() to deduplicate ~40 lines of mention/thread/DM gating logic between text and media handlers - Move mautrix.types imports to module level (16 scattered local imports consolidated) - Parse mention/thread env vars once in __init__ instead of per-message - Cache _is_bot_mentioned() result instead of calling 3x per event - Consolidate send_emote/send_notice into shared _send_simple_message() - Use _is_dm_room() in get_chat_info() instead of inline duplication - Add _CRYPTO_PICKLE_PATH constant (was duplicated in 2 locations) - Fix fragile event_ts extraction (double getattr, None safety) - Clean up leaked aiohttp session on auth failure paths - Remove redundant trailing _track_thread() calls |
||
|---|---|---|
| .. | ||
| builtin_hooks | ||
| platforms | ||
| __init__.py | ||
| channel_directory.py | ||
| config.py | ||
| delivery.py | ||
| hooks.py | ||
| mirror.py | ||
| pairing.py | ||
| run.py | ||
| session_context.py | ||
| session.py | ||
| status.py | ||
| sticker_cache.py | ||
| stream_consumer.py | ||