Skip to content

Releases: mautrix/go

v0.13.0

16 Jan 12:05
Compare
Choose a tag to compare
  • Breaking change: Removed IsTyping and SetTyping in appservice.StateStore and removed the TypingStateStore struct implementing those methods.
  • Breaking change: Removed legacy fields in Beeper MSS events.
  • Added knocked rooms to sync response structs.
  • Added wrapper for /timestamp_to_event endpoint added in Matrix v1.6.
  • Fixed MSC3870 uploads not failing properly after using up the max retry count.
  • Fixed parsing non-positive ordered list start positions in HTML parser.

v0.11.1

15 Jan 13:49
Compare
Choose a tag to compare
  • Fixed parsing non-positive ordered list start positions in HTML parser (backport of the same fix in v0.13.0).

v0.12.4

16 Dec 15:18
Compare
Choose a tag to compare
  • Added SendReceipt to support private read receipts and thread receipts in the same function. MarkReadWithContent is now deprecated.
  • Changed media download methods to return errors if the server returns a non-2xx status code.
  • Removed legacy sql_store_upgrade.Upgrade method. Using store.DB.Upgrade() after NewSQLCryptoStore(...) is recommended instead (the bridge module does this automatically).
  • Added missing suggested field to m.space.child content struct.
  • Added device_unused_fallback_key_types to /sync response and appservice transaction structs.
  • Changed ReqSetReadMarkers to omit empty fields.
  • Changed bridge configs to force sqlite3-fk-wal instead of sqlite3.
  • Updated bridge helper to close database connection when stopping.
  • Fixed read receipt and account data endpoints sending null instead of an empty object as the body when content isn't provided.

v0.12.3

15 Nov 22:08
Compare
Choose a tag to compare
  • Breaking change: Added logging for row iteration in the dbutil package. This changes the return type of Query methods from *sql.Rows to a new dbutil.Rows interface.
  • Added flag to disable wrapping database upgrades in a transaction (e.g. to allow setting PRAGMAs for advanced table mutations on SQLite).
  • Deprecated MessageEventContent.GetReplyTo in favor of directly using RelatesTo.GetReplyTo. RelatesTo methods are nil-safe, so checking if RelatesTo is nil is not necessary for using those methods.
  • Added wrapper for space hierarchyendpoint (thanks to @mgcm in #100).
  • Added bridge config option to handle transactions asynchronously.
  • Added separate channels for to-device events in appservice transaction handler to avoid blocking to-device events behind normal events.
  • Added RelatesTo.GetNonFallbackReplyTo utility method to get the reply event ID, unless the reply is a thread fallback.
  • Added event.TextToHTML as an utility method to HTML-escape a string and replace newlines with <br/>.
  • Added check to bridge encryption helper to make sure the e2ee keys are still on the server. Synapse is known to sometimes lose keys randomly.
  • Changed bridge crypto syncer to crash on M_UNKNOWN_TOKEN errors instead of retrying forever pointlessly.
  • Fixed verifying signatures of fallback one-time keys.

v0.12.2

16 Oct 14:15
Compare
Choose a tag to compare
  • Added utility method to redact bridge commands.
  • Added thread ID field to read receipts to match Matrix v1.4 changes.
  • Added automatic fetching of media repo config at bridge startup to make it easier for bridges to check homeserver media size limits.
  • Added wrapper for the /register/available endpoint.
  • Added custom user agent to all requests mautrix-go makes. The value can be customized by changing the DefaultUserAgent variable.
  • Implemented MSC3664, MSC3862 and MSC3873 in the push rule evaluator.
  • Added workaround for potential race conditions in OTK uploads when using appservice encryption (MSC3202).
  • Fixed generating registrations to use .+ instead of [0-9]+ in the username regex.
  • Fixed panic in megolm session listing methods if the store contains withheld key entries.
  • Fixed missing header in bridge command help messages.

v0.12.1

16 Sep 09:41
Compare
Choose a tag to compare
  • Bumped minimum Go version to 1.18.
  • Added omitempty for a bunch of fields in response structs to make them more usable for server implementations.
  • Added util.RandomToken to generate GitHub-style access tokens with checksums.
  • Added utilities to call the push gateway API.
  • Added unread_notifications and MSC2654 unread_count fields to /sync response structs.
  • Implemented MSC3870 for uploading and downloading media directly to/from an external media storage like S3.
  • Fixed dbutil database ownership checks on SQLite.
  • Fixed typo in unauthorized encryption key withheld code (m.unauthorized -> m.unauthorised).
  • Fixed MSC2409 support to have a separate field for to-device events.

v0.12.0

16 Aug 08:01
Compare
Choose a tag to compare
  • Breaking change: Switched Client.UserTyping to take a time.Duration instead of raw int64 milliseconds.
  • Breaking change: Removed custom reply relation type and switched to using the wire format (nesting in m.in_reply_to).
  • Added device ID to appservice OTK count map to match updated MSC3202. This is also a breaking change, but the previous incorrect behavior wasn't implemented by anything other than mautrix-syncproxy/imessage.
  • (There are probably other breaking changes too).
  • Added database utility and schema upgrade framework
    • Originally from mautrix-whatsapp, but usable for non-bridges too
    • Includes connection wrapper to log query durations and mutate queries for SQLite compatibility (replacing $x with ?x).
  • Added bridge utilities similar to mautrix-python. Currently includes:
    • Crypto helper
    • Startup flow
    • Command handling and some standard commands
    • Double puppeting things
    • Generic parts of config, basic config validation
    • Appservice SQL state store
  • Added alternative markdown spoiler parsing extension that doesn't support reasons, but works better otherwise.
  • Added Discord underline markdown parsing extension (_foo_ -> foo).
  • Added support for parsing spoilers and color tags in the HTML parser.
  • Added support for mutating plain text nodes in the HTML parser.
  • Added room version field to the create room request struct.
  • Added empty JSON object as default request body for all non-GET requests.
  • Added wrapper for /capabilities endpoint.
  • Added omitempty markers for lots of structs to make the structs easier to use on the server side too.
  • Added support for registering to-device event handlers via the default Syncer's OnEvent and OnEventType methods.
  • Fixed CreateEventContent using the wrong field name for the room version field.
  • Fixed StopSync not immediately cancelling the sync loop if it was sleeping after a failed sync.
  • Fixed GetAvatarURL always returning the current user's avatar instead of the specified user's avatar (thanks to @nightmared in #83).
  • Improved request logging and added new log when a request finishes.
  • Crypto store improvements:
    • Deleted devices are now kept in the database.
    • Made ValidateMessageIndex atomic.
  • Moved appservice.RandomString to the util package and made it use crypto/rand instead of math/rand.
  • Significantly improved cross-signing validation code.
    • There are now more options for required trust levels, e.g. you can set SendKeysMinTrust to id.TrustStateCrossSignedTOFU to trust the first cross-signing master key seen and require all devices to be signed by that key.
    • Trust state of incoming messages is automatically resolved and stored in evt.Mautrix.TrustState. This can be used to reject incoming messages from untrusted devices.

v0.11.0

16 May 17:30
Compare
Choose a tag to compare
  • Bumped minimum Go version to 1.17.
  • Switched from /r0 to /v3 paths everywhere.
    • The new v3 paths are implemented since Synapse 1.48, Dendrite 0.6.5, and Conduit 0.4.0. Servers older than these are no longer supported.
  • Switched from blackfriday to goldmark for markdown parsing in the format module and added spoiler syntax.
  • Added EncryptInPlace and DecryptInPlace methods for attachment encryption. In most cases the plain/ciphertext is not necessary after en/decryption, so the old Encrypt and Decrypt are deprecated.
  • Added wrapper for /rooms/.../aliases.
  • Added utility for adding/removing emoji variation selectors to match recommendations on reactions in Matrix.
  • Added support for async media uploads (MSC2246).
  • Added automatic sleep when receiving 429 error (thanks to @ownaginatious in #44).
  • Added support for parsing spec version numbers from the /versions endpoint.
  • Removed unstable prefixed constant used for appservice login.
  • Fixed URL encoding not working correctly in some cases.

v0.10.12

15 Mar 23:37
Compare
Choose a tag to compare
  • Added option to use a different Client to send invites in IntentAPI.EnsureJoined.
  • Changed MessageEventContent struct to omit empty msgtypes in the output JSON, as sticker events shouldn't have that field.
  • Fixed deserializing the thumbnail_file field in FileInfo.
  • Fixed bug that broke SQLCryptoStore.FindDeviceByKey.

v0.10.11

15 Mar 23:35
Compare
Choose a tag to compare
  • Added automatic updating of state store from IntentAPI calls.
  • Added option to ignore cache in IntentAPI.EnsureJoined.
  • Added GetURLPreview as a wrapper for the /preview_url media repo endpoint.
  • Moved base58 module inline to avoid pulling in btcd as a dependency.