You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: telegram.rb
    path of file: ./repos/gitlabhq/app/models/integrations
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Integrations
  class Telegram < BaseCh
    
    def self.help
      docs_link = ActionController::Base.helpers.link_to(
        _('Learn more.'),
        Rails.application.routes.url_helpers.help_page_url('user/project/integrations/telegram'),
        target: '_blank',
        rel: 'noopener noreferrer'
      )
      format(s_("TelegramIntegration|Send notifications about project events to Telegram. %{docs_link}"),
        docs_link: docs_link.html_safe
      )
    end

    def self.supported_events
      super - ['deployment']
    end

    private

    def set_webhook
      self.webhook = format(TELEGRAM_HOSTNAME, token: token) if token.present?
    end

    def notify(message, _opts)
      body = {
        text: message.summary,
        chat_id: room,
        parse_mode: 'markdown'
      }

      header = { 'Content-Type' => 'application/json' }
      response = Gitlab::HTTP.post(webhook, headers: header, body: Gitlab::Json.dump(body))

      response if response.success?
    end

    def custom_data(data)
      super(data).merge(markdown: true)
    end
  end