1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
|
@page "/ServerInfo/{Homeserver}"
@using LibMatrix.Responses
@using ArcaneLibs.Extensions
<h3>Server info for @Homeserver</h3>
<hr/>
@if (ServerVersionResponse is not null) {
<p>Server version: @ServerVersionResponse.Server.Name @ServerVersionResponse.Server.Version</p>
<pre>@ServerVersionResponse?.ToJson(ignoreNull: true)</pre>
<br/>
}
@if (ClientVersionsResponse is not null) {
<p>Client versions:</p>
<details>
<summary>JSON data</summary>
<pre>@ClientVersionsResponse?.ToJson(ignoreNull: true)</pre>
</details>
<u>Spec versions</u>
<table>
<thead>
<td></td>
<td>Version</td>
<td>Release date</td>
</thead>
@foreach (var (version, info) in ClientVersions) {
<tr>
<td>@(ClientVersionsResponse.Versions.Contains(version) ? "\u2714" : "\u274c")</td>
<td><a href="@info.SpecUrl">@info.Name</a></td>
<td>@info.Released</td>
</tr>
}
@foreach (var version in ClientVersionsResponse.Versions) {
if (!ClientVersions.ContainsKey(version)) {
<tr>
<td>@("\u2714")</td>
<td><a href="https://spec.matrix.org/@version">Unknown version: @version</a></td>
<td></td>
</tr>
}
}
</table>
<u>Unstable features</u>
<table>
<thead>
<td style="padding-right: 8px;">Supported</td>
<td style="padding-right: 8px;">Enabled</td>
<td style="padding-right: 8px;">Name</td>
</thead>
@* @foreach (var (version, info) in ClientVersions) { *@
@* <tr> *@
@* *@
@* <td>@("\u2714")</td> *@
@* <td>@(ClientVersionsResponse.Versions.Contains(version) ? "\u2714" : "\u274c")</td> *@
@* <td>@info.Released</td> *@
@* </tr> *@
@* } *@
@foreach (var version in ClientVersionsResponse.UnstableFeatures) {
if (!ClientVersions.ContainsKey(version.Key)) {
<tr>
<td>@("\u2714")</td>
<td>@(version.Value ? "\u2714" : "\u274c")</td>
<td>@version.Key</td>
</tr>
}
}
</table>
}
@code {
[Parameter]
public string? Homeserver { get; set; }
public ServerVersionResponse? ServerVersionResponse { get; set; }
public ClientVersionsResponse? ClientVersionsResponse { get; set; }
protected override async Task OnParametersSetAsync() {
if (Homeserver is not null) {
var rhs = await hsProvider.GetRemoteHomeserver(Homeserver);
ServerVersionResponse = await (rhs.FederationClient?.GetServerVersionAsync() ?? Task.FromResult<ServerVersionResponse?>(null));
ClientVersionsResponse = await rhs.GetClientVersionsAsync();
}
base.OnParametersSetAsync();
}
private class ClientVersionInfo {
public string Name { get; set; }
public string SpecUrl { get; set; }
public DateTime Released { get; set; }
}
private Dictionary<string, ClientVersionInfo> ClientVersions = new() {
{
"legacy",
new() {
Name = "Legacy: Last draft before formal release of r0.0.0",
Released = DateTime.Parse("2014-07-01 00:00:00 +0000"),
SpecUrl = "https://spec.matrix.org/legacy/legacy/"
}
},
{
"r0.0.0",
new() {
Name = "r0.0.0: Initial release: media repo, sync v2",
Released = DateTime.Parse("2014-07-01 00:00:00 +0000"),
SpecUrl = "https://spec.matrix.org/legacy/r0.0.0/"
}
},
{
"r0.0.1",
new() {
Name = "r0.0.1: User-interactive authentication, groups, read receipts, presence",
Released = DateTime.Parse("2014-07-01 00:00:00 +0000"),
SpecUrl = "https://spec.matrix.org/legacy/r0.0.1/"
}
},
{
"r0.1.0",
new() {
Name = "r0.1.0: Device management, account data, push rules, VoIP",
Released = DateTime.Parse("2014-07-01 00:00:00 +0000"),
SpecUrl = "https://spec.matrix.org/legacy/r0.1.0/"
}
},
{
"r0.2.0",
new() {
Name = "r0.2.0: Clarifications",
Released = DateTime.Parse("2014-07-01 00:00:00 +0000"),
SpecUrl = "https://spec.matrix.org/legacy/client_server/r0.2.0.html"
}
},
{
"r0.3.0",
new() {
Name = "r0.3.0: Device management",
Released = DateTime.Parse("2014-07-01 00:00:00 +0000"),
SpecUrl = "https://spec.matrix.org/legacy/client_server/r0.3.0.html"
}
},
{
"r0.4.0",
new() {
Name = "r0.4.0: Room directory",
Released = DateTime.Parse("2014-07-01 00:00:00 +0000"),
SpecUrl = "https://spec.matrix.org/legacy/r0.4.0/"
}
},
{
"r0.5.0",
new() {
Name = "r0.5.0: Push rules, VoIP, groups, read receipts, presence",
Released = DateTime.Parse("2014-07-01 00:00:00 +0000"),
SpecUrl = "https://spec.matrix.org/legacy/r0.5.0/"
}
},
{
"r0.6.0",
new() {
Name = "r0.6.0: Unbinding 3PIDs, clean up bindings from register",
Released = DateTime.Parse("2014-07-01 00:00:00 +0000"),
SpecUrl = "https://spec.matrix.org/legacy/r0.6.0/"
}
},
{
"r0.6.1",
new(){
Name = "r0.6.1: Moderation policies, better alias handling",
Released = DateTime.Parse("2014-07-01 00:00:00 +0000"),
SpecUrl = "https://spec.matrix.org/legacy/r0.6.1/"
}
},
{
"v1.1",
new() {
Name = "v1.1: Key backup, knocking",
Released = DateTime.Parse("2021-11-09 00:00:00 +0000"),
SpecUrl = "https://spec.matrix.org/v1.1/"
}
}, {
"v1.2",
new() {
Name = "v1.2: ",
Released = DateTime.Parse("2022-02-02 00:00:00 +0000"),
SpecUrl = "https://spec.matrix.org/v1.2/"
}
}, {
"v1.3",
new() {
Name = "v1.3: ",
Released = DateTime.Parse("2022-06-15 00:00:00 +0100"),
SpecUrl = "https://spec.matrix.org/v1.3/"
}
}, {
"v1.4",
new() {
Name = "v1.4: ",
Released = DateTime.Parse("2022-09-29 00:00:00 +0100"),
SpecUrl = "https://spec.matrix.org/v1.4/"
}
}, {
"v1.5",
new() {
Name = "v1.5: ",
Released = DateTime.Parse("2022-11-17 08:22:11 -0700"),
SpecUrl = "https://spec.matrix.org/v1.5/"
}
}, {
"v1.6",
new () {
Name = "v1.6: ",
Released = DateTime.Parse("2023-02-14 08:25:40 -0700"),
SpecUrl = "https://spec.matrix.org/v1.6"
}
}, {
"v1.7",
new () {
Name = "v1.7: ",
Released = DateTime.Parse("2023-05-25 09:47:21 -0600"),
SpecUrl = "https://spec.matrix.org/v1.7"
}
}, {
"v1.8",
new () {
Name = "v1.8: Room version 11",
Released = DateTime.Parse("2023-08-23 09:23:53 -0600"),
SpecUrl = "https://spec.matrix.org/v1.8"
}
}
};
}
|