Skip to content

Commit

Permalink
handlewhatsapp: fix handling own read receipts
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Sep 27, 2024
1 parent 778f223 commit a48d02b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/tidwall/gjson v1.17.3
go.mau.fi/util v0.8.1-0.20240925093630-1734c3c342eb
go.mau.fi/webp v0.1.0
go.mau.fi/whatsmeow v0.0.0-20240924113447-20b526a29c13
go.mau.fi/whatsmeow v0.0.0-20240927134544-69ba055bef0f
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0
golang.org/x/image v0.20.0
golang.org/x/net v0.29.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ go.mau.fi/util v0.8.1-0.20240925093630-1734c3c342eb h1:FoYnr6PtEIugdCipesrB7ltcW
go.mau.fi/util v0.8.1-0.20240925093630-1734c3c342eb/go.mod h1:1Ixb8HWoVbl3rT6nAX6nV4iMkzn7KU/KXwE0Rn5RmsQ=
go.mau.fi/webp v0.1.0 h1:BHObH/DcFntT9KYun5pDr0Ot4eUZO8k2C7eP7vF4ueA=
go.mau.fi/webp v0.1.0/go.mod h1:e42Z+VMFrUMS9cpEwGRIor+lQWO8oUAyPyMtcL+NMt8=
go.mau.fi/whatsmeow v0.0.0-20240924113447-20b526a29c13 h1:m7iJEYf0ogXbrJY+UuvlZPiHRfCDF+WH0lPNt4p8Ksg=
go.mau.fi/whatsmeow v0.0.0-20240924113447-20b526a29c13/go.mod h1:UvaXcdb8y5Mryj2LSXAMw7u4/exnWJIXn8Gvpmf6ndI=
go.mau.fi/whatsmeow v0.0.0-20240927134544-69ba055bef0f h1:+gT0NSk50HaAagtyj6J/a/QiNN34FJU+Vm1QyppV8Ec=
go.mau.fi/whatsmeow v0.0.0-20240927134544-69ba055bef0f/go.mod h1:UvaXcdb8y5Mryj2LSXAMw7u4/exnWJIXn8Gvpmf6ndI=
go.mau.fi/zeroconfig v0.1.3 h1:As9wYDKmktjmNZW5i1vn8zvJlmGKHeVxHVIBMXsm4kM=
go.mau.fi/zeroconfig v0.1.3/go.mod h1:NcSJkf180JT+1IId76PcMuLTNa1CzsFFZ0nBygIQM70=
golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A=
Expand Down
6 changes: 5 additions & 1 deletion pkg/connector/handlewhatsapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,12 @@ func (wa *WhatsAppClient) handleWAReceipt(evt *events.Receipt) {
return
}
targets := make([]networkid.MessageID, len(evt.MessageIDs))
messageSender := wa.JID
if !evt.MessageSender.IsEmpty() {
messageSender = evt.MessageSender
}
for i, id := range evt.MessageIDs {
targets[i] = waid.MakeMessageID(evt.Chat, *wa.Device.ID, id)
targets[i] = waid.MakeMessageID(evt.Chat, messageSender, id)
}
wa.Main.Bridge.QueueRemoteEvent(wa.UserLogin, &simplevent.Receipt{
EventMeta: simplevent.EventMeta{
Expand Down

0 comments on commit a48d02b

Please sign in to comment.