bridge_state

class mautrix.util.bridge_state.BridgeStateEvent

Bases: mautrix.types.SerializableEnum

An enumeration.

STARTING = 'STARTING'
UNCONFIGURED = 'UNCONFIGURED'
RUNNING = 'RUNNING'
BRIDGE_UNREACHABLE = 'BRIDGE_UNREACHABLE'
CONNECTING = 'CONNECTING'
BACKFILLING = 'BACKFILLING'
CONNECTED = 'CONNECTED'
TRANSIENT_DISCONNECT = 'TRANSIENT_DISCONNECT'
BAD_CREDENTIALS = 'BAD_CREDENTIALS'
UNKNOWN_ERROR = 'UNKNOWN_ERROR'
LOGGED_OUT = 'LOGGED_OUT'
class mautrix.util.bridge_state.BridgeState

Bases: mautrix.types.SerializableAttrs

human_readable_errors: ClassVar[Dict[Optional[str], str]] = {}
default_source: ClassVar[str] = 'bridge'
default_error_ttl: ClassVar[int] = 60
default_ok_ttl: ClassVar[int] = 240
state_event: mautrix.util.bridge_state.BridgeStateEvent
user_id: Optional[mautrix.types.UserID]
remote_id: Optional[str]
remote_name: Optional[str]
timestamp: Optional[int]
ttl: int
source: Optional[str]
error: Optional[str]
message: Optional[str]
info: Optional[Dict[str, Any]]
reason: Optional[str]
send_attempts_: int
fill()
Return type

mautrix.util.bridge_state.BridgeState

should_deduplicate(prev_state)
Parameters

prev_state (Optional[mautrix.util.bridge_state.BridgeState]) –

Return type

bool

async send(url, token, log, log_sent=True)
Parameters
Return type

bool

__init__(*, state_event, user_id=None, remote_id=None, remote_name=None, timestamp=None, ttl=0, source=None, error=None, message=None, info=None, reason=None, send_attempts_=0)

Method generated by attrs for class BridgeState.

Parameters
Return type

None

class mautrix.util.bridge_state.GlobalBridgeState

Bases: mautrix.types.SerializableAttrs

remote_states: Optional[Dict[str, mautrix.util.bridge_state.BridgeState]]
bridge_state: mautrix.util.bridge_state.BridgeState
__init__(*, remote_states=None, bridge_state)

Method generated by attrs for class GlobalBridgeState.

Parameters
Return type

None