/// Use case: Récupérer les messages d'une conversation v4
library get_messages;

import 'package:injectable/injectable.dart';

import '../entities/message.dart';
import '../repositories/messaging_repository.dart';

@lazySingleton
class GetMessages {
  final MessagingRepository repository;

  GetMessages(this.repository);

  Future<List<Message>> call({
    required String conversationId,
    int page = 0,
  }) async {
    return await repository.getMessages(conversationId, page: page);
  }
}
