diff --git a/CHANGELOG.md b/CHANGELOG.md index 425902cf01..0d550f4d18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,14 @@ The "UNDER DEVELOPMENT" section of the Mattermost changelog appears in the product's `master` branch to note key changes committed to master and are on their way to the next stable release. When a stable release is pushed the "UNDER DEVELOPMENT" heading is removed from the final changelog of the release. +- **Release candidate anticipated:** 2015-11-10 - **Final release anticipated:** 2015-11-16 +### Changes + +- IE 10 no longer supported since global share of IE 10 fell below 5% + + ## Release v1.1.0 Released: 2015-10-16 diff --git a/README.md b/README.md index 08f01f7178..eb273b7ecd 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,12 @@ Please see the [features pages of the Mattermost website](http://www.mattermost. - Attach sound, video and image files from mobile devices - Define team-specific branding and color themes across your devices +#### Self-Host Ready + +- Host and manage dozens of teams from a single Mattermost server +- Easily manage your Mattermost server using a web-based System Console +- Script setup and maintenance using Mattermost command line tools + ## Learn More - [Product Vision and Target Audiences](http://www.mattermost.org/vision/) - What we're solving and for whom are we building @@ -38,7 +44,9 @@ Follow us on Twitter at [@MattermostHQ](https://twitter.com/mattermosthq). ## Installing Mattermost -There are multiple ways to install Mattermost depending on your needs. +Latest stable release of Mattermost is available from http://www.mattermost.org/download/, including binary distribution, and from install guides below. + +If you use Docker, you can [install Mattermost in a single-container preview in one line](https://github.com/mattermost/platform/blob/master/doc/install/Docker-Single-Container.md#one-line-docker-install). #### Quick Start Install for Product Evaluation diff --git a/api/channel.go b/api/channel.go index adf1253780..70f7eba4bf 100644 --- a/api/channel.go +++ b/api/channel.go @@ -568,7 +568,7 @@ func updateLastViewedAt(c *Context, w http.ResponseWriter, r *http.Request) { Srv.Store.Channel().UpdateLastViewedAt(id, c.Session.UserId) - message := model.NewMessage(c.Session.TeamId, id, c.Session.UserId, model.ACTION_VIEWED) + message := model.NewMessage(c.Session.TeamId, id, c.Session.UserId, model.ACTION_CHANNEL_VIEWED) message.Add("channel_id", id) PublishAndForget(message) @@ -777,9 +777,8 @@ func RemoveUserFromChannel(userIdToRemove string, removerUserId string, channel UpdateChannelAccessCacheAndForget(channel.TeamId, userIdToRemove, channel.Id) - message := model.NewMessage(channel.TeamId, "", userIdToRemove, model.ACTION_USER_REMOVED) - message.Add("channel_id", channel.Id) - message.Add("remover", removerUserId) + message := model.NewMessage(channel.TeamId, channel.Id, userIdToRemove, model.ACTION_USER_REMOVED) + message.Add("remover_id", removerUserId) PublishAndForget(message) return nil diff --git a/api/web_conn.go b/api/web_conn.go index a5099e5202..50a003acea 100644 --- a/api/web_conn.go +++ b/api/web_conn.go @@ -92,24 +92,9 @@ func (c *WebConn) writePump() { return } - if len(msg.ChannelId) > 0 { - allowed, ok := c.ChannelAccessCache[msg.ChannelId] - if !ok { - allowed = hasPermissionsToChannel(Srv.Store.Channel().CheckPermissionsTo(c.TeamId, msg.ChannelId, c.UserId)) - c.ChannelAccessCache[msg.ChannelId] = allowed - } - - if allowed { - c.WebSocket.SetWriteDeadline(time.Now().Add(WRITE_WAIT)) - if err := c.WebSocket.WriteJSON(msg); err != nil { - return - } - } - } else { - c.WebSocket.SetWriteDeadline(time.Now().Add(WRITE_WAIT)) - if err := c.WebSocket.WriteJSON(msg); err != nil { - return - } + c.WebSocket.SetWriteDeadline(time.Now().Add(WRITE_WAIT)) + if err := c.WebSocket.WriteJSON(msg); err != nil { + return } case <-ticker.C: @@ -121,9 +106,11 @@ func (c *WebConn) writePump() { } } -func (c *WebConn) updateChannelAccessCache(channelId string) { +func (c *WebConn) updateChannelAccessCache(channelId string) bool { allowed := hasPermissionsToChannel(Srv.Store.Channel().CheckPermissionsTo(c.TeamId, channelId, c.UserId)) c.ChannelAccessCache[channelId] = allowed + + return allowed } func hasPermissionsToChannel(sc store.StoreChannel) bool { diff --git a/api/web_team_hub.go b/api/web_team_hub.go index c57de550fa..6a25b7d3da 100644 --- a/api/web_team_hub.go +++ b/api/web_team_hub.go @@ -53,7 +53,7 @@ func (h *TeamHub) Start() { } case msg := <-h.broadcast: for webCon := range h.connections { - if !(webCon.UserId == msg.UserId && msg.Action == model.ACTION_TYPING) { + if ShouldSendEvent(webCon, msg) { select { case webCon.Send <- msg: default: @@ -86,3 +86,32 @@ func (h *TeamHub) UpdateChannelAccessCache(userId string, channelId string) { } } } + +func ShouldSendEvent(webCon *WebConn, msg *model.Message) bool { + + if webCon.UserId == msg.UserId { + // Don't need to tell the user they are typing + if msg.Action == model.ACTION_TYPING { + return false + } + } else { + // Don't share a user's view events with other users + if msg.Action == model.ACTION_CHANNEL_VIEWED { + return false + } + + // Only report events to a user who is the subject of the event, or is in the channel of the event + if len(msg.ChannelId) > 0 { + allowed, ok := webCon.ChannelAccessCache[msg.ChannelId] + if !ok { + allowed = webCon.updateChannelAccessCache(msg.ChannelId) + } + + if !allowed { + return false + } + } + } + + return true +} diff --git a/doc/install/Production-Ubuntu.md b/doc/install/Production-Ubuntu.md index 87f8edb848..836af3995f 100644 --- a/doc/install/Production-Ubuntu.md +++ b/doc/install/Production-Ubuntu.md @@ -160,10 +160,11 @@ exec bin/platform proxy_set_header X-Forwarded-Ssl on; ``` ## Finish Mattermost Server setup + 1. Navigate to https://mattermost.example.com and create a team and user. 1. The first user in the system is automatically granted the `system_admin` role, which gives you access to the System Console. 1. From the `town-square` channel click the dropdown and choose the `System Console` option -1. Update Email Settings. We recommend using an email sending service. The example below assumes AmazonSES. +1. Update Email Settings. We recommend using an email sending service. The example shows how an Amazon SES setup might look (sample credentials shown below are not real). * Set *Send Email Notifications* to true * Set *Require Email Verification* to true * Set *Feedback Name* to `No-Reply` diff --git a/doc/install/Troubleshooting.md b/doc/install/Troubleshooting.md index b87663ab35..6a7260ddfa 100644 --- a/doc/install/Troubleshooting.md +++ b/doc/install/Troubleshooting.md @@ -5,3 +5,8 @@ 1. **DO NOT manipulate the Mattermost database** - In particular, DO NOT delete data from the database, as Mattermost is designed to stop working if data integrity has been compromised. The system is designed to archive content continously and generally assumes data is never deleted. + +#### Common Issues + +1. Error message in logs when attempting to sign-up: `x509: certificate signed by unknown authority` + - This error may appear when attempt to use a self-signed certificate to setup SSL, which is not yet supported by Mattermost. You can resolve this issue by setting up a load balancer like Ngnix. A ticket exists to [add support for self-signed certificates in future](x509: certificate signed by unknown authority). diff --git a/model/message.go b/model/message.go index 122af4d9c2..2725353ac8 100644 --- a/model/message.go +++ b/model/message.go @@ -9,14 +9,14 @@ import ( ) const ( - ACTION_TYPING = "typing" - ACTION_POSTED = "posted" - ACTION_POST_EDITED = "post_edited" - ACTION_POST_DELETED = "post_deleted" - ACTION_VIEWED = "viewed" - ACTION_NEW_USER = "new_user" - ACTION_USER_ADDED = "user_added" - ACTION_USER_REMOVED = "user_removed" + ACTION_TYPING = "typing" + ACTION_POSTED = "posted" + ACTION_POST_EDITED = "post_edited" + ACTION_POST_DELETED = "post_deleted" + ACTION_CHANNEL_VIEWED = "channel_viewed" + ACTION_NEW_USER = "new_user" + ACTION_USER_ADDED = "user_added" + ACTION_USER_REMOVED = "user_removed" ) type Message struct { diff --git a/utils/mail.go b/utils/mail.go index c91c15a6a2..07a79eeb29 100644 --- a/utils/mail.go +++ b/utils/mail.go @@ -6,15 +6,22 @@ package utils import ( l4g "code.google.com/p/log4go" "crypto/tls" + "encoding/base64" "fmt" "github.com/mattermost/platform/model" - "html" "net" "net/mail" "net/smtp" "time" ) +func encodeRFC2047Word(s string) string { + // TODO: use `mime.BEncoding.Encode` instead when `go` >= 1.5 + // return mime.BEncoding.Encode("utf-8", s) + dst := base64.StdEncoding.EncodeToString([]byte(s)) + return "=?utf-8?b?" + dst + "?=" +} + func connectToSMTPServer(config *model.Config) (net.Conn, *model.AppError) { var conn net.Conn var err error @@ -102,9 +109,10 @@ func SendMailUsingConfig(to, subject, body string, config *model.Config) *model. headers := make(map[string]string) headers["From"] = fromMail.String() headers["To"] = toMail.String() - headers["Subject"] = html.UnescapeString(subject) + headers["Subject"] = encodeRFC2047Word(subject) headers["MIME-version"] = "1.0" - headers["Content-Type"] = "text/html" + headers["Content-Type"] = "text/html; charset=\"utf-8\"" + headers["Content-Transfer-Encoding"] = "8bit" headers["Date"] = time.Now().Format(time.RFC1123Z) message := "" diff --git a/web/react/components/activity_log_modal.jsx b/web/react/components/activity_log_modal.jsx index 74d6c64e3d..2c944913f8 100644 --- a/web/react/components/activity_log_modal.jsx +++ b/web/react/components/activity_log_modal.jsx @@ -81,6 +81,7 @@ export default class ActivityLogModal extends React.Component { const currentSession = this.state.sessions[i]; const lastAccessTime = new Date(currentSession.last_activity_at); const firstAccessTime = new Date(currentSession.create_at); + let devicePlatform = currentSession.props.platform; let devicePicture = ''; if (currentSession.props.platform === 'Windows') { @@ -88,7 +89,12 @@ export default class ActivityLogModal extends React.Component { } else if (currentSession.props.platform === 'Macintosh' || currentSession.props.platform === 'iPhone') { devicePicture = 'fa fa-apple'; } else if (currentSession.props.platform === 'Linux') { - devicePicture = 'fa fa-linux'; + if (currentSession.props.os.indexOf('Android') >= 0) { + devicePlatform = 'Android'; + devicePicture = 'fa fa-android'; + } else { + devicePicture = 'fa fa-linux'; + } } let moreInfo; @@ -119,7 +125,7 @@ export default class ActivityLogModal extends React.Component { className='activity-log__table' >
+
| {'%T'} | {'Time (15:04:05 MST)'} |
| {'%D'} | {'Date (2006/01/02)'} |
| {'%d'} | {'Date (01/02/06)'} |
| {'%L'} | {'Level (DEBG, INFO, EROR)'} |
| {'%S'} | {'Source'} |
| {'%M'} | {'Message'} |
| {'%T'} | {'Time (15:04:05 MST)'} |
| {'%D'} | {'Date (2006/01/02)'} |
| {'%d'} | {'Date (01/02/06)'} |
| {'%L'} | {'Level (DEBG, INFO, EROR)'} |
| {'%S'} | {'Source'} |
| {'%M'} | {'Message'} |
|
- {channel.display_name} -{channel.description} +{channel.display_name} +{channel.description} |
{joinButton}
diff --git a/web/react/components/more_direct_channels.jsx b/web/react/components/more_direct_channels.jsx
index 08b64de8be..1051990352 100644
--- a/web/react/components/more_direct_channels.jsx
+++ b/web/react/components/more_direct_channels.jsx
@@ -140,12 +140,12 @@ export default class MoreDirectChannels extends React.Component {
if (user.nickname) {
const separator = fullName ? ' - ' : '';
details.push(
-
{separator + user.nickname}
-
+
);
}
@@ -170,31 +170,38 @@ export default class MoreDirectChannels extends React.Component {
}
return (
-
+
@@ -240,9 +239,8 @@ export default class NotificationsTab extends React.Component {
type='radio'
checked={notifyActive[1]}
onChange={this.handleNotifyRadio.bind(this, 'mention')}
- >
- Only for mentions and direct messages
-
+ />
+ {'Only for mentions and direct messages'}
|
+
-
+
-
{user.username}
-
- {details}
-
-
+ {details}
+
{joinButton}
-
-
+ |
+ {'No users found :('} |
-
- {count}
+
];
-
clockSection = (
+
+
+
+
+
+ {count}
+
+
+
-
+ > {'Display Settings'}diff --git a/web/react/components/user_settings/user_settings_notifications.jsx b/web/react/components/user_settings/user_settings_notifications.jsx index 62738efbd8..61d49acb2a 100644 --- a/web/react/components/user_settings/user_settings_notifications.jsx +++ b/web/react/components/user_settings/user_settings_notifications.jsx @@ -228,9 +228,8 @@ export default class NotificationsTab extends React.Component { - For all activity - + /> + {'For all activity'}@@ -252,9 +250,8 @@ export default class NotificationsTab extends React.Component { type='radio' checked={notifyActive[2]} onChange={this.handleNotifyRadio.bind(this, 'none')} - > - Never - + /> + {'Never'} @@ -320,9 +317,8 @@ export default class NotificationsTab extends React.Component { type='radio' checked={soundActive[0]} onChange={this.handleSoundRadio.bind(this, 'true')} - > - On - + /> + {'On'} @@ -332,9 +328,8 @@ export default class NotificationsTab extends React.Component { type='radio' checked={soundActive[1]} onChange={this.handleSoundRadio.bind(this, 'false')} - > - Off - + /> + {'Off'} @@ -402,9 +397,8 @@ export default class NotificationsTab extends React.Component { type='radio' checked={emailActive[0]} onChange={this.handleEmailRadio.bind(this, 'true')} - > - On - + /> + {'On'} @@ -414,9 +408,8 @@ export default class NotificationsTab extends React.Component { type='radio' checked={emailActive[1]} onChange={this.handleEmailRadio.bind(this, 'false')} - > - Off - + /> + {'Off'} @@ -482,9 +475,8 @@ export default class NotificationsTab extends React.Component { type='checkbox' checked={this.state.firstNameKey} onChange={handleUpdateFirstNameKey} - > - {'Your case sensitive first name "' + user.first_name + '"'} - + /> + {'Your case sensitive first name "' + user.first_name + '"'} @@ -502,9 +494,8 @@ export default class NotificationsTab extends React.Component { type='checkbox' checked={this.state.usernameKey} onChange={handleUpdateUsernameKey} - > - {'Your non-case sensitive username "' + user.username + '"'} - + /> + {'Your non-case sensitive username "' + user.username + '"'} @@ -521,9 +512,8 @@ export default class NotificationsTab extends React.Component { type='checkbox' checked={this.state.mentionKey} onChange={handleUpdateMentionKey} - > - {'Your username mentioned "@' + user.username + '"'} - + /> + {'Your username mentioned "@' + user.username + '"'} @@ -540,9 +530,8 @@ export default class NotificationsTab extends React.Component { type='checkbox' checked={this.state.allKey} onChange={handleUpdateAllKey} - > - {'Team-wide mentions "@all"'} - + /> + {'Team-wide mentions "@all"'} @@ -559,9 +548,8 @@ export default class NotificationsTab extends React.Component { type='checkbox' checked={this.state.channelKey} onChange={handleUpdateChannelKey} - > - {'Channel-wide mentions "@channel"'} - + /> + {'Channel-wide mentions "@channel"'} @@ -576,9 +564,8 @@ export default class NotificationsTab extends React.Component { type='checkbox' checked={this.state.customKeysChecked} onChange={this.updateCustomMentionKeys} - > - {'Other non-case sensitive words, separated by commas:'} - + /> + {'Other non-case sensitive words, separated by commas:'} , + |