MatrixApi class

Inheritance
Implementers
Available extensions

Constructors

MatrixApi({Uri? homeserver, String? accessToken, Client? httpClient})

Properties

accessToken String?
This is the access token for the matrix client. When it is undefined, then the user needs to sign in first.
getter/setter pair
baseUri Uri?
getter/setter pairinherited
bearerToken String?
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
homeserver Uri?
The homeserver this client is communicating with.
getter/setter pair
httpClient ↔ Client
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add3PID(String clientSecret, String sid, {AuthenticationData? auth}) Future<void>
This API endpoint uses the User-Interactive Authentication API.
inherited
ban(String roomId, String userId, {String? reason}) Future<void>
Ban a user in the room. If the user is currently in the room, also kick them.
inherited
bind3PID(String clientSecret, String idAccessToken, String idServer, String sid) Future<void>
Binds a 3PID to the user's account through the specified identity server.
inherited
bodySizeExceeded(int expected, int actual) → Never
override
changePassword(String newPassword, {AuthenticationData? auth, bool? logoutDevices}) Future<void>
Changes the password for an account on this homeserver.
inherited
checkUsernameAvailability(String username) Future<bool?>
Checks to see if a username is available, and valid, for the server.
inherited
claimKeys(Map<String, Map<String, String>> oneTimeKeys, {int? timeout}) Future<ClaimKeysResponse>
Claims one-time keys for use in pre-key messages.
inherited
createContent() Future<CreateContentResponse>
Creates a new mxc:// URI, independently of the content being uploaded. The content must be provided later via PUT /_matrix/media/v3/upload/{serverName}/{mediaId}.
inherited
createRoom({Map<String, Object?>? creationContent, List<StateEvent>? initialState, List<String>? invite, List<Invite3pid>? invite3pid, bool? isDirect, String? name, Map<String, Object?>? powerLevelContentOverride, CreateRoomPreset? preset, String? roomAliasName, String? roomVersion, String? topic, Visibility? visibility}) Future<String>
Create a new room with various configuration options.
inherited
deactivateAccount({AuthenticationData? auth, bool? erase, String? idServer}) Future<IdServerUnbindResult>
Deactivate the user's account, removing all ability for the user to login again.
inherited
defineFilter(String userId, Filter body) Future<String>
Uploads a new filter definition to the homeserver. Returns a filter ID that may be used in future requests to restrict which events are returned to the client.
inherited
delete3pidFromAccount(String address, ThirdPartyIdentifierMedium medium, {String? idServer}) Future<IdServerUnbindResult>
Removes a third-party identifier from the user's account. This might not cause an unbind of the identifier from the identity server.
inherited
deleteDevice(String deviceId, {AuthenticationData? auth}) Future<void>
This API endpoint uses the User-Interactive Authentication API.
inherited
deleteDevices(List<String> devices, {AuthenticationData? auth}) Future<void>
This API endpoint uses the User-Interactive Authentication API.
inherited
deletePusher(PusherId pusher) Future<void>
Variant of postPusher operation that deletes pushers by setting kind: null.
deletePushRule(PushRuleKind kind, String ruleId) Future<void>
This endpoint removes the push rule defined in the path.
inherited
deleteRoomAlias(String roomAlias) Future<void>
Remove a mapping of room alias to room ID.
inherited
deleteRoomKeyBySessionId(String roomId, String sessionId, String version) Future<RoomKeysUpdateResponse>
Delete a key from the backup.
inherited
deleteRoomKeys(String version) Future<RoomKeysUpdateResponse>
Delete the keys from the backup.
inherited
deleteRoomKeysByRoomId(String roomId, String version) Future<RoomKeysUpdateResponse>
Delete the keys from the backup for a given room.
inherited
deleteRoomKeysBySessionId(String roomId, String sessionId, String version) Future<RoomKeysUpdateResponse>
deleteRoomKeysVersion(String version) Future<void>
Delete an existing key backup. Both the information about the backup, as well as all key data related to the backup will be deleted.
inherited
deleteRoomTag(String userId, String roomId, String tag) Future<void>
Remove a tag from the room.
inherited
forgetRoom(String roomId) Future<void>
This API stops a user remembering about a particular room.
inherited
generateLoginToken({AuthenticationData? auth}) Future<GenerateLoginTokenResponse>
Optional endpoint - the server is not required to implement this endpoint if it does not intend to use or support this functionality.
inherited
getAccount3PIDs() Future<List<ThirdPartyIdentifier>?>
Gets a list of the third-party identifiers that the homeserver has associated with the user's account.
inherited
getAccountData(String userId, String type) Future<Map<String, Object?>>
Get some account data for the client. This config is only visible to the user that set the account data.
inherited
getAccountDataPerRoom(String userId, String roomId, String type) Future<Map<String, Object?>>
Get some account data for the client on a given room. This config is only visible to the user that set the account data.
inherited
getAvatarUrl(String userId) Future<Uri?>
Get the user's avatar URL. This API may be used to fetch the user's own avatar URL or to query the URL of other users; either locally or on remote homeservers.
inherited
getCapabilities() Future<Capabilities>
Gets information about the server's supported feature set and other relevant capabilities.
inherited
getConfig() Future<MediaConfig>
{{% boxes/note %}} Replaced by GET /_matrix/client/v1/media/config. {{% /boxes/note %}}
inherited
getConfigAuthed() Future<MediaConfig>
This endpoint allows clients to retrieve the configuration of the content repository, such as upload limitations. Clients SHOULD use this as a guide when using content repository endpoints. All values are intentionally left optional. Clients SHOULD follow the advice given in the field description when the field is not available.
inherited
getContent(String serverName, String mediaId, {bool? allowRemote, int? timeoutMs, bool? allowRedirect}) Future<FileResponse>
{{% boxes/note %}} Replaced by GET /_matrix/client/v1/media/download/{serverName}/{mediaId} (requires authentication). {{% /boxes/note %}}
inherited
getContentAuthed(String serverName, String mediaId, {int? timeoutMs}) Future<FileResponse>
{{% boxes/note %}} Clients SHOULD NOT generate or use URLs which supply the access token in the query string. These URLs may be copied by users verbatim and provided in a chat message to another user, disclosing the sender's access token. {{% /boxes/note %}}
inherited
getContentOverrideName(String serverName, String mediaId, String fileName, {bool? allowRemote, int? timeoutMs, bool? allowRedirect}) Future<FileResponse>
{{% boxes/note %}} Replaced by GET /_matrix/client/v1/media/download/{serverName}/{mediaId}/{fileName} (requires authentication). {{% /boxes/note %}}
inherited
getContentOverrideNameAuthed(String serverName, String mediaId, String fileName, {int? timeoutMs}) Future<FileResponse>
This will download content from the content repository (same as the previous endpoint) but replaces the target file name with the one provided by the caller.
inherited
getContentThumbnail(String serverName, String mediaId, int width, int height, {Method? method, bool? allowRemote, int? timeoutMs, bool? allowRedirect, bool? animated}) Future<FileResponse>
{{% boxes/note %}} Replaced by GET /_matrix/client/v1/media/thumbnail/{serverName}/{mediaId} (requires authentication). {{% /boxes/note %}}
inherited
getContentThumbnailAuthed(String serverName, String mediaId, int width, int height, {Method? method, int? timeoutMs, bool? animated}) Future<FileResponse>
Download a thumbnail of content from the content repository. See the Thumbnails section for more information.
inherited
getDevice(String deviceId) Future<Device>
Gets information on a single device, by device id.
inherited
getDevices() Future<List<Device>?>
Gets information about all devices for the current user.
inherited
getDisplayName(String userId) Future<String?>
Get the user's display name. This API may be used to fetch the user's own displayname or to query the name of other users; either locally or on remote homeservers.
inherited
getEventByTimestamp(String roomId, int ts, Direction dir) Future<GetEventByTimestampResponse>
Get the ID of the event closest to the given timestamp, in the direction specified by the dir parameter.
inherited
getEventContext(String roomId, String eventId, {int? limit, String? filter}) Future<EventContext>
This API returns a number of events that happened just before and after the specified event. This allows clients to get the context surrounding an event.
inherited
getEvents({String? from, int? timeout}) Future<GetEventsResponse>
This will listen for new events and return them to the caller. This will block until an event is received, or until the timeout is reached.
inherited
getFilter(String userId, String filterId) Future<Filter>
userId The user ID to download a filter for.
inherited
getJoinedMembersByRoom(String roomId) Future<Map<String, RoomMember>?>
This API returns a map of MXIDs to member info objects for members of the room. The current user must be in the room for it to work, unless it is an Application Service in which case any of the AS's users must be in the room. This API is primarily for Application Services and should be faster to respond than /members as it can be implemented more efficiently on the server.
inherited
getJoinedRooms() Future<List<String>>
This API returns a list of the user's current rooms.
inherited
getKeysChanges(String from, String to) Future<GetKeysChangesResponse>
Gets a list of users who have updated their device identity keys since a previous sync token.
inherited
getLocalAliases(String roomId) Future<List<String>>
Get a list of aliases maintained by the local server for the given room.
inherited
getLoginFlows() Future<List<LoginFlow>?>
Gets the homeserver's supported login types to authenticate users. Clients should pick one of these and supply it as the type when logging in.
inherited
getMembersByRoom(String roomId, {String? at, Membership? membership, Membership? notMembership}) Future<List<MatrixEvent>?>
Get the list of members for this room.
inherited
getNotifications({String? from, int? limit, String? only}) Future<GetNotificationsResponse>
This API is used to paginate through the list of events that the user has been, or would have been notified about.
inherited
getOneEvent(String eventId) Future<MatrixEvent>
Get a single event based on event_id. You must have permission to retrieve this event e.g. by being a member in the room for this event.
inherited
getOneRoomEvent(String roomId, String eventId) Future<MatrixEvent>
Get a single event based on roomId/eventId. You must have permission to retrieve this event e.g. by being a member in the room for this event.
inherited
getPresence(String userId) Future<GetPresenceResponse>
Get the given user's presence state.
inherited
getProtocolMetadata(String protocol) Future<Protocol>
Fetches the metadata from the homeserver about a particular third-party protocol.
inherited
getProtocols() Future<Map<String, Protocol>>
Fetches the overall metadata about protocols supported by the homeserver. Includes both the available protocols and all fields required for queries against each protocol.
inherited
getPublicRooms({int? limit, String? since, String? server}) Future<GetPublicRoomsResponse>
Lists the public rooms on the server.
inherited
getPushers() Future<List<Pusher>?>
Gets all currently active pushers for the authenticated user.
inherited
getPushRule(PushRuleKind kind, String ruleId) Future<PushRule>
Retrieve a single specified push rule.
inherited
getPushRuleActions(PushRuleKind kind, String ruleId) Future<List<Object?>>
This endpoint get the actions for the specified push rule.
inherited
getPushRules() Future<PushRuleSet>
Retrieve all push rulesets for this user. Currently the only push ruleset defined is global.
inherited
getPushRulesGlobal() Future<GetPushRulesGlobalResponse>
Retrieve all push rules for this user.
inherited
getRelatingEvents(String roomId, String eventId, {String? from, String? to, int? limit, Direction? dir, bool? recurse}) Future<GetRelatingEventsResponse>
Retrieve all of the child events for a given parent event.
inherited
getRelatingEventsWithRelType(String roomId, String eventId, String relType, {String? from, String? to, int? limit, Direction? dir, bool? recurse}) Future<GetRelatingEventsWithRelTypeResponse>
Retrieve all of the child events for a given parent event which relate to the parent using the given relType.
inherited
getRelatingEventsWithRelTypeAndEventType(String roomId, String eventId, String relType, String eventType, {String? from, String? to, int? limit, Direction? dir, bool? recurse}) Future<GetRelatingEventsWithRelTypeAndEventTypeResponse>
Retrieve all of the child events for a given parent event which relate to the parent using the given relType and have the given eventType.
inherited
getRoomEvents(String roomId, Direction dir, {String? from, String? to, int? limit, String? filter}) Future<GetRoomEventsResponse>
This API returns a list of message and state events for a room. It uses pagination query parameters to paginate history in the room.
inherited
getRoomIdByAlias(String roomAlias) Future<GetRoomIdByAliasResponse>
Requests that the server resolve a room alias to a room ID.
inherited
getRoomKeyBySessionId(String roomId, String sessionId, String version) Future<KeyBackupData>
Retrieve a key from the backup.
inherited
getRoomKeys(String version) Future<RoomKeys>
Retrieve the keys from the backup.
inherited
getRoomKeysByRoomId(String roomId, String version) Future<RoomKeyBackup>
Retrieve the keys from the backup for a given room.
inherited
getRoomKeysBySessionId(String roomId, String sessionId, String version) Future<KeyBackupData>
getRoomKeysVersion(String version) Future<GetRoomKeysVersionResponse>
Get information about an existing backup.
inherited
getRoomKeysVersionCurrent() Future<GetRoomKeysVersionCurrentResponse>
Get information about the latest backup version.
inherited
getRoomState(String roomId) Future<List<MatrixEvent>>
Get the state events for the current state of a room.
inherited
getRoomStateWithKey(String roomId, String eventType, String stateKey) Future<Map<String, Object?>>
Looks up the contents of a state event in a room. If the user is joined to the room then the state is taken from the current state of the room. If the user has left the room then the state is taken from the state of the room when they left.
inherited
getRoomTags(String userId, String roomId) Future<Map<String, Tag>?>
List the tags set by a user on a room.
inherited
getRoomVisibilityOnDirectory(String roomId) Future<Visibility?>
Gets the visibility of a given room on the server's public room directory.
inherited
getSpaceHierarchy(String roomId, {bool? suggestedOnly, int? limit, int? maxDepth, String? from}) Future<GetSpaceHierarchyResponse>
Paginates over the space tree in a depth-first manner to locate child rooms of a given space.
inherited
getThreadRoots(String roomId, {Include? include, int? limit, String? from}) Future<GetThreadRootsResponse>
This API is used to paginate through the list of the thread roots in a given room.
inherited
getTokenOwner() Future<TokenOwnerInfo>
Gets information about the owner of a given access token.
inherited
getTurnServer() Future<TurnServerCredentials>
This API provides credentials for the client to use when initiating calls.
override
getUrlPreview(Uri url, {int? ts}) Future<PreviewForUrl>
{{% boxes/note %}} Replaced by GET /_matrix/client/v1/media/preview_url. {{% /boxes/note %}}
inherited
getUrlPreviewAuthed(Uri url, {int? ts}) Future<PreviewForUrl>
Get information about a URL for the client. Typically this is called when a client sees a URL in a message and wants to render a preview for the user.
inherited
getUserProfile(String userId) Future<ProfileInformation>
Get the combined profile information for this user. This API may be used to fetch the user's own profile information or other users; either locally or on remote homeservers.
inherited
getVersions() Future<GetVersionsResponse>
Gets the versions of the specification supported by the server.
inherited
getWellknown() Future<DiscoveryInformation>
Gets discovery information about the domain. The file may include additional keys, which MUST follow the Java package naming convention, e.g. com.example.myapp.property. This ensures property names are suitably namespaced for each application and reduces the risk of clashes.
inherited
getWellknownSupport() Future<GetWellknownSupportResponse>
Gets server admin contact and support page of the domain.
inherited
getWhoIs(String userId) Future<WhoIsInfo>
Gets information about a particular user.
inherited
inviteBy3PID(String roomId, String address, String idAccessToken, String idServer, String medium) Future<void>
Note that there are two forms of this API, which are documented separately. This version of the API does not require that the inviter know the Matrix identifier of the invitee, and instead relies on third-party identifiers. The homeserver uses an identity server to perform the mapping from third-party identifier to a Matrix identifier. The other is documented in the joining rooms section.
inherited
inviteUser(String roomId, String userId, {String? reason}) Future<void>
Note that there are two forms of this API, which are documented separately. This version of the API requires that the inviter knows the Matrix identifier of the invitee. The other is documented in the third-party invites section.
inherited
isPushRuleEnabled(PushRuleKind kind, String ruleId) Future<bool>
This endpoint gets whether the specified push rule is enabled.
inherited
joinRoom(String roomIdOrAlias, {List<String>? serverName, List<String>? via, String? reason, ThirdPartySigned? thirdPartySigned}) Future<String>
Note that this API takes either a room ID or alias, unlike /rooms/{roomId}/join.
inherited
joinRoomById(String roomId, {String? reason, ThirdPartySigned? thirdPartySigned}) Future<String>
Note that this API requires a room ID, not alias. /join/{roomIdOrAlias} exists if you have a room alias.
inherited
kick(String roomId, String userId, {String? reason}) Future<void>
Kick a user from the room.
inherited
knockRoom(String roomIdOrAlias, {List<String>? serverName, List<String>? via, String? reason}) Future<String>
Note that this API takes either a room ID or alias, unlike other membership APIs.
inherited
leaveRoom(String roomId, {String? reason}) Future<void>
This API stops a user participating in a particular room.
inherited
login(String type, {String? address, String? deviceId, AuthenticationIdentifier? identifier, String? initialDeviceDisplayName, String? medium, String? password, bool? refreshToken, String? token, String? user}) Future<LoginResponse>
Authenticates the user, and issues an access token they can use to authorize themself in subsequent requests.
inherited
logout() Future<void>
Invalidates an existing access token, so that it can no longer be used for authorization. The device associated with the access token is also deleted. Device keys for the device are deleted alongside the device.
inherited
logoutAll() Future<void>
Invalidates all access tokens for a user, so that they can no longer be used for authorization. This includes the access token that made this request. All devices for the user are also deleted. Device keys for the device are deleted alongside the device.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peekEvents({String? from, int? timeout, String? roomId}) Future<PeekEventsResponse>
This will listen for new events related to a particular room and return them to the caller. This will block until an event is received, or until the timeout is reached.
inherited
pingAppservice(String appserviceId, {String? transactionId}) Future<int>
This API asks the homeserver to call the /_matrix/app/v1/ping endpoint on the application service to ensure that the homeserver can communicate with the application service.
inherited
post3PIDs(ThreePidCredentials threePidCreds) Future<Uri?>
Adds contact information to the user's account.
inherited
postPusher(Pusher pusher, {bool? append}) Future<void>
This endpoint allows the creation, modification and deletion of pushers for this user ID. The behaviour of this endpoint varies depending on the values in the JSON body.
postReceipt(String roomId, ReceiptType receiptType, String eventId, {String? threadId}) Future<void>
This API updates the marker for the given receipt type to the event ID specified.
inherited
postRoomKeysVersion(BackupAlgorithm algorithm, Map<String, Object?> authData) Future<String>
Creates a new backup.
inherited
putRoomKeyBySessionId(String roomId, String sessionId, String version, KeyBackupData body) Future<RoomKeysUpdateResponse>
Store a key in the backup.
inherited
putRoomKeys(String version, RoomKeys body) Future<RoomKeysUpdateResponse>
Store several keys in the backup.
inherited
putRoomKeysByRoomId(String roomId, String version, RoomKeyBackup body) Future<RoomKeysUpdateResponse>
Store several keys in the backup for a given room.
inherited
putRoomKeysBySessionId(String roomId, String sessionId, String version, KeyBackupData data) Future<RoomKeysUpdateResponse>
putRoomKeysVersion(String version, BackupAlgorithm algorithm, Map<String, Object?> authData) Future<Map<String, Object?>>
Update information about an existing backup. Only auth_data can be modified.
inherited
queryKeys(Map<String, List<String>> deviceKeys, {int? timeout}) Future<QueryKeysResponse>
Returns the current devices and identity keys for the given users.
inherited
queryLocationByAlias(String alias) Future<List<Location>>
Retrieve an array of third-party network locations from a Matrix room alias.
inherited
queryLocationByProtocol(String protocol, {Map<String, String>? fields}) Future<List<Location>>
Requesting this endpoint with a valid protocol name results in a list of successful mapping results in a JSON array. Each result contains objects to represent the Matrix room or rooms that represent a portal to this third-party network. Each has the Matrix room alias string, an identifier for the particular third-party network protocol, and an object containing the network-specific fields that comprise this identifier. It should attempt to canonicalise the identifier as much as reasonably possible given the network type.
inherited
queryPublicRooms({String? server, PublicRoomQueryFilter? filter, bool? includeAllNetworks, int? limit, String? since, String? thirdPartyInstanceId}) Future<QueryPublicRoomsResponse>
Lists the public rooms on the server, with optional filter.
inherited
queryUserByID(String userid) Future<List<ThirdPartyUser>>
Retrieve an array of third-party users from a Matrix User ID.
inherited
queryUserByProtocol(String protocol, {Map<String, String>? fields}) Future<List<ThirdPartyUser>>
Retrieve a Matrix User ID linked to a user on the third-party service, given a set of user parameters.
inherited
redactEvent(String roomId, String eventId, String txnId, {String? reason}) Future<String?>
Strips all information out of an event which isn't critical to the integrity of the server-side representation of the room.
inherited
refresh(String refreshToken) Future<RefreshResponse>
Refresh an access token. Clients should use the returned access token when making subsequent API calls, and store the returned refresh token (if given) in order to refresh the new access token when necessary.
inherited
register({AccountKind? kind, AuthenticationData? auth, String? deviceId, bool? inhibitLogin, String? initialDeviceDisplayName, String? password, bool? refreshToken, String? username}) Future<RegisterResponse>
This API endpoint uses the User-Interactive Authentication API, except in the cases where a guest account is being registered.
inherited
registrationTokenValidity(String token) Future<bool>
Queries the server to determine if a given registration token is still valid at the time of request. This is a point-in-time check where the token might still expire by the time it is used.
inherited
reportContent(String roomId, String eventId, {String? reason, int? score}) Future<void>
Reports an event as inappropriate to the server, which may then notify the appropriate people. The caller must be joined to the room to report it.
inherited
request(RequestType type, String action, {dynamic data = '', String contentType = 'application/json', Map<String, Object?>? query}) Future<Map<String, Object?>>
Used for all Matrix json requests using the c2s API.
requestOpenIdToken(String userId, Map<String, Object?> body) Future<OpenIdCredentials>
Gets an OpenID token object that the requester may supply to another service to verify their identity in Matrix. The generated token is only valid for exchanging for user information from the federation API for OpenID.
inherited
requestTokenTo3PIDEmail(String clientSecret, String email, int sendAttempt, {String? nextLink, String? idAccessToken, String? idServer}) Future<RequestTokenResponse>
The homeserver must check that the given email address is not already associated with an account on this homeserver. This API should be used to request validation tokens when adding an email address to an account. This API's parameters and response are identical to that of the /register/email/requestToken endpoint. The homeserver should validate the email itself, either by sending a validation email itself or by using a service it has control over.
inherited
requestTokenTo3PIDMSISDN(String clientSecret, String country, String phoneNumber, int sendAttempt, {String? nextLink, String? idAccessToken, String? idServer}) Future<RequestTokenResponse>
The homeserver must check that the given phone number is not already associated with an account on this homeserver. This API should be used to request validation tokens when adding a phone number to an account. This API's parameters and response are identical to that of the /register/msisdn/requestToken endpoint. The homeserver should validate the phone number itself, either by sending a validation message itself or by using a service it has control over.
inherited
requestTokenToRegisterEmail(String clientSecret, String email, int sendAttempt, {String? nextLink, String? idAccessToken, String? idServer}) Future<RequestTokenResponse>
The homeserver must check that the given email address is not already associated with an account on this homeserver. The homeserver should validate the email itself, either by sending a validation email itself or by using a service it has control over.
inherited
requestTokenToRegisterMSISDN(String clientSecret, String country, String phoneNumber, int sendAttempt, {String? nextLink, String? idAccessToken, String? idServer}) Future<RequestTokenResponse>
The homeserver must check that the given phone number is not already associated with an account on this homeserver. The homeserver should validate the phone number itself, either by sending a validation message itself or by using a service it has control over.
inherited
requestTokenToResetPasswordEmail(String clientSecret, String email, int sendAttempt, {String? nextLink, String? idAccessToken, String? idServer}) Future<RequestTokenResponse>
The homeserver must check that the given email address is associated with an account on this homeserver. This API should be used to request validation tokens when authenticating for the /account/password endpoint.
inherited
requestTokenToResetPasswordMSISDN(String clientSecret, String country, String phoneNumber, int sendAttempt, {String? nextLink, String? idAccessToken, String? idServer}) Future<RequestTokenResponse>
The homeserver must check that the given phone number is associated with an account on this homeserver. This API should be used to request validation tokens when authenticating for the /account/password endpoint.
inherited
Performs a full text search across different categories.
inherited
searchUserDirectory(String searchTerm, {int? limit}) Future<SearchUserDirectoryResponse>
Performs a search for users. The homeserver may determine which subset of users are searched, however the homeserver MUST at a minimum consider the users the requesting user shares a room with and those who reside in public rooms (known to the homeserver). The search MUST consider local users to the homeserver, and SHOULD query remote users as part of the search.
inherited
sendMessage(String roomId, String eventType, String txnId, Map<String, Object?> body) Future<String>
This endpoint is used to send a message event to a room. Message events allow access to historical events and pagination, making them suited for "once-off" activity in a room.
inherited
sendToDevice(String eventType, String txnId, Map<String, Map<String, Map<String, Object?>>> messages) Future<void>
This endpoint is used to send send-to-device events to a set of client devices.
inherited
setAccountData(String userId, String type, Map<String, Object?> body) Future<void>
Set some account data for the client. This config is only visible to the user that set the account data. The config will be available to clients through the top-level account_data field in the homeserver response to /sync.
inherited
setAccountDataPerRoom(String userId, String roomId, String type, Map<String, Object?> body) Future<void>
Set some account data for the client on a given room. This config is only visible to the user that set the account data. The config will be delivered to clients in the per-room entries via /sync.
inherited
setAvatarUrl(String userId, Uri? avatarUrl) Future<void>
This API sets the given user's avatar URL. You must have permission to set this user's avatar URL, e.g. you need to have their access_token.
inherited
setDisplayName(String userId, String? displayname) Future<void>
This API sets the given user's display name. You must have permission to set this user's display name, e.g. you need to have their access_token.
inherited
setPresence(String userId, PresenceType presence, {String? statusMsg}) Future<void>
This API sets the given user's presence state. When setting the status, the activity time is updated to reflect that activity; the client does not need to specify the last_active_ago field. You cannot set the presence state of another user.
inherited
setPushRule(PushRuleKind kind, String ruleId, List<Object?> actions, {String? before, String? after, List<PushCondition>? conditions, String? pattern}) Future<void>
This endpoint allows the creation and modification of user defined push rules.
inherited
setPushRuleActions(PushRuleKind kind, String ruleId, List<Object?> actions) Future<void>
This endpoint allows clients to change the actions of a push rule. This can be used to change the actions of builtin rules.
inherited
setPushRuleEnabled(PushRuleKind kind, String ruleId, bool enabled) Future<void>
This endpoint allows clients to enable or disable the specified push rule.
inherited
setReadMarker(String roomId, {String? mFullyRead, String? mRead, String? mReadPrivate}) Future<void>
Sets the position of the read marker for a given room, and optionally the read receipt's location.
inherited
setRoomAlias(String roomAlias, String roomId) Future<void>
roomAlias The room alias to set. Its format is defined in the appendices.
inherited
setRoomStateWithKey(String roomId, String eventType, String stateKey, Map<String, Object?> body) Future<String>
State events can be sent using this endpoint. These events will be overwritten if <room id>, <event type> and <state key> all match.
inherited
setRoomTag(String userId, String roomId, String tag, Tag body) Future<void>
Add a tag to the room.
inherited
setRoomVisibilityOnDirectory(String roomId, {Visibility? visibility}) Future<void>
Sets the visibility of a given room in the server's public room directory.
inherited
setTyping(String userId, String roomId, bool typing, {int? timeout}) Future<void>
This tells the server that the user is typing for the next N milliseconds where N is the value specified in the timeout key. Alternatively, if typing is false, it tells the server that the user has stopped typing.
inherited
sync({String? filter, String? since, bool? fullState, PresenceType? setPresence, int? timeout}) Future<SyncUpdate>
Synchronise the client's state with the latest state on the server. Clients use this API when they first log in to get an initial snapshot of the state on the server, and then continue to call this API to get incremental deltas to the state, and to receive new messages.
inherited
toString() String
A string representation of this object.
inherited
unban(String roomId, String userId, {String? reason}) Future<void>
Unban a user from the room. This allows them to be invited to the room, and join if they would otherwise be allowed to join according to its join rules.
inherited
unbind3pidFromAccount(String address, ThirdPartyIdentifierMedium medium, {String? idServer}) Future<IdServerUnbindResult>
Removes a user's third-party identifier from the provided identity server without removing it from the homeserver.
inherited
unexpectedResponse(BaseResponse response, Uint8List body) → Never
override
updateAppserviceRoomDirectoryVisibility(String networkId, String roomId, Visibility visibility) Future<Map<String, Object?>>
Updates the visibility of a given room on the application service's room directory.
inherited
updateDevice(String deviceId, {String? displayName}) Future<void>
Updates the metadata on the given device.
inherited
upgradeRoom(String roomId, String newVersion) Future<String>
Upgrades the given room to a particular room version.
inherited
uploadContent(Uint8List body, {String? filename, String? contentType}) Future<Uri>
filename The name of the file being uploaded
inherited
uploadContentToMXC(String serverName, String mediaId, Uint8List body, {String? filename, String? contentType}) Future<Map<String, Object?>>
This endpoint permits uploading content to an mxc:// URI that was created earlier via POST /_matrix/media/v1/create.
inherited
uploadCrossSigningKeys({AuthenticationData? auth, MatrixCrossSigningKey? masterKey, MatrixCrossSigningKey? selfSigningKey, MatrixCrossSigningKey? userSigningKey}) Future<void>
Publishes cross-signing keys for the user.
inherited
uploadCrossSigningSignatures(Map<String, Map<String, Map<String, Object?>>> body) Future<Map<String, Map<String, Map<String, Object?>>>?>
Publishes cross-signing signatures for the user.
inherited
uploadKeys({MatrixDeviceKeys? deviceKeys, Map<String, Object?>? fallbackKeys, Map<String, Object?>? oneTimeKeys}) Future<Map<String, int>>
Publishes end-to-end encryption keys for the device.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited