add rooms to mention chips
Needs handling for event links, plus clickability
This commit is contained in:
parent
9c488e8981
commit
a9993013f5
8 changed files with 87 additions and 23 deletions
|
|
@ -7,7 +7,7 @@ part "join_room.g.dart";
|
|||
abstract class JoinRoomRequest with _$JoinRoomRequest {
|
||||
const factory JoinRoomRequest({
|
||||
required String roomIdOrAlias,
|
||||
required IList<String> via,
|
||||
@Default(IList.empty()) IList<String> via,
|
||||
}) = _JoinRoomRequest;
|
||||
|
||||
factory JoinRoomRequest.fromJson(Map<String, Object?> json) =>
|
||||
|
|
|
|||
23
lib/models/room_summary.dart
Normal file
23
lib/models/room_summary.dart
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
import "package:nexus/models/content/create.dart";
|
||||
import "package:nexus/models/join_rule.dart";
|
||||
part "room_summary.freezed.dart";
|
||||
part "room_summary.g.dart";
|
||||
|
||||
@freezed
|
||||
abstract class RoomSummary with _$RoomSummary {
|
||||
const factory RoomSummary({
|
||||
required String roomId,
|
||||
@JsonKey(name: "num_joined_members") required int joinedMembers,
|
||||
JoinRule? joinRule,
|
||||
String? name,
|
||||
Uri? avatarUrl,
|
||||
String? canonicalAlias,
|
||||
String? topic,
|
||||
String? roomVersion,
|
||||
@JsonKey(unknownEnumValue: RoomType.room) RoomType? roomType,
|
||||
}) = _RoomSummary;
|
||||
|
||||
factory RoomSummary.fromJson(Map<String, Object?> json) =>
|
||||
_$RoomSummaryFromJson(json);
|
||||
}
|
||||
Loading…
Reference in a new issue