def call
      return broadcast(:invalid) if form.invalid?
      return broadcast(:ok) if user_belongs_to_group?

      transaction do
        invite_user
        send_notification
      end

      broadcast(:ok)
    end
def call
      return broadcast(:invalid) if form.invalid?
      return broadcast(:ok) if user_belongs_to_group?

      transaction do
        invite_user
        send_notification
      end

      broadcast(:ok)
    end
Public: Initializes the command.

 form - A form object with the params.
 user_group - The user group that invites the user
 Executes the command. Broadcasts these events:

 - :ok when everything is valid.
 - :invalid if the form wasn't valid and we couldn't proceed.

 Returns nothing.