- (hicli) Moved package into gomuks repo.
- (bridgev2/commands) Fixed cookie unescaping in login commands.
- (bridgev2/portal) Added special
DefaultChatName
constant to explicitly reset portal names to the default (based on members). - (bridgev2/config) Added options to disable room tag bridging.
- (bridgev2/database) Fixed reaction queries not including portal receiver.
- (appservice) Updated MSC2409 stable registration field name from
push_ephemeral
toreceive_ephemeral
. Homeserver admins must update existing registrations manually. - (format) Added support for
img
tags. - (format/mdext) Added goldmark extensions for Matrix math and custom emojis.
- (event/reply) Removed support for generating reply fallbacks (MSC2781).
- (pushrules) Added support for
sender_notification_permission
condition kind (used for@room
mentions). - (crypto) Added support for
json.RawMessage
inEncryptMegolmEvent
. - (mediaproxy) Added
GetMediaResponseCallback
andGetMediaResponseFile
to write proxied data directly to http response or temp file instead of having to use anio.Reader
. - (mediaproxy) Dropped support for legacy media download endpoints.
- (mediaproxy,bridgev2) Made interface pass through query parameters.
- (bridgev2) Added more features and fixed bugs.
- (hicli) Added more features and fixed bugs.
- (appservice) Removed TLS support. A reverse proxy should be used if TLS is needed.
- (format/mdext) Added goldmark extension to fix indented paragraphs when disabling indented code block parser.
- (event) Added
Has
method forMentions
. - (event) Added basic support for the unstable version of polls.
- Breaking change (client) Dropped support for unauthenticated media.
Matrix v1.11 support is now required from the homeserver, although it's not
enforced using
/versions
as some servers don't advertise it. - (bridgev2) Added more features and fixed bugs.
- (appservice,crypto) Added support for using MSC3202 for appservice encryption.
- (crypto/olm) Made everything into an interface to allow side-by-side testing of libolm and goolm, as well as potentially support vodozemac in the future.
- (client) Fixed requests being retried even after context is canceled.
- (client) Added option to move
/sync
request logs to trace level. - (error) Added
Write
andWithMessage
helpers toRespError
to make it easier to use on servers. - (event) Fixed
org.matrix.msc1767.audio
field allowing omitting the duration and waveform. - (id) Changed
MatrixURI
methods to not panic if the receiver is nil. - (federation) Added limit to response size when fetching
.well-known
files.
- Bumped minimum Go version to 1.22.
- (bridgev2) Added more features and fixed bugs.
- (event) Added types for MSC4144: Per-message profiles.
- (federation) Added implementation of server name resolution and a basic client for making federation requests.
- (crypto/ssss) Changed recovery key/passphrase verify functions to take the
key ID as a parameter to ensure it's correctly set even if the key metadata
wasn't fetched via
GetKeyData
. - (format/mdext) Added goldmark extensions for single-character bold, italic
and strikethrough parsing (as in
*foo*
-> foo,_foo_
-> foo and~foo~
->foo) - (format) Changed
RenderMarkdown
et al to always includem.mentions
in returned content. The mention list is filled with matrix.to URLs from the input by default.
- Renamed
master
branch tomain
. - (bridgev2) Added more features.
- (crypto) Fixed bug with copying
m.relates_to
from wire content to decrypted content. - (mediaproxy) Added module for implementing simple media repos that proxy requests elsewhere.
- (client) Changed
Members()
to automatically parse event content for all returned events. - (bridge) Added
/register
call if/versions
fails withM_FORBIDDEN
. - (crypto) Fixed
DecryptMegolmEvent
sometimes calling database without transaction by using the non-context version ofResolveTrust
. - (crypto/attachment) Implemented
io.Seeker
inEncryptStream
to allow using it in retriable HTTP requests. - (event) Added helper method to add user ID to a
Mentions
object. - (event) Fixed default power level for invites (thanks to @rudis in #250).
- (client) Fixed incorrect warning log in
State()
when state store returns no error (thanks to @rudis in #249). - (crypto/verificationhelper) Fixed deadlock when ignoring unknown cancellation events (thanks to @rudis in #247).
- (bridgev2) Added experimental high-level bridge framework.
- (hicli) Added experimental high-level client framework.
- Slightly breaking changes
- (crypto) Added room ID and first known index parameters to
SessionReceived
callback. - (crypto) Changed
ImportRoomKeyFromBackup
to return the imported session. - (client) Added
error
parameter toResponseHook
. - (client) Changed
Download
to return entire response instead of just anio.Reader
.
- (crypto) Added room ID and first known index parameters to
- (crypto) Changed initial olm device sharing to save keys before sharing to ensure keys aren't accidentally regenerated in case the request fails.
- (crypto) Changed
EncryptMegolmEvent
andShareGroupSession
to return more errors instead of only logging and ignoring them. - (crypto) Added option to completely disable megolm ratchet tracking.
- The tracking is meant for bots and bridges which may want to delete old keys, but for normal clients it's just unnecessary overhead.
- (crypto) Changed Megolm session storage methods in
Store
to not take sender key as parameter.- This causes a breaking change to the layout of the
MemoryStore
struct. Using MemoryStore in production is not recommended.
- This causes a breaking change to the layout of the
- (crypto) Changed
DecryptMegolmEvent
to copym.relates_to
in the raw content too instead of only in the parsed struct. - (crypto) Exported function to parse megolm message index from raw ciphertext bytes.
- (crypto/sqlstore) Fixed schema of
crypto_secrets
table to include account ID. - (crypto/verificationhelper) Fixed more bugs.
- (client) Added
UpdateRequestOnRetry
hook which is called immediately before retrying a normal HTTP request. - (client) Added support for MSC3916 media download endpoint.
- Support is automatically detected from spec versions. The
SpecVersions
property can either be filled manually, orVersions
can be called to automatically populate the field with the response.
- Support is automatically detected from spec versions. The
- (event) Added constants for known room versions.
- (format) Added a
context.Context
field to HTMLParser's Context struct. - (bridge) Added support for handling join rules, knocks, invites and bans (thanks to @maltee1 in #193 and #204).
- (crypto) Changed forwarded room key handling to only accept keys with a lower first known index than the existing session if there is one.
- (crypto) Changed key backup restore to assume own device list is up to date to avoid re-requesting device list for every deleted device that has signed key backup.
- (crypto) Fixed memory cache not being invalidated when storing own cross-signing keys
- Breaking change (client, bridge, appservice) Dropped support for maulogger. Only zerolog loggers are now provided by default.
- (bridge) Fixed upload size limit not having a default if the server returned no value.
- (synapseadmin) Added wrappers for some room and user admin APIs. (thanks to @grvn-ht in #181).
- (crypto/verificationhelper) Fixed bugs.
- (crypto) Fixed key backup uploading doing too much base64.
- (crypto) Changed
EncryptMegolmEvent
to return an error if persisting the megolm session fails. This ensures that database errors won't cause messages to be sent with duplicate indexes. - (crypto) Changed
GetOrRequestSecret
to use a callback instead of returning the value directly. This allows validating the value in order to ignore invalid secrets. - (id) Added
ParseCommonIdentifier
function to parse any Matrix identifier in the Common Identifier Format. - (federation) Added simple key server that passes the federation tester.
- Bumped minimum Go version to 1.21.
- (bridge) Bumped minimum Matrix spec version to v1.4.
- Breaking change (crypto) Deleted old half-broken interactive
verification code and replaced it with a new
verificationhelper
.- The new verification helper is still experimental.
- Both QR and emoji verification are supported (in theory).
- (crypto) Added support for server-side key backup.
- (crypto) Added support for receiving and sending secrets like cross-signing private keys via secret sharing.
- (crypto) Added support for tracking which devices megolm sessions were initially shared to, and allowing re-sharing the keys to those sessions.
- (client) Changed cross-signing key upload method to accept a callback for user-interactive auth instead of only hardcoding password support.
- (appservice) Dropped support for legacy non-prefixed appservice paths
(e.g.
/transactions
instead of/_matrix/app/v1/transactions
). - (appservice) Dropped support for legacy
access_token
authorization in appservice endpoints. - (bridge) Fixed
RawArgs
field in command events of command state callbacks. - (appservice) Added
CreateFull
helper function for creating anAppService
instance with all the mandatory fields set.
- Breaking change (bridge) Added raw event to portal membership handling functions.
- Breaking change (everything) Added context parameters to all functions (started by @recht in #144).
- Breaking change (client) Moved event source from sync event handler
function parameters to the
Mautrix.EventSource
field inside the event struct. - Breaking change (client) Moved
EventSource
toevent.Source
. - (client) Removed deprecated
OldEventIgnorer
. The non-deprecated version (Client.DontProcessOldEvents
) is still available. - (crypto) Added experimental pure Go Olm implementation to replace libolm
(thanks to @DerLukas15 in #106).
- You can use the
goolm
build tag to the new implementation.
- You can use the
- (bridge) Added context parameter for bridge command events.
- (bridge) Added method to allow custom validation for the entire config.
- (client) Changed default syncer to not drop unknown events.
- The syncer will still drop known events if parsing the content fails.
- The behavior can be changed by changing the
ParseErrorHandler
function.
- (crypto) Fixed some places using math/rand instead of crypto/rand.
- (event) Added
Redacts
field toRedactionEventContent
for room v11+. - (event) Added
ReverseTextToHTML
which reverses the changes made byTextToHTML
(i.e. unescapes HTML characters and replaces<br/>
with\n
). - (bridge) Added global zerologger to ensure all logs go through the bridge logger.
- (bridge) Changed encryption error messages to be sent in a thread if the message that failed to decrypt was in a thread.
- Breaking change (id) Updated user ID localpart encoding to not encode
+
as per MSC4009. - (bridge) Added bridge utility to handle double puppeting logins.
- The utility supports automatic logins with all three current methods (shared secret, legacy appservice, new appservice).
- (appservice) Added warning logs and timeout on appservice event handling.
- Defaults to warning after 30 seconds and timeout 15 minutes after that.
- Timeouts can be adjusted or disabled by setting
ExecSync
variables in theEventProcessor
.
- (crypto/olm) Added
PkDecryption
wrapper.
- Bumped minimum Go version to 1.20.
- Breaking change (util) Moved package to go.mau.fi/util
- (event) Removed MSC2716
historical
field in them.room.power_levels
event content struct. - (bridge) Added
--version-json
flag to print bridge version info as JSON. - (appservice) Added option to use custom transaction handler for websocket mode.
- (client) Deprecated MSC2716 methods and added new Beeper-specific batch send methods, as upstream MSC2716 support has been abandoned.
- (client) Added proper error handling and automatic retries to media downloads.
- (crypto, bridge) Added option to remove all keys that were received before the automatic ratcheting was implemented (in v0.15.1).
- (dbutil) Added
JSON
utility for writing/reading arbitrary JSON objects to the db conveniently without manually de/serializing.
- (synapseadmin) Added wrappers for some Synapse admin API endpoints.
- (pushrules) Implemented new
event_property_is
andevent_property_contains
push rule condition kinds as per MSC3758 and MSC3966. - (bridge) Moved websocket code from mautrix-imessage to enable all bridges to use appservice websockets easily.
- (bridge) Added retrying for appservice pings.
- (types) Removed unstable field for MSC3952 (intentional mentions).
- (client) Deprecated
OldEventIgnorer
and addedClient.DontProcessOldEvents
to replace it. - (client) Added
MoveInviteState
sync handler for moving state events in the invite section of sync inside the invite event itself. - (crypto) Added option to not rotate keys when devices change.
- (crypto) Added additional duplicate message index check if decryption fails because the keys had been ratcheted forward.
- (client) Stabilized support for asynchronous uploads.
UnstableCreateMXC
andUnstableUploadAsync
were renamed toCreateMXC
andUploadAsync
respectively.
- (util/dbutil) Added option to use a separate database connection pool for
read-only transactions.
- This is mostly meant for SQLite and it enables read-only transactions that don't lock the database, even when normal transactions are configured to acquire a write lock immediately.
- (util/dbutil) Enabled caller info in zerolog by default.
- (client) Changed member-fetching methods to clear existing member info in state store.
- (client) Added support for inserting mautrix-go commit hash into default user agent at compile time.
- (bridge) Fixed bridge bot intent not having state store set.
- (client) Fixed
RespError
marshaling mutating theExtraData
map and potentially causing panics. - (util/dbutil) Added
DoTxn
method for an easier way to manage database transactions. - (util) Added a zerolog
CallerMarshalFunc
implementation that includes the function name. - (bridge) Added error reply to encrypted messages if the bridge isn't configured to do encryption.
- (crypto, bridge) Added options to automatically ratchet/delete megolm sessions to minimize access to old messages.
- (pushrules) Added method to get entire push rule that matched (instead of only the list of actions).
- (pushrules) Deprecated
NotifySpecified
as there's no reason to read it. - (crypto) Changed
max_age
column incrypto_megolm_inbound_session
table to be milliseconds instead of nanoseconds. - (util) Added method for iterating
RingBuffer
. - (crypto/cryptohelper) Changed decryption errors to request session from all own devices in addition to the sender, instead of only asking the sender.
- (sqlstatestore) Fixed
FindSharedRooms
throwing an error when using from a non-bridge context. - (client) Optimized
AccountDataSyncStore
to not resend save requests if the sync token didn't change. - (types) Added
Clone()
method forPowerLevelEventContent
.
- Breaking change (appservice) Removed
Load()
andAppService.Init()
functions. The struct should just be created withCreate()
and the relevant fields should be filled manually. - Breaking change (appservice) Removed public
HomeserverURL
field and replaced it with aSetHomeserverURL
method. - (appservice) Added support for unix sockets for homeserver URL and appservice HTTP server.
- (client) Changed request logging to log durations as floats instead of
strings (using zerolog's
Dur()
, so the exact output can be configured). - (bridge) Changed zerolog to use nanosecond precision timestamps.
- (crypto) Added message index to log after encrypting/decrypting megolm events, and when failing to decrypt due to duplicate index.
- (sqlstatestore) Fixed warning log for rooms that don't have encryption enabled.
- (bridge) Fixed building with
nocrypto
tag. - (bridge) Fixed legacy logging config migration not disabling file writer
when
file_name_format
was empty. - (bridge) Added option to require room power level to run commands.
- (event) Added structs for MSC3952: Intentional Mentions.
- (util/variationselector) Added
FullyQualify
method to add necessary emoji variation selectors without adding all possible ones.
- Bumped minimum Go version to 1.19.
- Breaking changes
- (all) Switched to zerolog for logging.
- The
Client
andBridge
structs still include a legacy logger for backwards compatibility.
- The
- (client, appservice) Moved
SQLStateStore
from appservice module to the top-level (client) module. - (client, appservice) Removed unused
Typing
map inSQLStateStore
. - (client) Removed unused
SaveRoom
andLoadRoom
methods inStorer
. - (client, appservice) Removed deprecated
SendVideo
andSendImage
methods. - (client) Replaced
AppServiceUserID
field withSetAppServiceUserID
boolean. TheUserID
field is used as the value for the query param. - (crypto) Renamed
GobStore
toMemoryStore
and removed the file saving features. The data can still be persisted, but the persistence part must be implemented separately. - (crypto) Removed deprecated
DeviceIdentity
alias (renamed toid.Device
long ago). - (client) Removed
Stringifable
interface as it's the same asfmt.Stringer
.
- (all) Switched to zerolog for logging.
- (client) Renamed
Storer
interface toSyncStore
. A type alias exists for backwards-compatibility. - (crypto/cryptohelper) Added package for a simplified crypto interface for clients.
- (example) Added e2ee support to example using crypto helper.
- (client) Changed default syncer to stop syncing on
M_UNKNOWN_TOKEN
errors.
- Breaking change (format) Refactored the HTML parser
Context
to have more data. - (id) Fixed escaping path components when forming matrix.to URLs
or
matrix:
URIs. - (bridge) Bumped default timeouts for decrypting incoming messages.
- (bridge) Added
RawArgs
to commands to allow accessing non-split input. - (bridge) Added
ReplyAdvanced
to commands to allow setting markdown settings. - (event) Added
notifications
key toPowerLevelEventContent
. - (event) Changed
SetEdit
to cut off edit fallback if the message is long. - (util) Added
SyncMap
as a simple generic wrapper for a map with a mutex. - (util) Added
ReturnableOnce
as a wrapper forsync.Once
with a return value.
- Breaking change: Removed
IsTyping
andSetTyping
inappservice.StateStore
and removed theTypingStateStore
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.
- 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. Usingstore.DB.Upgrade()
afterNewSQLCryptoStore(...)
is recommended instead (the bridge module does this automatically). - Added missing
suggested
field tom.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 ofsqlite3
. - 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.
- Breaking change: Added logging for row iteration in the dbutil package.
This changes the return type of
Query
methods from*sql.Rows
to a newdbutil.Rows
interface. - Added flag to disable wrapping database upgrades in a transaction (e.g. to
allow setting
PRAGMA
s for advanced table mutations on SQLite). - Deprecated
MessageEventContent.GetReplyTo
in favor of directly usingRelatesTo.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.
- 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.
- 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 MSC2654unread_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.
- Breaking change: Switched
Client.UserTyping
to take atime.Duration
instead of rawint64
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
andOnEventType
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 theutil
package and made it usecrypto/rand
instead ofmath/rand
. - Significantly improved cross-signing validation code.
- There are now more options for required trust levels,
e.g. you can set
SendKeysMinTrust
toid.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.
- There are now more options for required trust levels,
e.g. you can set
- Fixed parsing non-positive ordered list start positions in HTML parser (backport of the same fix in v0.13.0).
- 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.
- The new
- Switched from blackfriday to goldmark for markdown parsing in the
format
module and added spoiler syntax. - Added
EncryptInPlace
andDecryptInPlace
methods for attachment encryption. In most cases the plain/ciphertext is not necessary after en/decryption, so the oldEncrypt
andDecrypt
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.
- Added option to use a different
Client
to send invites inIntentAPI.EnsureJoined
. - Changed
MessageEventContent
struct to omit emptymsgtype
s in the output JSON, as sticker events shouldn't have that field. - Fixed deserializing the
thumbnail_file
field inFileInfo
. - Fixed bug that broke
SQLCryptoStore.FindDeviceByKey
.
- 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.
- Added event types and content structs for server ACLs and moderation policy lists (thanks to @qua3k in #59 and #60).
- Added optional parameter to
Client.LeaveRoom
to pass areason
field.
- Breaking change: Changed
Messages()
to take a filter as a parameter instead of using the syncer's filter (thanks to @qua3k in #55 and #56).- The previous filter behavior was completely broken, as it sent a whole filter instead of just a RoomEventFilter.
- Passing
nil
as the filter is fine and will disable filtering (which is equivalent to what it did before with the invalid filter).
- Added
Context()
wrapper for the/context
API (thanks to @qua3k in #54). - Added utility for converting media files with ffmpeg.
- Added
OlmSession.Describe()
to wrapolm_session_describe
. - Added trace logs to log olm session descriptions when encrypting/decrypting to-device messages.
- Added space event types and content structs.
- Added support for power level content override field in
CreateRoom
. - Fixed ordering of olm sessions which would cause an old session to be used in some cases even after a client created a new session.
- Changed
Client.RedactEvent
to allow arbitrary fields in redaction request.
- Fixed websocket disconnection not clearing all pending requests.
- Added
OlmMachine.SendRoomKeyRequest
as a more direct way of sending room key requests. - Added automatic Olm session recreation if an incoming message fails to decrypt.
- Changed
Login
to only omit request content from logs if there's a password or token (appservice logins don't have sensitive content).
- Added
reason
field to invite and unban requests (thanks to @ptman in #48). - Fixed
AppService.HasWebsocket()
returningtrue
even after websocket has disconnected.
- Added logs about incoming appservice transactions.
- Added support for message send checkpoints (as HTTP requests, similar to the bridge state reporting system).
- Added utility method for finding the first supported login flow matching any of the given types.
- Updated registering appservice ghosts to use
inhibit_login
flag to prevent lots of unnecessary access tokens from being created.- If you want to log in as an appservice ghost, you should use MSC2778's appservice login (e.g. like mautrix-whatsapp does for e2be).
- Removed direct dependency on
pq
- In order to use some more efficient queries on postgres, you must set
crypto.PostgresArrayWrapper = pq.Array
if you want to use both postgres and e2ee.
- In order to use some more efficient queries on postgres, you must set
- Added temporary hack to ignore state events with the MSC2716 historical flag (to be removed after matrix-org/synapse#11265 is merged)
- Added received transaction acknowledgements for websocket appservice transactions.
- Added automatic fallback to move
prev_content
from top level to the standard location insideunsigned
.
- Added
SetEdit
utility function forMessageEventContent
.
- Added wrapper for MSC2716's
/batch_send
endpoint. - Added
MarshalJSON
method forEvent
struct to prevent empty unsigned structs from being included in the JSON.
- Added
client.State
method to get full room state. - Added bridge info structs and event types (MSC2346).
- Made response handling more customizable.
- Fixed type of
AuthType
constants.
- Added
X-Mautrix-Process-ID
to appservice websocket headers to help debug issues where multiple instances are connecting to the server at the same time.
- Fixed Go 1.14 compatibility (broken in v0.9.25).
- Added GitHub actions CI to build, test and check formatting on Go 1.14-1.17.
- Added default no-op logger to
Client
in order to prevent panic when the application doesn't set a logger.
- Disabled logging request JSON for sensitive requests like
/login
,/register
and other UIA endpoints. Logging can still be enabled by settingMAUTRIX_LOG_SENSITIVE_CONTENT
toyes
. - Added option to store new homeserver URL from
/login
response well-known data. - Added option to stream big sync responses via disk to maybe reduce memory usage.
- Fixed trailing slashes in homeserver URL breaking all requests.
- Added write deadline for appservice websocket connection.
- Fixed storing e2ee key withheld events in the SQL store.
- Updated appservice handler to cache multiple recent transaction IDs instead of only the most recent one.
- Added liveness and readiness endpoints to appservices.
- The endpoints are the same as mautrix-python:
/_matrix/mau/live
and/_matrix/mau/ready
- Liveness always returns 200 and an empty JSON object by default,
but it can be turned off by setting
appservice.Live
tofalse
. - Readiness defaults to returning 500, and it can be switched to 200
by setting
appservice.Ready
totrue
.
- The endpoints are the same as mautrix-python:
- Added crypto store migration for converting all
VARCHAR(255)
columns toTEXT
in Postgres databases.
- Fixed HTML parser outputting two newlines after paragraph tags.
- Added new
BuildURL
method that does the same asClient.BuildBaseURL
but without requiring theClient
instance.
- Fixed handling OTK counts and device lists coming in through the appservice transaction websocket.
- Updated OlmMachine to ignore OTK counts intended for other devices.
- Added support for MSC3202 and the to-device part of MSC2409 in the appservice package.
- Added support for sending commands through appservice websocket.
- Changed error message JSON field name in appservice error responses to
conform with standard Matrix errors (
message
->error
).
- Added default implementation of
PillConverter
in HTML parser utility.
- Added support for parsing and generating encoded matrix.to URLs and
matrix:
URIs (MSC2312). - Updated HTML parser to use new URI parser for parsing user/room pills.
- Added new method for sending custom data with read receipts (not currently a part of the spec).
- Improved debug log for unsupported event types.
- Added VoIP events to GuessClass.
- Added support for parsing strings in VoIP event version field.
- Fixed
format.RenderMarkdown()
still allowing HTML when bothallowHTML
andallowMarkdown
arefalse
.
- Updated appservice
StartWebsocket
to return websocket close info.
- Added methods for getting room tags and account data.
- Breaking change (crypto):
SendEncryptedToDevice
now requires an event type parameter. Previously it only allowed sending events of typeevent.ToDeviceForwardedRoomKey
. - Added content structs for VoIP events.
- Added global mutex for Olm decryption (previously it was only used for encryption).
- Added option to retry all HTTP requests when encountering a HTTP network
error or gateway error response (502/503/504)
- Disabled by default, you need to set the
DefaultHTTPRetries
field in theAppService
orClient
struct to enable. - Can also be enabled with
FullRequest
sMaxAttempts
field.
- Disabled by default, you need to set the
- Reverted update of
golang.org/x/sys
which broke Go 1.14 / darwin/arm.
- Switched appservices to using shared
http.Client
instance with a in-memory cookie jar.
- Made user agent headers easier to configure.
- Improved logging when receiving weird/unhandled to-device events.
- Fixed type of presence state constants (thanks to @babolivier in #30).
- Implemented presence state fetching methods (thanks to @babolivier in #29).
- Added support for sending and receiving commands via appservice transaction websocket.
- Fixed appservice register request hiding actual errors due to UIA error handling.
- Breaking change (manual API requests):
MakeFullRequest
now takes aFullRequest
struct instead of individual parameters.MakeRequest
's parameters are unchanged. - Breaking change (manual /sync):
SyncRequest
now requires aContext
parameter. - Breaking change (end-to-bridge encryption):
the
uk.half-shot.msc2778.login.application_service
constant used for appservice login (MSC2778) was renamed fromAuthTypeAppservice
toAuthTypeHalfyAppservice
.- The
AuthTypeAppservice
constant now containsm.login.application_service
, which is currently only used for registrations, but will also be used for login once MSC2778 lands in the spec.
- The
- Fixed appservice registration requests to include
m.login.application_service
as thetype
(re matrix-org/synapse#9548). - Added wrapper for
/logout/all
.
- Added client-side timeout to
mautrix.Client
'shttp.Client
(defaults to 3 minutes). - Updated maulogger to fix bug where plaintext file logs wouldn't have newlines.
- Fixed potential concurrent map writes in appservice
Client
andIntent
methods.
- Added option to output appservice logs as JSON.
- Added new methods for validating user ID localparts.
- Allowed empty content URIs in parser
- Added functions for device management endpoints (thanks to @edwargix in #26).
- Fixed error when removing the user's avatar.
- Added AccountDataStore to remove the need for persistent local storage other than the access token (thanks to @daenney in #23).
- Added support for receiving appservice transactions over websocket. See https://github.com/mautrix/wsproxy for the server-side implementation.
- Fixed error when removing the room avatar.
- Breaking change: the
RateLimited
field in theRegistration
struct is now a pointer, so that it can be omitted entirely. - Merged initial SSSS/cross-signing code by @nikofil. Interactive verification doesn't work, but the other things mostly do.
- Added support for authorization header auth in appservices (MSC2832).
- Added support for receiving ephemeral events directly (MSC2409).
- Fixed
SendReaction()
and other similar methods in theClient
struct. - Fixed crypto cgo code panicking in Go 1.15.3+.
- Fixed olm session locks sometime getting deadlocked.