forwardChatMessage method

void forwardChatMessage(
  1. ChatMessage toForwardMessage,
  2. String toId,
  3. String toName,
  4. String toRoom,
)

Implementation

void forwardChatMessage(
    ChatMessage toForwardMessage, String toId, String toName, String toRoom) {
  ChatMessage newMessage = toForwardMessage.copyWith(
      originalId: toForwardMessage.id,
      originalMessage: toForwardMessage.text,
      originality: MessageOriginality.forward,
      toId: toId,
      toName: toName,
      sendTime: DateTime.now().millisecondsSinceEpoch);
  sendChatMessage(newMessage, toRoom);
}