版本发布 8
* **Breaking change *(client)*** Changed request structs that include UIA (register, upload cross-signing keys, delete devices) to take the auth data as a type parameter. * *(crypto)* Changed device key mismatches in Megolm decryption to mark the message as untrusted instead of failing entirely. * *(crypto)* Added new column to save origin of received Megolm sessions. * *(bridgev2)* Added support for setting custom profile fields (e.g. `m.tz`) for ghosts. * *(bridgev2/commands)* Added `delete-chat` command to delete chats on the remote network. * *(client)* Updated MSC2666 implementation to use stable endpoint. * *(client)* Stopped logging large (>32 KiB) request bodies. * *(bridgev2/portal)* Fixed potential deadlock when a portal ID change races with room creation. * *(bridgev2/portal)* Fixed the third reaction from Matrix being handled incorrectly on networks that only allow one reaction per message. * *(bridgev2/database)* Fixed finding first message in thread in case the thread contains messages with a lower timestamp than the root message. * *(bridgev2/commands)* Fixed login QR codes not having appropriate file info. * *(bridgev2/commands)* Fixed user input steps not working correctly after a display step. * *(format/htmlparser)* Fixed generating markdown for code blocks containing backticks. * *(federation/eventauth)* Fixed inverted check in ban membership authorization (thanks to @nexy7574 in #464).
* *(client)* Fixed HTTP method of delete devices API call (thanks to @fmseals in #393). * *(client)* Added wrappers for [MSC4323]: User suspension & locking endpoints (thanks to @nexy7574 in #407). * *(client)* Stabilized support for extensible profiles. * *(client)* Stabilized support for `state_after` in sync. * *(client)* Removed deprecated MSC2716 requests. * *(crypto)* Added fallback to ensure `m.relates_to` is always copied even if the content struct doesn't implement `Relatable`. * *(crypto)* Changed olm unwedging to ignore newly created sessions if they haven't been used successfully in either direction. * *(federation)* Added utilities for generating, parsing, validating and authorizing PDUs. * Note: the new PDU code depends on `GOEXPERIMENT=jsonv2` * *(event)* Added `is_animated` flag from [MSC4230] to file info. * *(event)* Added types for [MSC4332]: In-room bot commands. * *(event)* Added missing poll end event type for [MSC3381]. * *(appservice)* Fixed URLs not being escaped properly when using unix socket for homeserver connections. * *(format)* Added more helpers for forming markdown links. * *(event,bridgev2)* Added support for Beeper's disappearing message state event. * *(bridgev2)* Redesigned group creation interface and added support in commands and provisioning API. * *(bridgev2)* Added GetEvent to Matrix interface to allow network connectors to get an old event. The method is best effort only, as some configurations don't allow fetching old events. * *(bridgev2)* Added shared logic for provisioning that can be reused by the API, commands and other sources. * *(bridgev2)* Fixed mentions and URL previews not being copied over when caption and media are merged. * *(bridgev2)* Removed config option to change provisioning API prefix, which had already broken in the previous release. [MSC3381]: https://github.com/matrix-org/matrix-spec-proposals/pull/3381 [MSC4230]: https://github.com/matrix-org/matrix-spec-proposals/pull/4230 [MSC4323]: https://github.com/matrix-org/matrix-spec-proposals/pull/4323 [MSC4332]: https://github.com/matrix-org/matrix-spec-proposals/pull/4332
* Bumped minimum Go version to 1.24. * **Breaking change *(appservice,bridgev2,federation)*** Replaced gorilla/mux with standard library ServeMux. * *(client,bridgev2)* Added support for creator power in room v12. * *(client)* Added option to not set `User-Agent` header for improved Wasm compatibility. * *(bridgev2)* Added support for following tombstones. * *(bridgev2)* Added interface for getting arbitrary state event from Matrix. * *(bridgev2)* Added batching to disappearing message queue to ensure it doesn't use too many resources even if there are a large number of messages. * *(bridgev2/commands)* Added support for canceling QR login with `cancel` command. * *(client)* Added option to override HTTP client used for .well-known resolution. * *(crypto/backup)* Added method for encrypting key backup session without private keys. * *(event->id)* Moved room version type and constants to id package. * *(bridgev2)* Bots in DM portals will now be added to the functional members state event to hide them from the room name calculation. * *(bridgev2)* Changed message delete handling to ignore "delete for me" events if there are multiple Matrix users in the room. * *(format/htmlparser)* Changed text processing to collapse multiple spaces into one when outside `pre`/`code` tags. * *(format/htmlparser)* Removed link suffix in plaintext output when link text is only missing protocol part of href. * e.g. `<a href="https://example.com">example.com</a>` will turn into `example.com` rather than `example.com (https://example.com)` * *(appservice)* Switched appservice websockets from gorilla/websocket to coder/websocket. * *(bridgev2/matrix)* Fixed encryption key sharing not ignoring ghosts properly. * *(crypto/attachments)* Fixed hash check when decrypting file streams. * *(crypto)* Removed unnecessary `AlreadyShared` error in `ShareGroupSession`. The function will now act as if it was successful instead.
* *(bridgev2)* Added support for return values from portal event handlers. Note that the return value will always be "queued" unless the event buffer is disabled. * *(bridgev2)* Added support for [MSC4144] per-message profile passthrough in relay mode. * *(bridgev2)* Added option to auto-reconnect logins after a certain period if they hit an `UNKNOWN_ERROR` state. * *(bridgev2)* Added analytics for event handler panics. * *(bridgev2)* Changed new room creation to hardcode room v11 to avoid v12 rooms being created before proper support for them can be added. * *(bridgev2)* Changed queuing events to block instead of dropping events if the buffer is full. * *(bridgev2)* Fixed assumption that replies to unknown messages are cross-room. * *(id)* Fixed server name validation not including ports correctly (thanks to @krombel in #392). * *(federation)* Fixed base64 algorithm in signature generation. * *(event)* Fixed [MSC4144] fallbacks not being removed from edits. [MSC4144]: https://github.com/matrix-org/matrix-spec-proposals/pull/4144
* *(commands)* Added framework for using reactions as buttons that execute command handlers. * *(client)* Added wrapper for `/relations` endpoints. * *(client)* Added support for stable version of room summary endpoint. * *(client)* Fixed parsing URL preview responses where width/height are strings. * *(federation)* Fixed bugs in server auth. * *(id)* Added utilities for validating server names. * *(event)* Fixed incorrect empty `entity` field when sending hashed moderation policy events. * *(event)* Added [MSC4293] redact events field to member events. * *(event)* Added support for fallbacks in [MSC4144] per-message profiles. * *(format)* Added `MarkdownLink` and `MarkdownMention` utility functions for generating properly escaped markdown. * *(synapseadmin)* Added support for synchronous (v1) room delete endpoint. * *(synapseadmin)* Changed `Client` struct to not embed the `mautrix.Client`. This is a breaking change if you were relying on accessing non-admin functions from the admin client. * *(bridgev2/provisioning)* Fixed `/display_and_wait` not passing through errors from the network connector properly. * *(bridgev2/crypto)* Fixed encryption not working if the user's ID had the same prefix as the bridge ghosts (e.g. `@whatsappbridgeuser:example.com` with a `@whatsapp_` prefix). * *(bridgev2)* Fixed portals not being saved after creating a DM portal from a Matrix DM invite. * *(bridgev2)* Added config option to determine whether cross-room replies should be bridged. * *(appservice)* Fixed `EnsureRegistered` not being called when sending a custom member event for the controlled user. [MSC4144]: https://github.com/matrix-org/matrix-spec-proposals/pull/4144 [MSC4293]: https://github.com/matrix-org/matrix-spec-proposals/pull/4293
* *(commands)* Added generic framework for implementing bot commands. * *(client)* Added support for specifying maximum number of HTTP retries using a context value instead of having to call `MakeFullRequest` manually. * *(client,federation)* Added methods for fetching room directories. * *(federation)* Added support for server side of request authentication. * *(synapseadmin)* Added wrapper for the account suspension endpoint. * *(format)* Added method for safely wrapping a string in markdown inline code. * *(crypto)* Added method to import key backup without persisting to database, to allow the client more control over the process. * *(bridgev2)* Added viewing chat interface to signal when the user is viewing a given chat. * *(bridgev2)* Added option to pass through transaction ID from client when sending messages to remote network. * *(crypto)* Fixed unnecessary error log when decrypting dummy events used for unwedging Olm sessions. * *(crypto)* Fixed `forwarding_curve25519_key_chain` not being set consistently when backing up keys. * *(event)* Fixed marshaling legacy VoIP events with no version field. * *(bridgev2)* Fixed disappearing message references not being deleted when the portal is deleted. * *(bridgev2)* Fixed read receipt bridging not ignoring fake message entries and causing unnecessary error logs.
* *(commands)* Added generic command processing framework for bots. * *(client)* Added `allowed_room_ids` field to room summary responses (thanks to @nexy7574 in #367). * *(bridgev2)* Added support for custom timeouts on outgoing messages which have to wait for a remote echo. * *(bridgev2)* Added automatic typing stop event if the ghost user had sent a typing event before a message. * *(bridgev2)* The saved management room is now cleared if the user leaves the room, allowing the next DM to be automatically marked as a management room. * *(bridge)* Removed deprecated fallback package for bridge statuses. The status package is now only available under bridgev2.
* **Breaking change *(bridge)*** Removed legacy bridge module. * **Breaking change *(event)*** Changed `m.federate` field in room create event content to a pointer to allow detecting omitted values. * *(bridgev2/commands)* Added `set-management-room` command to set a new management room. * *(bridgev2/portal)* Changed edit bridging to ignore remote edits if the original sender on Matrix can't be puppeted. * *(bridgv2)* Added config option to disable bridging `m.notice` messages. * *(appservice/http)* Switched access token validation to use constant time comparisons. * *(event)* Added support for [MSC3765] rich text topics. * *(event)* Added fields to policy list event contents for [MSC4204] and [MSC4205]. * *(client)* Added method for getting the content of a redacted event using [MSC2815]. * *(client)* Added methods for sending and updating [MSC4140] delayed events. * *(client)* Added support for [MSC4222] in sync payloads. * *(crypto/cryptohelper)* Switched to using `sqlite3-fk-wal` instead of plain `sqlite3` by default. * *(crypto/encryptolm)* Added generic method for encrypting to-device events. * *(crypto/ssss)* Fixed panic if server-side key metadata is corrupted. * *(crypto/sqlstore)* Fixed error when marking over 32 thousand device lists as outdated on SQLite. [MSC2815]: https://github.com/matrix-org/matrix-spec-proposals/pull/2815 [MSC3765]: https://github.com/matrix-org/matrix-spec-proposals/pull/3765 [MSC4140]: https://github.com/matrix-org/matrix-spec-proposals/pull/4140 [MSC4204]: https://github.com/matrix-org/matrix-spec-proposals/pull/4204 [MSC4205]: https://github.com/matrix-org/matrix-spec-proposals/pull/4205 [MSC4222]: https://github.com/matrix-org/matrix-spec-proposals/pull/4222