Jitsi detection via well-known
This commit is contained in:
parent
8db8972c2f
commit
d07c85a76b
|
@ -19,6 +19,7 @@
|
||||||
class WellKnownInformations {
|
class WellKnownInformations {
|
||||||
MHomeserver mHomeserver;
|
MHomeserver mHomeserver;
|
||||||
MHomeserver mIdentityServer;
|
MHomeserver mIdentityServer;
|
||||||
|
JitsiHomeserver jitsiHomeserver;
|
||||||
Map<String, dynamic> content;
|
Map<String, dynamic> content;
|
||||||
|
|
||||||
WellKnownInformations.fromJson(Map<String, dynamic> json) {
|
WellKnownInformations.fromJson(Map<String, dynamic> json) {
|
||||||
|
@ -29,6 +30,9 @@ class WellKnownInformations {
|
||||||
mIdentityServer = json['m.identity_server'] != null
|
mIdentityServer = json['m.identity_server'] != null
|
||||||
? MHomeserver.fromJson(json['m.identity_server'])
|
? MHomeserver.fromJson(json['m.identity_server'])
|
||||||
: null;
|
: null;
|
||||||
|
jitsiHomeserver = json['im.vector.riot.jitsi'] != null
|
||||||
|
? JitsiHomeserver.fromJson(json['im.vector.riot.jitsi'])
|
||||||
|
: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
|
@ -52,3 +56,17 @@ class MHomeserver {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class JitsiHomeserver {
|
||||||
|
String baseUrl;
|
||||||
|
|
||||||
|
JitsiHomeserver.fromJson(Map<String, dynamic> json) {
|
||||||
|
baseUrl = json['preferredDomain'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final data = <String, dynamic>{};
|
||||||
|
data['preferredDomain'] = baseUrl;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue