editMessage method

  1. @override
Future<DeliveryStatus> editMessage(
  1. String messageId,
  2. Message updated
)
override

Updates updated on the backend. messageId is the local/remote ID of the message to replace.

Implementation

@override
Future<DeliveryStatus> editMessage(String messageId, Message updated) async {
  if (!_connected) return DeliveryStatus.fail('not connected');
  _send({
    'type': 'edit',
    'payload': {'messageId': messageId, 'message': encodeMessage(updated)},
  });
  return DeliveryStatus.ok(messageId);
}