From 43236f8ea9356351a9e95c4549f7b5cd76f28932 Mon Sep 17 00:00:00 2001 From: Amy Dyer Date: Mon, 24 Jul 2023 09:34:13 -0400 Subject: [PATCH] model: Implement DmRecipientListConverter toJson method. DmRecipientListConverter toJson was unimplemented, and just returned the list of DMRecipient objects. This changes it to return JSON representing the DMRecipients, which allows a DMMessage to be serialized and deserialized. --- lib/api/model/model.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api/model/model.dart b/lib/api/model/model.dart index 6dbdec8d13f..8a104f9f9fc 100644 --- a/lib/api/model/model.dart +++ b/lib/api/model/model.dart @@ -383,7 +383,7 @@ class DmRecipientListConverter extends JsonConverter, List object) => object; + List toJson(List object) => object.map((r) => r.toJson()).toList(); } @JsonSerializable(fieldRename: FieldRename.snake)