mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2025-03-05 00:40:18 +01:00
Update mautrix-go and add log when room is created
This commit is contained in:
parent
87b5c91fe7
commit
49a445e10d
3 changed files with 6 additions and 8 deletions
2
go.mod
2
go.mod
|
@ -15,7 +15,7 @@ require (
|
|||
golang.org/x/net v0.0.0-20220513224357-95641704303c
|
||||
google.golang.org/protobuf v1.28.0
|
||||
maunium.net/go/maulogger/v2 v2.3.2
|
||||
maunium.net/go/mautrix v0.11.1-0.20220526113002-cf90afd2498e
|
||||
maunium.net/go/mautrix v0.11.1-0.20220529123139-5bc36b2978c1
|
||||
)
|
||||
|
||||
require (
|
||||
|
|
4
go.sum
4
go.sum
|
@ -107,5 +107,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.3.2 h1:1XmIYmMd3PoQfp9J+PaHhpt80zpfmMqaShzUTC7FwY0=
|
||||
maunium.net/go/maulogger/v2 v2.3.2/go.mod h1:TYWy7wKwz/tIXTpsx8G3mZseIRiC5DoMxSZazOHy68A=
|
||||
maunium.net/go/mautrix v0.11.1-0.20220526113002-cf90afd2498e h1:jyqGHbz0HVaH+152SsEKb9crbFX5cS9x0tKdeRpWsv0=
|
||||
maunium.net/go/mautrix v0.11.1-0.20220526113002-cf90afd2498e/go.mod h1:CiKpMhAx5QZFHK03jpWb0iKI3sGU8x6+LfsOjDrcO8I=
|
||||
maunium.net/go/mautrix v0.11.1-0.20220529123139-5bc36b2978c1 h1:HNntVQh0XVyWDAsSQA/0Rk2++1cGOzmm7tH8xILSsak=
|
||||
maunium.net/go/mautrix v0.11.1-0.20220529123139-5bc36b2978c1/go.mod h1:CiKpMhAx5QZFHK03jpWb0iKI3sGU8x6+LfsOjDrcO8I=
|
||||
|
|
|
@ -1379,10 +1379,11 @@ func (portal *Portal) CreateMatrixRoom(user *User, groupInfo *types.GroupInfo, i
|
|||
return err
|
||||
}
|
||||
portal.MXID = resp.RoomID
|
||||
portal.Update(nil)
|
||||
portal.bridge.portalsLock.Lock()
|
||||
portal.bridge.portalsByMXID[portal.MXID] = portal
|
||||
portal.bridge.portalsLock.Unlock()
|
||||
portal.Update(nil)
|
||||
portal.log.Infoln("Matrix room created:", portal.MXID)
|
||||
|
||||
// We set the memberships beforehand to make sure the encryption key exchange in initial backfill knows the users are here.
|
||||
for _, userID := range invite {
|
||||
|
@ -1503,10 +1504,7 @@ func (portal *Portal) SetReply(content *event.MessageEventContent, replyToID typ
|
|||
evt, err := portal.MainIntent().GetEvent(portal.MXID, message.MXID)
|
||||
if err != nil {
|
||||
portal.log.Warnln("Failed to get reply target:", err)
|
||||
content.RelatesTo = &event.RelatesTo{
|
||||
EventID: message.MXID,
|
||||
Type: event.RelReply,
|
||||
}
|
||||
content.RelatesTo = (&event.RelatesTo{}).SetReplyTo(message.MXID)
|
||||
return true
|
||||
}
|
||||
_ = evt.Content.ParseRaw(evt.Type)
|
||||
|
|
Loading…
Add table
Reference in a new issue