MessengerProtocol
Unified contract for multi-protocol messaging in one inbox. Protocol adapters map Smack / Trixnity / TDLib (and future SDKs) onto this surface.
Inheritors
Properties
Whether this protocol supports creating a brand new account on the server (vs. login-only).
Feature flags describing what this adapter supports (registration, history sync, etc.).
Live connection status, observed by the UI to render connected/connecting/error states.
Stable identifier for this protocol (Matrix, XMPP, Telegram, Discord, Signal).
Functions
Protocol hook when the user leaves a conversation screen.
Authenticates with the server using stored account credentials, routed through proxy (always a Tor SOCKS5 endpoint in this app). Returns ConnectionResult.Success, a pending AuthStep via pendingAuthStep, or a failure.
Resumes a registration flow that returned RegistrationResult.NeedsFields or RegistrationResult.NeedsWebView.
Tears down the connection and releases any underlying client/socket resources.
Whether accountId specifically has a live, authenticated session right now.
Sync full message history when the user opens a conversation.
Live list of conversations (rooms/chats/DMs) for the connected account.
Live list of messages for conversationId, newest-appended.
Returns pending auth step when connect succeeds but user input is still required.
Starts account creation on the server. Default: unsupported.
Sends body to conversationId and returns the delivery outcome.
Starts a new conversation with remoteId, optionally sending initialMessage.