forked from MirrorHub/mautrix-whatsapp
Update whatsmeow and improve history sync logging
This commit is contained in:
parent
6f14475667
commit
f74af8eb30
3 changed files with 5 additions and 4 deletions
2
go.mod
2
go.mod
|
@ -10,7 +10,7 @@ require (
|
||||||
github.com/prometheus/client_golang v1.11.1
|
github.com/prometheus/client_golang v1.11.1
|
||||||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
|
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
|
||||||
github.com/tidwall/gjson v1.14.1
|
github.com/tidwall/gjson v1.14.1
|
||||||
go.mau.fi/whatsmeow v0.0.0-20220513125336-055e2d469662
|
go.mau.fi/whatsmeow v0.0.0-20220514092657-a05359d4385a
|
||||||
golang.org/x/image v0.0.0-20220413100746-70e8d0d3baa9
|
golang.org/x/image v0.0.0-20220413100746-70e8d0d3baa9
|
||||||
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4
|
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4
|
||||||
google.golang.org/protobuf v1.28.0
|
google.golang.org/protobuf v1.28.0
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -120,8 +120,8 @@ github.com/yuin/goldmark v1.4.12 h1:6hffw6vALvEDqJ19dOJvJKOoAOKe4NDaTqvd2sktGN0=
|
||||||
github.com/yuin/goldmark v1.4.12/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
github.com/yuin/goldmark v1.4.12/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||||
go.mau.fi/libsignal v0.0.0-20220425070825-c40c839ee6a0 h1:3IQF2bgAyibdo77hTejwuJe4jlypj9QaE4xCQuxrThM=
|
go.mau.fi/libsignal v0.0.0-20220425070825-c40c839ee6a0 h1:3IQF2bgAyibdo77hTejwuJe4jlypj9QaE4xCQuxrThM=
|
||||||
go.mau.fi/libsignal v0.0.0-20220425070825-c40c839ee6a0/go.mod h1:kBOXTvYyDG/q1Ihgvd4J6WenGPh7wtEGvPKF6vmf5ak=
|
go.mau.fi/libsignal v0.0.0-20220425070825-c40c839ee6a0/go.mod h1:kBOXTvYyDG/q1Ihgvd4J6WenGPh7wtEGvPKF6vmf5ak=
|
||||||
go.mau.fi/whatsmeow v0.0.0-20220513125336-055e2d469662 h1:TJoeSOj9UBzGX582dLIWFpLkms2I1SQ1srHxuewDeI8=
|
go.mau.fi/whatsmeow v0.0.0-20220514092657-a05359d4385a h1:vMpDAR992ti5RLnux1mbEw2IbUm977IA28nT0txfhJw=
|
||||||
go.mau.fi/whatsmeow v0.0.0-20220513125336-055e2d469662/go.mod h1:iUBgOLNaqShLrR17u0kIiRptIGFH+nbT1tRhaWBEX/c=
|
go.mau.fi/whatsmeow v0.0.0-20220514092657-a05359d4385a/go.mod h1:iUBgOLNaqShLrR17u0kIiRptIGFH+nbT1tRhaWBEX/c=
|
||||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
|
|
|
@ -489,7 +489,7 @@ func (portal *Portal) backfill(source *User, messages []*waProto.WebMessageInfo,
|
||||||
addedMembers[puppet.MXID] = struct{}{}
|
addedMembers[puppet.MXID] = struct{}{}
|
||||||
}
|
}
|
||||||
|
|
||||||
portal.log.Infofln("Processing history sync with %d messages (forward: %t)", len(messages), isForward)
|
portal.log.Infofln("Processing history sync with %d messages (forward: %t, prev: %s, batch: %s)", len(messages), isForward, req.PrevEventID, req.BatchID)
|
||||||
// The messages are ordered newest to oldest, so iterate them in reverse order.
|
// The messages are ordered newest to oldest, so iterate them in reverse order.
|
||||||
for i := len(messages) - 1; i >= 0; i-- {
|
for i := len(messages) - 1; i >= 0; i-- {
|
||||||
webMsg := messages[i]
|
webMsg := messages[i]
|
||||||
|
@ -713,6 +713,7 @@ func (portal *Portal) sendPostBackfillDummy(lastTimestamp time.Time, insertionEv
|
||||||
msg.JID = types.MessageID(resp.EventID)
|
msg.JID = types.MessageID(resp.EventID)
|
||||||
msg.Timestamp = lastTimestamp.Add(1 * time.Second)
|
msg.Timestamp = lastTimestamp.Add(1 * time.Second)
|
||||||
msg.Sent = true
|
msg.Sent = true
|
||||||
|
msg.Type = database.MsgFake
|
||||||
msg.Insert()
|
msg.Insert()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue