forked from Nexus/nexus
add invite blocking support plus msc4494 support
To accomplish this I also reworked how account data is stored and added a method to fetch capabilities, and another method to set account data
This commit is contained in:
parent
115bec5f05
commit
f97c5548a3
11 changed files with 176 additions and 24 deletions
25
lib/models/spec_versions_response.dart
Normal file
25
lib/models/spec_versions_response.dart
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
part "spec_versions_response.freezed.dart";
|
||||
part "spec_versions_response.g.dart";
|
||||
|
||||
@freezed
|
||||
abstract class SpecVersionsResponse with _$SpecVersionsResponse {
|
||||
const factory SpecVersionsResponse({
|
||||
required IList<String> versions,
|
||||
required UnstableFeatures unstableFeatures,
|
||||
}) = _SpecVersionsResponse;
|
||||
|
||||
factory SpecVersionsResponse.fromJson(Map<String, Object?> json) =>
|
||||
_$SpecVersionsResponseFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class UnstableFeatures with _$UnstableFeatures {
|
||||
const factory UnstableFeatures({
|
||||
@JsonKey(name: "uk.timedout.msc4494") @Default(false) bool msc4494,
|
||||
}) = _UnstableFeatures;
|
||||
|
||||
factory UnstableFeatures.fromJson(Map<String, Object?> json) =>
|
||||
_$UnstableFeaturesFromJson(json);
|
||||
}
|
||||
Loading…
Reference in a new issue