mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-11-13 05:21:51 +01:00
Update whatsmeow
This commit is contained in:
parent
3e29c51c06
commit
b752bb9c15
4 changed files with 7 additions and 11 deletions
2
go.mod
2
go.mod
|
@ -13,7 +13,7 @@ require (
|
|||
github.com/tidwall/gjson v1.17.0
|
||||
go.mau.fi/util v0.2.1
|
||||
go.mau.fi/webp v0.1.0
|
||||
go.mau.fi/whatsmeow v0.0.0-20231127175850-3c97433b4676
|
||||
go.mau.fi/whatsmeow v0.0.0-20231213182926-f17761e0fe8d
|
||||
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
|
||||
golang.org/x/image v0.14.0
|
||||
golang.org/x/net v0.19.0
|
||||
|
|
4
go.sum
4
go.sum
|
@ -68,8 +68,8 @@ go.mau.fi/util v0.2.1 h1:eazulhFE/UmjOFtPrGg6zkF5YfAyiDzQb8ihLMbsPWw=
|
|||
go.mau.fi/util v0.2.1/go.mod h1:MjlzCQEMzJ+G8RsPawHzpLB8rwTo3aPIjG5FzBvQT/c=
|
||||
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-20231127175850-3c97433b4676 h1:YaFOVOdFJCSSByUT6WSgh65ChcVEDZN4QD7OTwaMw+k=
|
||||
go.mau.fi/whatsmeow v0.0.0-20231127175850-3c97433b4676/go.mod h1:5xTtHNaZpGni6z6aE1iEopjW7wNgsKcolZxZrOujK9M=
|
||||
go.mau.fi/whatsmeow v0.0.0-20231213182926-f17761e0fe8d h1:ERk1aBRvcEC1fLb2HXDCb6UFvFHtuOSyRzFee9BxII4=
|
||||
go.mau.fi/whatsmeow v0.0.0-20231213182926-f17761e0fe8d/go.mod h1:5xTtHNaZpGni6z6aE1iEopjW7wNgsKcolZxZrOujK9M=
|
||||
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.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY=
|
||||
|
|
10
portal.go
10
portal.go
|
@ -430,7 +430,7 @@ func (portal *Portal) handleReceipt(receipt *events.Receipt, source *User) {
|
|||
// TODO handle lids
|
||||
return
|
||||
}
|
||||
if receipt.Type == events.ReceiptTypeDelivered {
|
||||
if receipt.Type == types.ReceiptTypeDelivered {
|
||||
portal.handleDeliveryReceipt(receipt, source)
|
||||
return
|
||||
}
|
||||
|
@ -5039,9 +5039,7 @@ func (portal *Portal) HandleMatrixLeave(brSender bridge.User) {
|
|||
func (portal *Portal) HandleMatrixKick(brSender bridge.User, brTarget bridge.Ghost) {
|
||||
sender := brSender.(*User)
|
||||
target := brTarget.(*Puppet)
|
||||
_, err := sender.Client.UpdateGroupParticipants(portal.Key.JID, map[types.JID]whatsmeow.ParticipantChange{
|
||||
target.JID: whatsmeow.ParticipantChangeRemove,
|
||||
})
|
||||
_, err := sender.Client.UpdateGroupParticipants(portal.Key.JID, []types.JID{target.JID}, whatsmeow.ParticipantChangeRemove)
|
||||
if err != nil {
|
||||
portal.log.Errorfln("Failed to kick %s from group as %s: %v", target.JID, sender.MXID, err)
|
||||
return
|
||||
|
@ -5052,9 +5050,7 @@ func (portal *Portal) HandleMatrixKick(brSender bridge.User, brTarget bridge.Gho
|
|||
func (portal *Portal) HandleMatrixInvite(brSender bridge.User, brTarget bridge.Ghost) {
|
||||
sender := brSender.(*User)
|
||||
target := brTarget.(*Puppet)
|
||||
_, err := sender.Client.UpdateGroupParticipants(portal.Key.JID, map[types.JID]whatsmeow.ParticipantChange{
|
||||
target.JID: whatsmeow.ParticipantChangeAdd,
|
||||
})
|
||||
_, err := sender.Client.UpdateGroupParticipants(portal.Key.JID, []types.JID{target.JID}, whatsmeow.ParticipantChangeAdd)
|
||||
if err != nil {
|
||||
portal.log.Errorfln("Failed to add %s to group as %s: %v", target.JID, sender.MXID, err)
|
||||
return
|
||||
|
|
2
user.go
2
user.go
|
@ -1238,7 +1238,7 @@ func (user *User) handleChatPresence(presence *events.ChatPresence) {
|
|||
}
|
||||
|
||||
func (user *User) handleReceipt(receipt *events.Receipt) {
|
||||
if receipt.Type != events.ReceiptTypeRead && receipt.Type != events.ReceiptTypeReadSelf && receipt.Type != events.ReceiptTypeDelivered {
|
||||
if receipt.Type != types.ReceiptTypeRead && receipt.Type != types.ReceiptTypeReadSelf && receipt.Type != types.ReceiptTypeDelivered {
|
||||
return
|
||||
}
|
||||
portal := user.GetPortalByMessageSource(receipt.MessageSource)
|
||||
|
|
Loading…
Reference in a new issue