diff --git a/mobile/lib/core/model/user_message.dart b/mobile/lib/core/model/user_message.dart index a963e80..f4d9582 100644 --- a/mobile/lib/core/model/user_message.dart +++ b/mobile/lib/core/model/user_message.dart @@ -20,7 +20,7 @@ class UserMessage with _$UserMessage { static List fromJsonList(List json) => json.map((e) => UserMessage.fromJson(e)).toList(); - static List fromResponses({ + static List fromResponse({ required List json, required String userId, }) { diff --git a/mobile/lib/core/source/messages_remote_source.dart b/mobile/lib/core/source/messages_remote_source.dart index 74690f7..b164ae2 100644 --- a/mobile/lib/core/source/messages_remote_source.dart +++ b/mobile/lib/core/source/messages_remote_source.dart @@ -22,7 +22,7 @@ class MessagesRemoteSourceImpl implements MessagesRemoteSource { .from('messages') .select('*, user:sender(id, alias)') .order('created_at', ascending: true); - return UserMessage.fromResponses(json: response, userId: currentUserId); + return UserMessage.fromResponse(json: response, userId: currentUserId); } @override