package
0.0.0-20250319160420-55095cf70add
Repository: https://github.com/matrix-org/complement.git
Documentation: pkg.go.dev
# Functions
GetJSONFieldStr extracts a value from a byte-encoded JSON body given a search key.
No description provided by the author
GjsonEscape escapes .
NewLoggedClient returns an http.Client which logs requests/responses.
ParseJSON parses a JSON-encoded HTTP Response body into a byte slice.
Splits an MXC URI into its origin and media ID parts.
No description provided by the author
Calls the `check` function for each global account data event, and returns with success if the `check` function returns true for at least one event.
Checks that `userID` gets invited to `roomID`.
Check that `userID` gets joined to `roomID` by inspecting the join timeline for a membership event.
Check that `userID` is leaving `roomID` by inspecting the timeline for a membership event, or witnessing `roomID` in `rooms.leave` Note: This will not work properly with initial syncs, see https://github.com/matrix-org/matrix-doc/issues/3537.
Check that the sync contains presence from a user, optionally with an expected presence (set to nil to not check), and optionally with extra checks.
Calls the `check` function for each account data event for the given room, and returns with success if the `check` function returns true for at least one event.
Check that the state section for `roomID` has an event which passes the check function.
Check that the timeline for `roomID` has an event which passes the check function.
Check that the timeline for `roomID` has an event which matches the event ID.
Check that sync has received a to-device message, with optional user filtering.
SyncUsersTyping passes when all users in `userIDs` are typing in the same typing EDU.
WithContentType sets the HTTP request Content-Type header to `cType`.
No description provided by the author
WithJSONBody sets the HTTP request body to the JSON serialised form of `obj`.
WithQueries sets the query parameters on the request.
WithRawBody sets the HTTP request body to `body`.
WithRetryUntil will retry the request until the provided function returns true.
# Type aliases
No description provided by the author
RequestOpt is a functional option which will modify an outgoing HTTP request.
SyncCheckOpt is a functional option for use with MustSyncUntil which should return <nil> if the response satisfies the check, else return a human friendly error.