ruma / homeserver

A Matrix homeserver written in Rust.
https://www.ruma.io/
1.08k stars 41 forks source link

Response from the Versions endpoint is incorrect #123

Closed jstnlef closed 7 years ago

jstnlef commented 7 years ago

Originally the response returned as

["r0.0.1"]

where the spec defines it to return as

{
    "versions": ["r0.0.1"]
}

This should fix that. However, I have another question, is the expectation that ruma will support all versions of the spec? At the very least I believe it should be supporting the most recent one. Let me know and I can modify or add as needed.

jimmycuadra commented 7 years ago

Good catch! I'm not sure how we're going to do version support in the future after Ruma has been released a few times and a new version of the spec has come out since the first release. Prior to the initial release of Ruma, at least, we'll just keep tracking whatever the latest version of the spec is. In this case, we should bump the supported version to 0.2.0, and again for 0.3.0 when that comes out.

The new supported constructor you added seems good. In fact, we can just removed the basic new constructor now, and supported can initialize the struct directly.

jstnlef commented 7 years ago

I'll make those changes shortly 👍

jimmycuadra commented 7 years ago

Looks good. Can you squash down to one commit? Then I'll merge it!

jstnlef commented 7 years ago

Squashed 👍