summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorDavid Meza <dmeza@users.noreply.github.com>2017-09-01 13:21:09 -0500
committerJoram Wilander <jwawilander@gmail.com>2017-09-01 14:21:09 -0400
commitb6456a675d140d6d80eb0874a5b6a89008e28eaa (patch)
tree2f90acc82dd3565a0c9f86608a73dd59d5ca0d80 /utils
parentdf94be8f3775ec63bbb896070c0565f733fd3033 (diff)
downloadchat-b6456a675d140d6d80eb0874a5b6a89008e28eaa.tar.gz
chat-b6456a675d140d6d80eb0874a5b6a89008e28eaa.tar.bz2
chat-b6456a675d140d6d80eb0874a5b6a89008e28eaa.zip
Add x to be able to leave public and private channels (#7145)
* Add config value EnableXToLeaveChannelsFromLHS that if true displays x to the right of private and public channels on the LHS. * Displays x to the right of private and public channels on the LHS based on if EnableXToLeaveChannelsFromLHS=true. * change the tooltip for private and public channels to `Leave channel` * Add client-side event for when user clicks the "x" button. Different for public, private, DM.
Diffstat (limited to 'utils')
-rw-r--r--utils/config.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/utils/config.go b/utils/config.go
index 642abfdf0..b99194c46 100644
--- a/utils/config.go
+++ b/utils/config.go
@@ -438,6 +438,7 @@ func getClientConfig(c *model.Config) map[string]string {
props["RestrictPublicChannelDeletion"] = *c.TeamSettings.RestrictPublicChannelDeletion
props["RestrictPrivateChannelDeletion"] = *c.TeamSettings.RestrictPrivateChannelDeletion
props["RestrictPrivateChannelManageMembers"] = *c.TeamSettings.RestrictPrivateChannelManageMembers
+ props["EnableXToLeaveChannelsFromLHS"] = strconv.FormatBool(*c.TeamSettings.EnableXToLeaveChannelsFromLHS)
props["TeammateNameDisplay"] = *c.TeamSettings.TeammateNameDisplay
props["AndroidLatestVersion"] = c.ClientRequirements.AndroidLatestVersion