sendInvitation method

  1. @override
void sendInvitation(
  1. String username,
  2. String? invitationId
)
override

Implementation

@override
void sendInvitation(String username, String? invitationId) {
  InvitationMessage message = InvitationMessage(
      id: invitationId ?? const Uuid().v4(),
      type: MessageType.invitationRequest,
      sendTime: DateTime.now().millisecondsSinceEpoch);

  String topic =
      username.toInvitationEventTopic; //TODO: decide the right topic
  clientHandler.sendPayload(message.toJson().toString(), topic);
}