gitlab-org--gitlab-foss/app/models/project_services/chat_service.rb

22 lines
498 B
Ruby
Raw Normal View History

# Base class for Chat services
2016-11-14 06:41:14 -05:00
# This class is not meant to be used directly, but only to inherrit from.
class ChatService < Service
default_value_for :category, 'chat'
has_many :chat_names, foreign_key: :service_id
def valid_token?(token)
self.respond_to?(:token) &&
self.token.present? &&
ActiveSupport::SecurityUtils.variable_size_secure_compare(token, self.token)
end
def supported_events
[]
end
def trigger(params)
2016-11-14 06:41:14 -05:00
raise NotImplementedError
end
end