ma1uta / jeon

Matrix API (java)
Apache License 2.0
20 stars 7 forks source link

UnsignedDeviceInfo in DeviceKeys should be mapped to 'unsigned' #13

Closed rvillars closed 2 years ago

rvillars commented 2 years ago

Hi,

Thx for this framework!. It was very helpful and saved me a lot of time. Just one small thing I've found: Currently the unsignedDeviceInfo property in the DeviceKeys model class will be mapped to 'unsignedDeviceInfo' in JSON. This is wrong according to the Matrix Client-Server API spec. It should be mapped to 'unsigned'.

See https://matrix.org/docs/spec/client_server/latest#post-matrix-client-r0-keys-query

Current:

"device_keys": {
    "@userId:homeserver": {
        "aDeviceId": {
            ...
            "unsignedDeviceInfo": {
                "device_display_name": "whatever"
            },
            "unsigned": {}
        }
    }
}

Correct:

"device_keys": {
    "@userId:homeserver": {
        "aDeviceId": {
            ...
            "unsigned": {
                "device_display_name": "whatever"
            }
        }
    }
}
ma1uta commented 2 years ago

Done in https://github.com/ma1uta/jeon/pull/10