mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 20:08:26 +00:00
FEATURE: enable chat with dms only
This commit is contained in:
parent
a553dd70c0
commit
1e9add4843
@ -45,21 +45,22 @@ export default class ChatFooter extends Component {
|
||||
<template>
|
||||
{{#if this.shouldRenderFooter}}
|
||||
<nav class="c-footer">
|
||||
<DButton
|
||||
@route="chat.channels"
|
||||
@icon="comments"
|
||||
@translatedLabel={{i18n "chat.channel_list.title"}}
|
||||
aria-label={{i18n "chat.channel_list.aria_label"}}
|
||||
id="c-footer-channels"
|
||||
class={{concatClass
|
||||
"btn-transparent"
|
||||
"c-footer__item"
|
||||
(if (eq this.currentRouteName "chat.channels") "--active")
|
||||
}}
|
||||
>
|
||||
<UnreadChannelsIndicator />
|
||||
</DButton>
|
||||
|
||||
{{#if this.siteSettings.chat_public_channels_enabled}}
|
||||
<DButton
|
||||
@route="chat.channels"
|
||||
@icon="comments"
|
||||
@translatedLabel={{i18n "chat.channel_list.title"}}
|
||||
aria-label={{i18n "chat.channel_list.aria_label"}}
|
||||
id="c-footer-channels"
|
||||
class={{concatClass
|
||||
"btn-transparent"
|
||||
"c-footer__item"
|
||||
(if (eq this.currentRouteName "chat.channels") "--active")
|
||||
}}
|
||||
>
|
||||
<UnreadChannelsIndicator />
|
||||
</DButton>
|
||||
{{/if}}
|
||||
{{#if this.directMessagesEnabled}}
|
||||
<DButton
|
||||
@route="chat.direct-messages"
|
||||
|
@ -48,7 +48,7 @@ export default class ChatIndexRoute extends DiscourseRoute {
|
||||
|
||||
// We are on desktop. Check for last visited channel and transition if so
|
||||
const id = this.currentUser.custom_fields.last_chat_channel_id;
|
||||
if (id) {
|
||||
if (id /** && this.siteSettings.chat_public_channels_enabled **/) {
|
||||
return this.chatChannelsManager.find(id).then((c) => {
|
||||
return this.router.replaceWith("chat.channel", ...c.routeModels);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user