Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Commit

Permalink
upgrade mautrix to 0.9.15
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Jul 18, 2021
1 parent b6edd50 commit eb4ac24
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 191 deletions.
6 changes: 3 additions & 3 deletions clients/bot_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (botClient *BotClient) InitOlmMachine(client *mautrix.Client, nebStore *mat
regexes = append(regexes, regex)
}
}
olmMachine.AcceptVerificationFrom = func(_ string, otherDevice *crypto.DeviceIdentity) (crypto.VerificationRequestResponse, crypto.VerificationHooks) {
olmMachine.AcceptVerificationFrom = func(_ string, otherDevice *crypto.DeviceIdentity, _ id.RoomID) (crypto.VerificationRequestResponse, crypto.VerificationHooks) {
for _, regex := range regexes {
if regex.MatchString(otherDevice.UserID.String()) {
if atomic.LoadInt32(&botClient.ongoingVerificationCount) >= maximumVerifications {
Expand Down Expand Up @@ -159,7 +159,7 @@ func (botClient *BotClient) SendMessageEvent(roomID id.RoomID, evtType mevt.Type
// Sync loops to keep syncing the client with the homeserver by calling the /sync endpoint.
func (botClient *BotClient) Sync() {
// Get the state store up to date
resp, err := botClient.SyncRequest(30000, "", "", true, mevt.PresenceOnline)
resp, err := botClient.SyncRequest(30000, "", "", true, mevt.PresenceOnline, context.Background())
if err != nil {
log.WithError(err).Error("Error performing initial sync")
return
Expand Down Expand Up @@ -314,5 +314,5 @@ func (botClient *BotClient) ForwardRoomKeyToDevice(userID id.UserID, deviceID id
},
}

return botClient.olmMachine.SendEncryptedToDevice(device, forwardedRoomKey)
return botClient.olmMachine.SendEncryptedToDevice(device, mevt.ToDeviceForwardedRoomKey, forwardedRoomKey)
}
24 changes: 4 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,36 @@ go 1.14

require (
github.com/PuerkitoBio/goquery v1.5.1 // indirect
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4 // indirect
github.com/andygrunwald/go-jira v1.11.0
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/dghubble/oauth1 v0.6.0
github.com/die-net/lrucache v0.0.0-20190707192454-883874fe3947
github.com/go-kit/kit v0.9.0 // indirect
github.com/go-logfmt/logfmt v0.4.0 // indirect
github.com/go-stack/stack v1.8.0 // indirect
github.com/gogo/protobuf v1.1.1 // indirect
github.com/golang/protobuf v1.3.2 // indirect
github.com/google/go-cmp v0.4.0 // indirect
github.com/google/go-github v17.0.0+incompatible
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
github.com/jaytaylor/html2text v0.0.0-20200220170450-61d9dc4d7195
github.com/json-iterator/go v1.1.9 // indirect
github.com/julienschmidt/httprouter v1.2.0 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/lib/pq v1.7.0
github.com/lib/pq v1.9.0
github.com/matrix-org/dugong v0.0.0-20180820122854-51a565b5666b
github.com/matrix-org/util v0.0.0-20190711121626-527ce5ddefc7
github.com/mattn/go-shellwords v1.0.10
github.com/mattn/go-sqlite3 v2.0.3+incompatible
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mmcdole/gofeed v1.0.0-beta2
github.com/mmcdole/goxpp v0.0.0-20181012175147-0068e33feabf // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223 // indirect
github.com/olekukonko/tablewriter v0.0.4 // indirect
github.com/pkg/errors v0.9.1
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v0.8.1-0.20160916180340-5636dc67ae77
github.com/prometheus/client_model v0.0.0-20150212101744-fa8ad6fec335 // indirect
github.com/prometheus/common v0.0.0-20161002210234-85637ea67b04 // indirect
github.com/prometheus/procfs v0.0.0-20160411190841-abf152e5f3e9 // indirect
github.com/russross/blackfriday v1.5.2
github.com/sasha-s/go-deadlock v0.2.0
github.com/sirupsen/logrus v1.4.2
github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf // indirect
golang.org/dl v0.0.0-20200601221412-a954fa24b3e5 // indirect
golang.org/x/net v0.0.0-20200602114024-627f9648deb9
golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c // indirect
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/yaml.v2 v2.3.0
maunium.net/go/mautrix v0.7.0
maunium.net/go/mautrix v0.9.15
)
Loading

0 comments on commit eb4ac24

Please sign in to comment.