@@ -766,46 +766,46 @@ class StreamMessage extends Message {
766
766
}
767
767
768
768
@JsonSerializable (fieldRename: FieldRename .snake)
769
- class DmRecipient {
769
+ class DmDisplayRecipient {
770
770
final int id;
771
771
final String email;
772
772
final String fullName;
773
773
774
774
// final String? shortName; // obsolete, ignore
775
775
// final bool? isMirrorDummy; // obsolete, ignore
776
776
777
- DmRecipient ({required this .id, required this .email, required this .fullName});
777
+ const DmDisplayRecipient ({required this .id, required this .email, required this .fullName});
778
778
779
- factory DmRecipient .fromJson (Map <String , dynamic > json) =>
780
- _$DmRecipientFromJson (json);
779
+ factory DmDisplayRecipient .fromJson (Map <String , dynamic > json) =>
780
+ _$DmDisplayRecipientFromJson (json);
781
781
782
- Map <String , dynamic > toJson () => _$DmRecipientToJson (this );
782
+ Map <String , dynamic > toJson () => _$DmDisplayRecipientToJson (this );
783
783
784
784
@override
785
- String toString () => 'DmRecipient (id: $id , email: $email , fullName: $fullName )' ;
785
+ String toString () => 'DmDisplayRecipient (id: $id , email: $email , fullName: $fullName )' ;
786
786
787
787
@override
788
788
bool operator == (Object other) {
789
- if (other is ! DmRecipient ) return false ;
789
+ if (other is ! DmDisplayRecipient ) return false ;
790
790
return other.id == id && other.email == email && other.fullName == fullName;
791
791
}
792
792
793
793
@override
794
- int get hashCode => Object .hash ('DmRecipient ' , id, email, fullName);
794
+ int get hashCode => Object .hash ('DmDisplayRecipient ' , id, email, fullName);
795
795
}
796
796
797
- class DmRecipientListConverter extends JsonConverter <List <DmRecipient >, List <dynamic >> {
798
- const DmRecipientListConverter ();
797
+ class DmDisplayRecipientListConverter extends JsonConverter <List <DmDisplayRecipient >, List <dynamic >> {
798
+ const DmDisplayRecipientListConverter ();
799
799
800
800
@override
801
- List <DmRecipient > fromJson (List <dynamic > json) {
802
- return json.map ((e) => DmRecipient .fromJson (e as Map <String , dynamic >))
801
+ List <DmDisplayRecipient > fromJson (List <dynamic > json) {
802
+ return json.map ((e) => DmDisplayRecipient .fromJson (e as Map <String , dynamic >))
803
803
.toList (growable: false )
804
804
..sort ((a, b) => a.id.compareTo (b.id));
805
805
}
806
806
807
807
@override
808
- List <dynamic > toJson (List <DmRecipient > object) => object;
808
+ List <dynamic > toJson (List <DmDisplayRecipient > object) => object;
809
809
}
810
810
811
811
@JsonSerializable (fieldRename: FieldRename .snake)
@@ -826,8 +826,8 @@ class DmMessage extends Message {
826
826
/// from the store.
827
827
// TODO(server): Document that it's all users. That statement is based on
828
828
// reverse-engineering notes in zulip-mobile:src/api/modelTypes.js at PmMessage.
829
- @DmRecipientListConverter ()
830
- final List <DmRecipient > displayRecipient;
829
+ @DmDisplayRecipientListConverter ()
830
+ final List <DmDisplayRecipient > displayRecipient;
831
831
832
832
/// The user IDs of all users in the thread, sorted numerically.
833
833
///
0 commit comments