parent
f6aaf49164
commit
7007c9af89
2 changed files with 345 additions and 32 deletions
|
|
@ -13,6 +13,7 @@ import "package:nexus/models/content/reaction.dart";
|
|||
import "package:nexus/models/content/encrypted.dart";
|
||||
import "package:nexus/models/content/redaction.dart";
|
||||
import "package:nexus/models/content/server_acl.dart";
|
||||
import "package:nexus/models/content/space_child.dart";
|
||||
import "package:nexus/models/content/topic.dart";
|
||||
import "package:nexus/models/content/sticker.dart";
|
||||
import "package:nexus/models/content/history_visibility.dart";
|
||||
|
|
@ -65,6 +66,7 @@ enum EventType(
|
|||
tombstone("m.room.tombstone", Content.fromJson),
|
||||
reaction("m.reaction", ReactionContent.fromJson),
|
||||
pinnedEvents("m.room.pinned_events", PinnedEventsContent.fromJson),
|
||||
spaceChild("m.space.child", SpaceChildContent.fromJson),
|
||||
imagePack("m.room.image_pack", ImagePackContent.fromJson),
|
||||
legacyImagePack("im.ponies.room_emotes", ImagePackContent.fromJson),
|
||||
pollStart("org.matrix.msc3381.poll.start", PollStartContent.fromJson),
|
||||
|
|
|
|||
20
lib/models/content/space_child.dart
Normal file
20
lib/models/content/space_child.dart
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
import "package:nexus/models/content/content.dart";
|
||||
|
||||
part "space_child.freezed.dart";
|
||||
part "space_child.g.dart";
|
||||
|
||||
@Freezed(toJson: false, fromJson: false)
|
||||
@JsonSerializable(includeIfNull: false)
|
||||
class const SpaceChildContent({
|
||||
final IList<String> via = const .empty(),
|
||||
final String? order,
|
||||
final bool suggested = false,
|
||||
}) extends Content with _$SpaceChildContent {
|
||||
@override
|
||||
Map<String, Object?> toJson() => _$SpaceChildContentToJson(this);
|
||||
|
||||
factory SpaceChildContent.fromJson(Map<String, Object?> json) =>
|
||||
_$SpaceChildContentFromJson(json);
|
||||
}
|
||||
Loading…
Reference in a new issue