Compare commits

...

7 Commits

Author SHA1 Message Date
Marco Antonio Alvarez 677a89c0ec
Merge 38128830cc into 2224f17dfd 2024-03-27 15:09:53 +01:00
Tulir Asokan 2224f17dfd Update whatsmeow 2024-03-26 16:24:00 +02:00
Marco Alvarez 38128830cc use an empty url field 2024-01-03 18:21:50 +01:00
Marco Alvarez 995b3ea207 fix lint 2024-01-02 11:35:37 +01:00
Marco Alvarez 0ebb235e61 only add url field on sticker events (properly) 2024-01-02 10:53:19 +01:00
Marco Alvarez 598e6e68fc only add url field on sticker events 2024-01-02 10:24:36 +01:00
Marco Alvarez c9175c3f36 Always add URL field on media events
Fixes https://github.com/mautrix/whatsapp/issues/662
Fixes https://github.com/element-hq/element-x-ios/issues/1047
2023-12-29 15:27:03 +01:00
3 changed files with 10 additions and 3 deletions

2
go.mod
View File

@ -14,7 +14,7 @@ require (
github.com/tidwall/gjson v1.17.1
go.mau.fi/util v0.4.1
go.mau.fi/webp v0.1.0
go.mau.fi/whatsmeow v0.0.0-20240316104858-18372a0653fa
go.mau.fi/whatsmeow v0.0.0-20240326141755-051606b388f6
golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f
golang.org/x/image v0.15.0
golang.org/x/net v0.22.0

4
go.sum
View File

@ -73,8 +73,8 @@ go.mau.fi/util v0.4.1 h1:3EC9KxIXo5+h869zDGf5OOZklRd/FjeVnimTwtm3owg=
go.mau.fi/util v0.4.1/go.mod h1:GjkTEBsehYZbSh2LlE6cWEn+6ZIZTGrTMM/5DMNlmFY=
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-20240316104858-18372a0653fa h1:ifQivrTMLAAkBkIqdE/D56uAZyc7ziRdhUU59VfNPFg=
go.mau.fi/whatsmeow v0.0.0-20240316104858-18372a0653fa/go.mod h1:kNI5foyzqd77d5HaWc1Jico6/rxtZ/UE8nr80hIsbIk=
go.mau.fi/whatsmeow v0.0.0-20240326141755-051606b388f6 h1:CbU9Vq9Bvh03sk+xZO4FOaMTasuPiJbwyqWZsBa+gko=
go.mau.fi/whatsmeow v0.0.0-20240326141755-051606b388f6/go.mod h1:kNI5foyzqd77d5HaWc1Jico6/rxtZ/UE8nr80hIsbIk=
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.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=

View File

@ -3736,6 +3736,13 @@ func (portal *Portal) convertMediaMessage(ctx context.Context, intent *appservic
return portal.makeMediaBridgeFailureMessage(info, fmt.Errorf("failed to upload media: %w", err), converted, nil, "")
}
}
// Sticker events require the URL field to be present https://spec.matrix.org/v1.9/client-server-api/#events-16
// This seems to affect only clients based on the Rust SDK on encrypted channels (like Element X)
if typeName == "sticker" && converted.Content.File != nil {
converted.Extra["url"] = ""
}
return converted
}