diff --git a/attachments.go b/attachments.go index 875917e..9a0ea88 100644 --- a/attachments.go +++ b/attachments.go @@ -18,14 +18,13 @@ import ( "github.com/bwmarrin/discordgo" "github.com/gabriel-vasile/mimetype" - + "go.mau.fi/util/exsync" + "go.mau.fi/util/ffmpeg" "maunium.net/go/mautrix" "maunium.net/go/mautrix/appservice" "maunium.net/go/mautrix/crypto/attachment" "maunium.net/go/mautrix/event" "maunium.net/go/mautrix/id" - "maunium.net/go/mautrix/util" - "maunium.net/go/mautrix/util/ffmpeg" "go.mau.fi/mautrix-discord/database" ) @@ -269,7 +268,7 @@ func (br *DiscordBridge) copyAttachmentToMatrix(intent *appservice.IntentAPI, ur returnDBFile = br.DB.File.Get(url, encrypt) if returnDBFile == nil { transferKey := attachmentKey{url, encrypt} - once, _ := br.attachmentTransfers.GetOrSet(transferKey, &util.ReturnableOnce[*database.File]{}) + once, _ := br.attachmentTransfers.GetOrSet(transferKey, &exsync.ReturnableOnce[*database.File]{}) returnDBFile, returnErr = once.Do(func() (onceDBFile *database.File, onceErr error) { if isCacheable { onceDBFile = br.DB.File.Get(url, encrypt) diff --git a/config/upgrade.go b/config/upgrade.go index 749b70f..6fb2c2a 100644 --- a/config/upgrade.go +++ b/config/upgrade.go @@ -17,9 +17,9 @@ package config import ( + up "go.mau.fi/util/configupgrade" + "go.mau.fi/util/random" "maunium.net/go/mautrix/bridge/bridgeconfig" - "maunium.net/go/mautrix/util" - up "maunium.net/go/mautrix/util/configupgrade" ) func DoUpgrade(helper *up.Helper) { @@ -108,7 +108,7 @@ func DoUpgrade(helper *up.Helper) { helper.Copy(up.Str, "bridge", "provisioning", "prefix") if secret, ok := helper.Get(up.Str, "bridge", "provisioning", "shared_secret"); !ok || secret == "generate" { - sharedSecret := util.RandomString(64) + sharedSecret := random.String(64) helper.Set(up.Str, sharedSecret, "bridge", "provisioning", "shared_secret") } else { helper.Copy(up.Str, "bridge", "provisioning", "shared_secret") diff --git a/database/database.go b/database/database.go index 10e4957..a12bab6 100644 --- a/database/database.go +++ b/database/database.go @@ -5,10 +5,9 @@ import ( _ "github.com/lib/pq" _ "github.com/mattn/go-sqlite3" + "go.mau.fi/util/dbutil" "maunium.net/go/maulogger/v2" - "maunium.net/go/mautrix/util/dbutil" - "go.mau.fi/mautrix-discord/database/upgrades" ) diff --git a/database/file.go b/database/file.go index ea9cf9e..2ee926f 100644 --- a/database/file.go +++ b/database/file.go @@ -6,11 +6,10 @@ import ( "errors" "time" + "go.mau.fi/util/dbutil" log "maunium.net/go/maulogger/v2" - "maunium.net/go/mautrix/crypto/attachment" "maunium.net/go/mautrix/id" - "maunium.net/go/mautrix/util/dbutil" ) type FileQuery struct { diff --git a/database/guild.go b/database/guild.go index e00b25b..70976a5 100644 --- a/database/guild.go +++ b/database/guild.go @@ -6,10 +6,9 @@ import ( "fmt" "strings" + "go.mau.fi/util/dbutil" log "maunium.net/go/maulogger/v2" "maunium.net/go/mautrix/id" - - "maunium.net/go/mautrix/util/dbutil" ) type GuildBridgingMode int diff --git a/database/message.go b/database/message.go index d47a1ef..bd2fede 100644 --- a/database/message.go +++ b/database/message.go @@ -7,10 +7,9 @@ import ( "strings" "time" + "go.mau.fi/util/dbutil" log "maunium.net/go/maulogger/v2" - "maunium.net/go/mautrix/id" - "maunium.net/go/mautrix/util/dbutil" ) type MessageQuery struct { diff --git a/database/portal.go b/database/portal.go index 995101f..3c6a8da 100644 --- a/database/portal.go +++ b/database/portal.go @@ -4,11 +4,9 @@ import ( "database/sql" "github.com/bwmarrin/discordgo" - + "go.mau.fi/util/dbutil" log "maunium.net/go/maulogger/v2" - "maunium.net/go/mautrix/id" - "maunium.net/go/mautrix/util/dbutil" ) // language=postgresql diff --git a/database/puppet.go b/database/puppet.go index 1c31123..d6080c7 100644 --- a/database/puppet.go +++ b/database/puppet.go @@ -3,10 +3,9 @@ package database import ( "database/sql" + "go.mau.fi/util/dbutil" log "maunium.net/go/maulogger/v2" - "maunium.net/go/mautrix/id" - "maunium.net/go/mautrix/util/dbutil" ) const ( diff --git a/database/reaction.go b/database/reaction.go index 43d8bfb..8727bb5 100644 --- a/database/reaction.go +++ b/database/reaction.go @@ -4,10 +4,9 @@ import ( "database/sql" "errors" + "go.mau.fi/util/dbutil" log "maunium.net/go/maulogger/v2" - "maunium.net/go/mautrix/id" - "maunium.net/go/mautrix/util/dbutil" ) type ReactionQuery struct { diff --git a/database/role.go b/database/role.go index a50a6a0..3696b51 100644 --- a/database/role.go +++ b/database/role.go @@ -4,11 +4,9 @@ import ( "database/sql" "errors" - log "maunium.net/go/maulogger/v2" - - "maunium.net/go/mautrix/util/dbutil" - "github.com/bwmarrin/discordgo" + "go.mau.fi/util/dbutil" + log "maunium.net/go/maulogger/v2" ) type RoleQuery struct { diff --git a/database/thread.go b/database/thread.go index 351ed0b..87f4127 100644 --- a/database/thread.go +++ b/database/thread.go @@ -4,10 +4,9 @@ import ( "database/sql" "errors" + "go.mau.fi/util/dbutil" log "maunium.net/go/maulogger/v2" - "maunium.net/go/mautrix/id" - "maunium.net/go/mautrix/util/dbutil" ) type ThreadQuery struct { diff --git a/database/upgrades/upgrades.go b/database/upgrades/upgrades.go index 59d0d33..d6954d5 100644 --- a/database/upgrades/upgrades.go +++ b/database/upgrades/upgrades.go @@ -19,7 +19,7 @@ package upgrades import ( "embed" - "maunium.net/go/mautrix/util/dbutil" + "go.mau.fi/util/dbutil" ) var Table dbutil.UpgradeTable diff --git a/database/user.go b/database/user.go index 9b2cb00..763625d 100644 --- a/database/user.go +++ b/database/user.go @@ -3,10 +3,9 @@ package database import ( "database/sql" + "go.mau.fi/util/dbutil" log "maunium.net/go/maulogger/v2" - "maunium.net/go/mautrix/id" - "maunium.net/go/mautrix/util/dbutil" ) type UserQuery struct { diff --git a/database/userportal.go b/database/userportal.go index e2e1295..34d5660 100644 --- a/database/userportal.go +++ b/database/userportal.go @@ -5,8 +5,8 @@ import ( "errors" "time" + "go.mau.fi/util/dbutil" log "maunium.net/go/maulogger/v2" - "maunium.net/go/mautrix/util/dbutil" ) const ( diff --git a/formatter.go b/formatter.go index 24c0590..679e155 100644 --- a/formatter.go +++ b/formatter.go @@ -26,13 +26,12 @@ import ( "github.com/yuin/goldmark/extension" "github.com/yuin/goldmark/parser" "github.com/yuin/goldmark/util" + "go.mau.fi/util/variationselector" "golang.org/x/exp/slices" - "maunium.net/go/mautrix/event" "maunium.net/go/mautrix/format" "maunium.net/go/mautrix/format/mdext" "maunium.net/go/mautrix/id" - "maunium.net/go/mautrix/util/variationselector" ) // escapeFixer is a hacky partial fix for the difference in escaping markdown, used with escapeReplacement diff --git a/go.mod b/go.mod index 984c6ec..c229c50 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module go.mau.fi/mautrix-discord -go 1.19 +go 1.20 require ( github.com/bwmarrin/discordgo v0.27.0 @@ -10,14 +10,15 @@ require ( github.com/gorilla/websocket v1.5.0 github.com/lib/pq v1.10.9 github.com/mattn/go-sqlite3 v1.14.17 - github.com/rs/zerolog v1.29.1 + github.com/rs/zerolog v1.30.0 github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e github.com/stretchr/testify v1.8.4 - github.com/yuin/goldmark v1.5.4 - golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 + github.com/yuin/goldmark v1.5.5 + go.mau.fi/util v0.0.0-20230805171708-199bf3eec776 + golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb golang.org/x/sync v0.3.0 maunium.net/go/maulogger/v2 v2.4.1 - maunium.net/go/mautrix v0.15.5-0.20230728182848-1ef656165098 + maunium.net/go/mautrix v0.16.0 ) require ( @@ -26,14 +27,14 @@ require ( github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/tidwall/gjson v1.14.4 // indirect + github.com/tidwall/gjson v1.16.0 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/tidwall/sjson v1.2.5 // indirect go.mau.fi/zeroconfig v0.1.2 // indirect - golang.org/x/crypto v0.11.0 // indirect - golang.org/x/net v0.12.0 // indirect - golang.org/x/sys v0.10.0 // indirect + golang.org/x/crypto v0.12.0 // indirect + golang.org/x/net v0.14.0 // indirect + golang.org/x/sys v0.11.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect maunium.net/go/mauflag v1.0.0 // indirect diff --git a/go.sum b/go.sum index e61000a..55434e7 100644 --- a/go.sum +++ b/go.sum @@ -25,38 +25,40 @@ github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= +github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0= github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM= -github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.16.0 h1:SyXa+dsSPpUlcwEDuKuEBJEz5vzTvOea+9rjyYodQFg= +github.com/tidwall/gjson v1.16.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= -github.com/yuin/goldmark v1.5.4 h1:2uY/xC0roWy8IBEGLgB1ywIoEJFGmRrX21YQcvGZzjU= -github.com/yuin/goldmark v1.5.4/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yuin/goldmark v1.5.5 h1:IJznPe8wOzfIKETmMkd06F8nXkmlhaHqFRM9l1hAGsU= +github.com/yuin/goldmark v1.5.5/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.mau.fi/util v0.0.0-20230805171708-199bf3eec776 h1:VrxDCO/gLFHLQywGUsJzertrvt2mUEMrZPf4hEL/s18= +go.mau.fi/util v0.0.0-20230805171708-199bf3eec776/go.mod h1:AxuJUMCxpzgJ5eV9JbPWKRH8aAJJidxetNdUj7qcb84= go.mau.fi/zeroconfig v0.1.2 h1:DKOydWnhPMn65GbXZOafgkPm11BvFashZWLct0dGFto= go.mau.fi/zeroconfig v0.1.2/go.mod h1:NcSJkf180JT+1IId76PcMuLTNa1CzsFFZ0nBygIQM70= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA= +golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= @@ -67,5 +69,5 @@ maunium.net/go/mauflag v1.0.0 h1:YiaRc0tEI3toYtJMRIfjP+jklH45uDHtT80nUamyD4M= maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA= maunium.net/go/maulogger/v2 v2.4.1 h1:N7zSdd0mZkB2m2JtFUsiGTQQAdP0YeFWT7YMc80yAL8= maunium.net/go/maulogger/v2 v2.4.1/go.mod h1:omPuYwYBILeVQobz8uO3XC8DIRuEb5rXYlQSuqrbCho= -maunium.net/go/mautrix v0.15.5-0.20230728182848-1ef656165098 h1:1MA35IEVXHzgFnJEcgAoawNcDedRZjXoHdwylhPURLs= -maunium.net/go/mautrix v0.15.5-0.20230728182848-1ef656165098/go.mod h1:dBaDmsnOOBM4a+gKcgefXH73pHGXm+MCJzCs1dXFgrw= +maunium.net/go/mautrix v0.16.0 h1:iUqCzJE2yqBC1ddAK6eAn159My8rLb4X8g4SFtQh2Dk= +maunium.net/go/mautrix v0.16.0/go.mod h1:XAjE9pTSGcr6vXaiNgQGiip7tddJ8FQV1a29u2QdBG4= diff --git a/main.go b/main.go index d84f424..8be1b79 100644 --- a/main.go +++ b/main.go @@ -20,12 +20,12 @@ import ( _ "embed" "sync" + "go.mau.fi/util/configupgrade" + "go.mau.fi/util/exsync" "golang.org/x/sync/semaphore" "maunium.net/go/mautrix/bridge" "maunium.net/go/mautrix/bridge/commands" "maunium.net/go/mautrix/id" - "maunium.net/go/mautrix/util" - "maunium.net/go/mautrix/util/configupgrade" "go.mau.fi/mautrix-discord/config" "go.mau.fi/mautrix-discord/database" @@ -74,7 +74,7 @@ type DiscordBridge struct { puppetsByCustomMXID map[id.UserID]*Puppet puppetsLock sync.Mutex - attachmentTransfers *util.SyncMap[attachmentKey, *util.ReturnableOnce[*database.File]] + attachmentTransfers *exsync.Map[attachmentKey, *exsync.ReturnableOnce[*database.File]] parallelAttachmentSemaphore *semaphore.Weighted } @@ -172,7 +172,7 @@ func main() { puppets: make(map[string]*Puppet), puppetsByCustomMXID: make(map[id.UserID]*Puppet), - attachmentTransfers: util.NewSyncMap[attachmentKey, *util.ReturnableOnce[*database.File]](), + attachmentTransfers: exsync.NewMap[attachmentKey, *exsync.ReturnableOnce[*database.File]](), parallelAttachmentSemaphore: semaphore.NewWeighted(3), } br.Bridge = bridge.Bridge{ diff --git a/portal.go b/portal.go index 31b8f6e..d51bf5e 100644 --- a/portal.go +++ b/portal.go @@ -18,6 +18,8 @@ import ( "github.com/bwmarrin/discordgo" "github.com/gabriel-vasile/mimetype" "github.com/rs/zerolog" + "go.mau.fi/util/exsync" + "go.mau.fi/util/variationselector" "maunium.net/go/mautrix" "maunium.net/go/mautrix/appservice" "maunium.net/go/mautrix/bridge" @@ -26,8 +28,6 @@ import ( "maunium.net/go/mautrix/crypto/attachment" "maunium.net/go/mautrix/event" "maunium.net/go/mautrix/id" - "maunium.net/go/mautrix/util" - "maunium.net/go/mautrix/util/variationselector" "go.mau.fi/mautrix-discord/config" "go.mau.fi/mautrix-discord/database" @@ -62,7 +62,7 @@ type Portal struct { discordMessages chan portalDiscordMessage matrixMessages chan portalMatrixMessage - recentMessages *util.RingBuffer[string, *discordgo.Message] + recentMessages *exsync.RingBuffer[string, *discordgo.Message] commands map[string]*discordgo.ApplicationCommand commandsLock sync.RWMutex @@ -260,7 +260,7 @@ func (br *DiscordBridge) NewPortal(dbPortal *database.Portal) *Portal { discordMessages: make(chan portalDiscordMessage, br.Config.Bridge.PortalMessageBuffer), matrixMessages: make(chan portalMatrixMessage, br.Config.Bridge.PortalMessageBuffer), - recentMessages: util.NewRingBuffer[string, *discordgo.Message](recentMessageBufferSize), + recentMessages: exsync.NewRingBuffer[string, *discordgo.Message](recentMessageBufferSize), commands: make(map[string]*discordgo.ApplicationCommand), } diff --git a/user.go b/user.go index 5f3b41a..efa7610 100644 --- a/user.go +++ b/user.go @@ -17,8 +17,7 @@ import ( "github.com/bwmarrin/discordgo" "github.com/gorilla/websocket" "github.com/rs/zerolog" - "maunium.net/go/mautrix/util/dbutil" - + "go.mau.fi/util/dbutil" "maunium.net/go/mautrix" "maunium.net/go/mautrix/appservice" "maunium.net/go/mautrix/bridge"