updateConversation method

  1. @override
Future<Conversation> updateConversation(
  1. String conversationId,
  2. UpdateConversationParams params
)
override

Implementation

@override
Future<Conversation> updateConversation(
    String conversationId, UpdateConversationParams params) async {
  final existing = _conversations[conversationId];
  if (existing == null) throw Exception('Conversation not found');
  final updated = existing.copyWith(
    name: params.name ?? existing.name,
    avatarUrl: params.avatarUrl ?? existing.avatarUrl,
  );
  _conversations[conversationId] = updated;
  return updated;
}