Appservice server mixin

class mautrix.appservice.AppServiceServerMixin

Bases: object

__init__(ephemeral_events=False, encryption_events=False, log=None, hs_token=None)
Parameters
Return type

None

async handle_matrix_event(event, ephemeral=False)
Parameters
  • event (mautrix.types.Event) –

  • ephemeral (bool) –

Return type

None

async handle_transaction(txn_id, *, events, extra_data, ephemeral=None, to_device=None, otk_counts=None, device_lists=None)
Parameters
Return type

mautrix.types.JSON

matrix_event_handler(func)
Parameters

func (Callable[[mautrix.types.Event], Awaitable]) –

Return type

Callable[[mautrix.types.Event], Awaitable]

register_routes(app)
Parameters

app (aiohttp.web_app.Application) –

Return type

None

log: logging.Logger
hs_token: str
ephemeral_events: bool
encryption_events: bool
synchronous_handlers: bool
query_user: Callable[[UserID], JSON]
query_alias: Callable[[RoomAlias], JSON]
transactions: set[str]
event_handlers: list[HandlerFunc]
to_device_handler: HandlerFunc | None
otk_handler: Callable[[dict[UserID, dict[DeviceID, DeviceOTKCount]]], Awaitable] | None
device_list_handler: Callable[[DeviceLists], Awaitable] | None