sendDisputeChatMessage method

Future<void> sendDisputeChatMessage(
  1. String disputeId,
  2. String message,
  3. Iterable<Attachment> attachments
)

Implementation

Future<void> sendDisputeChatMessage(String disputeId, String message, Iterable<Attachment> attachments) async {
  if (!havenoChannel.isConnected) {
    throw DaemonNotConnectedException();
  }
  try {
    await havenoChannel.disputesClient?.sendDisputeChatMessage(SendDisputeChatMessageRequest(
      disputeId: disputeId,
      message: message,
      attachments: attachments,
    ));

    // Might need to create a fake protobuf message and add it to the stream controller just to conform (so the message appears instantly)

  } on GrpcError catch (e) {
    handleGrpcError(e);
  }
}