mautrix / whatsapp

A Matrix-WhatsApp puppeting bridge

Home Page:https://maunium.net/go/mautrix-whatsapp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bridge sends invalid stickers

jplatte opened this issue · comments

Apparently, this event (seemingly with event ID and possibly other things redacted) was sent by mautix-whatsapp:

{
  "room_id": "censor",
  "type": "m.sticker",
  "content": {
    "body": "image.webp",
    "file": {
      "hashes": {
        "sha256": "censor"
      },
      "iv": "censor",
      "key": {
        "alg": "A256CTR",
        "ext": true,
        "k": "censor",
        "key_ops": [
          "encrypt",
          "decrypt"
        ],
        "kty": "oct"
      },
      "url": "mxc://fuo.fi/censor",
      "v": "v2"
    },
    "info": {
      "h": 190,
      "mimetype": "image/webp",
      "size": 29502,
      "thumbnail_file": {
        "hashes": {
          "sha256": "censor"
        },
        "iv": "censor",
        "key": {
          "alg": "A256CTR",
          "ext": true,
          "k": "censor",
          "key_ops": [
            "encrypt",
            "decrypt"
          ],
          "kty": "oct"
        },
        "url": "mxc://fuo.fi/censor",
        "v": "v2"
      },
      "thumbnail_info": {
        "h": 190,
        "mimetype": "image/webp",
        "size": 29502,
        "w": 190
      },
      "w": 190
    }
  }
}

(reported here in the Element X iOS room)

It has a url field, but nested under content -> file while the spec says that m.sticker must have a url under content directly.

That's encrypted, not invalid

Is there an MSC for that?

More of a spec omission/mistake than a MSC. Stickers are just m.images with their own event type, so all the same fields apply and file was probably just missed while copying the schema. The info schema was not duplicated, so thumbnail_file is already there.

Okay, thanks for the quick replies.