From cebb4bef843e848531bdf3465f49bd0d995efa8e Mon Sep 17 00:00:00 2001
From: JoramWilander
Date: Mon, 29 Jun 2015 09:07:13 -0400
Subject: move default channel creation to seperate func and add off-topic
---
web/web.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'web')
diff --git a/web/web.go b/web/web.go
index 7357124b5..443a75916 100644
--- a/web/web.go
+++ b/web/web.go
@@ -285,7 +285,7 @@ func getChannel(c *api.Context, w http.ResponseWriter, r *http.Request) {
otherUserId = ids[0]
}
- if sc, err := api.CreateDirectChannel(c, otherUserId, r.URL.Path); err != nil {
+ if sc, err := api.CreateDirectChannel(c, otherUserId); err != nil {
api.Handle404(w, r)
return
} else {
--
cgit v1.2.3-1-g7c22
From 72d54e427c035162260f47b0b79864e6193861e9 Mon Sep 17 00:00:00 2001
From: JoramWilander
Date: Mon, 29 Jun 2015 10:31:56 -0400
Subject: add intro text specific to off-topic channel
---
web/react/components/post_list.jsx | 13 ++++++++++++-
web/react/utils/constants.jsx | 1 +
2 files changed, 13 insertions(+), 1 deletion(-)
(limited to 'web')
diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx
index 37e3faef2..e37de8d88 100644
--- a/web/react/components/post_list.jsx
+++ b/web/react/components/post_list.jsx
@@ -356,6 +356,7 @@ module.exports = React.createClass({
var ui_name = channel.display_name
var members = ChannelStore.getCurrentExtraInfo().members;
var creator_name = "";
+ var userStyle = { color: UserStore.getCurrentUser().props.theme }
for (var i = 0; i < members.length; i++) {
if (members[i].roles.indexOf('admin') > -1) {
@@ -382,8 +383,18 @@ module.exports = React.createClass({
);
+ } else if (channel.name === Constants.OFFTOPIC_CHANNEL) {
+ more_messages = (
+
+
Welcome
+
+ {"This is the start of " + ui_name + ", a channel for conversations you’d prefer out of more focused channels."}
+
+ Set a description
+
+
+ );
} else {
- var userStyle = { color: UserStore.getCurrentUser().props.theme }
var ui_type = channel.type === 'P' ? "private group" : "channel";
more_messages = (
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx
index e5f42c8a0..a5124afe2 100644
--- a/web/react/utils/constants.jsx
+++ b/web/react/utils/constants.jsx
@@ -51,6 +51,7 @@ module.exports = {
MAX_UPLOAD_FILES: 5,
MAX_FILE_SIZE: 50000000, // 50 MB
DEFAULT_CHANNEL: 'town-square',
+ OFFTOPIC_CHANNEL: 'off-topic',
POST_CHUNK_SIZE: 60,
RESERVED_DOMAINS: [
"www",
--
cgit v1.2.3-1-g7c22