@@ -766,46 +766,46 @@ class StreamMessage extends Message {
766766}
767767
768768@JsonSerializable (fieldRename: FieldRename .snake)
769- class DmRecipient {
769+ class DmDisplayRecipient {
770770 final int id;
771771 final String email;
772772 final String fullName;
773773
774774 // final String? shortName; // obsolete, ignore
775775 // final bool? isMirrorDummy; // obsolete, ignore
776776
777- DmRecipient ({required this .id, required this .email, required this .fullName});
777+ const DmDisplayRecipient ({required this .id, required this .email, required this .fullName});
778778
779- factory DmRecipient .fromJson (Map <String , dynamic > json) =>
780- _$DmRecipientFromJson (json);
779+ factory DmDisplayRecipient .fromJson (Map <String , dynamic > json) =>
780+ _$DmDisplayRecipientFromJson (json);
781781
782- Map <String , dynamic > toJson () => _$DmRecipientToJson (this );
782+ Map <String , dynamic > toJson () => _$DmDisplayRecipientToJson (this );
783783
784784 @override
785- String toString () => 'DmRecipient (id: $id , email: $email , fullName: $fullName )' ;
785+ String toString () => 'DmDisplayRecipient (id: $id , email: $email , fullName: $fullName )' ;
786786
787787 @override
788788 bool operator == (Object other) {
789- if (other is ! DmRecipient ) return false ;
789+ if (other is ! DmDisplayRecipient ) return false ;
790790 return other.id == id && other.email == email && other.fullName == fullName;
791791 }
792792
793793 @override
794- int get hashCode => Object .hash ('DmRecipient ' , id, email, fullName);
794+ int get hashCode => Object .hash ('DmDisplayRecipient ' , id, email, fullName);
795795}
796796
797- class DmRecipientListConverter extends JsonConverter <List <DmRecipient >, List <dynamic >> {
798- const DmRecipientListConverter ();
797+ class DmDisplayRecipientListConverter extends JsonConverter <List <DmDisplayRecipient >, List <dynamic >> {
798+ const DmDisplayRecipientListConverter ();
799799
800800 @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 >))
803803 .toList (growable: false )
804804 ..sort ((a, b) => a.id.compareTo (b.id));
805805 }
806806
807807 @override
808- List <dynamic > toJson (List <DmRecipient > object) => object;
808+ List <dynamic > toJson (List <DmDisplayRecipient > object) => object;
809809}
810810
811811@JsonSerializable (fieldRename: FieldRename .snake)
@@ -826,8 +826,8 @@ class DmMessage extends Message {
826826 /// from the store.
827827 // TODO(server): Document that it's all users. That statement is based on
828828 // 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;
831831
832832 /// The user IDs of all users in the thread, sorted numerically.
833833 ///
0 commit comments