discourse/plugins/chat/app/models/d_m_channel.rb
Roman Rizzi 0a5f548635
DEV: Move discourse-chat to the core repo. (#18776)
As part of this move, we are also renaming `discourse-chat` to `chat`.
2022-11-02 10:41:30 -03:00

23 lines
426 B
Ruby

# frozen_string_literal: true
# TODO: merge DMChannel and DirectMessageChannel models together
class DMChannel < ChatChannel
alias_attribute :direct_message_channel, :chatable
def direct_message_channel?
true
end
def allowed_user_ids
direct_message_channel.user_ids
end
def read_restricted?
true
end
def title(user)
direct_message_channel.chat_channel_title_for_user(self, user)
end
end