support for registering pushers
This commit is contained in:
parent
88cdcf9863
commit
fe871217b2
21 changed files with 350 additions and 22 deletions
25
lib/models/capabilities.dart
Normal file
25
lib/models/capabilities.dart
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
|
||||
part "capabilities.freezed.dart";
|
||||
part "capabilities.g.dart";
|
||||
|
||||
@Freezed(toJson: false, fromJson: false)
|
||||
@JsonSerializable()
|
||||
class const Capabilities({
|
||||
@JsonKey(name: "org.matrix.msc4174.webpush") final WebPush? webpush,
|
||||
}) with _$Capabilities {
|
||||
Map<String, Object?> toJson() => _$CapabilitiesToJson(this);
|
||||
|
||||
factory Capabilities.fromJson(Map<String, Object?> json) =>
|
||||
_$CapabilitiesFromJson(json);
|
||||
}
|
||||
|
||||
@Freezed(toJson: false, fromJson: false)
|
||||
@JsonSerializable()
|
||||
class const WebPush({required final bool enabled, final String? vapid})
|
||||
with _$WebPush {
|
||||
Map<String, Object?> toJson() => _$WebPushToJson(this);
|
||||
|
||||
factory WebPush.fromJson(Map<String, Object?> json) =>
|
||||
_$WebPushFromJson(json);
|
||||
}
|
||||
Loading…
Reference in a new issue