discourse/plugins/chat/app/models/direct_message_channel.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
437 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class DirectMessageChannel < ChatChannel
alias_attribute :direct_message, :chatable
def direct_message_channel?
true
end
def allowed_user_ids
direct_message.user_ids
end
def read_restricted?
true
end
def title(user)
direct_message.chat_channel_title_for_user(self, user)
end
def ensure_slug_ok
true
end
def generate_auto_slug
self.slug = nil
end
end