diff --git a/README.md b/README.md
index 80f0f4c38c..c4276ed78a 100644
--- a/README.md
+++ b/README.md
@@ -79,18 +79,26 @@ Local Machine Setup (Docker)
3. When docker is done fetching the image, open http://localhost:8065/ in your browser.
### Additional Notes ###
-- If you want to work with the latest bits in the repository (i.e. not a stable release) you can run the cmd:
-`docker run --name mattermost-dev -d --publish 8065:80 mattermost/platform:dev`
+- If you want to work with the latest master from the repository (i.e. not a stable release) you can run the cmd:
-- You can update to the latest bits by running:
-`docker pull mattermost/platform:dev`
+ ``` bash
+ docker run --name mattermost-dev -d --publish 8065:80 mattermost/platform:dev
+ ```
+
+- Instructions on how to update your docker image are found below.
- If you wish to remove mattermost-dev use:
- `docker stop mattermost-dev`
- `docker rm -v mattermost-dev`
+
+ ``` bash
+ docker stop mattermost-dev
+ docker rm -v mattermost-dev
+ ```
- If you wish to gain access to a shell on the container use:
- `docker exec -ti mattermost-dev /bin/bash`
+
+ ``` bash
+ docker exec -ti mattermost-dev /bin/bash
+ ```
AWS Elastic Beanstalk Setup (Docker)
------------------------------------
@@ -163,6 +171,35 @@ Email Setup (Optional)
3. The service should restart automatically. Verify the Mattermost service is running with `ps -A`
4. Current logged in users will not be affected, but upon logging out or session expiration users will be required to verify their email address.
+Upgrading Mattermost
+---------------------
+
+### Docker ###
+To upgrade your docker image to the latest release (NOTE: this will destroy all data in the docker container):
+
+1. Stop your docker container by running:
+
+ ``` bash
+ docker stop mattermost-dev
+ ```
+2. Delete your docker container by running:
+
+ ``` bash
+ docker rm mattermost-dev
+ ```
+3. Update your docker image by running:
+
+ ``` bash
+ docker pull mattermost/platform
+ ```
+4. Start your docker container by running:
+
+ ``` bash
+ docker run --name mattermost-dev -d --publish 8065:80 mattermost/platform
+ ```
+
+To upgrade to the latest master from the repository replace `mattermost/platform` with `mattermost/platform:dev` in the above instructions.
+
Contributing
------------
diff --git a/store/sql_user_store.go b/store/sql_user_store.go
index cd25b488b0..4b1189c2ee 100644
--- a/store/sql_user_store.go
+++ b/store/sql_user_store.go
@@ -5,6 +5,7 @@ package store
import (
"fmt"
+ "strings"
"github.com/mattermost/platform/model"
"github.com/mattermost/platform/utils"
)
@@ -163,6 +164,17 @@ func (us SqlUserStore) Update(user *model.User, allowActiveUpdate bool) StoreCha
user.EmailVerified = false
}
+ if user.Username != oldUser.Username {
+ nonUsernameKeys := []string{}
+ splitKeys := strings.Split(user.NotifyProps["mention_keys"], ",")
+ for _, key := range splitKeys {
+ if key != oldUser.Username && key != "@" + oldUser.Username {
+ nonUsernameKeys = append(nonUsernameKeys, key)
+ }
+ }
+ user.NotifyProps["mention_keys"] = strings.Join(nonUsernameKeys, ",") + user.Username + ",@" + user.Username
+ }
+
if count, err := us.GetMaster().Update(user); err != nil {
if IsUniqueConstraintError(err.Error(), "Email", "users_email_teamid_key") {
result.Err = model.NewAppError("SqlUserStore.Update", "This email is already taken. Please choose another", "user_id="+user.Id+", "+err.Error())
diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx
index 90a7767917..0254d0e82e 100644
--- a/web/react/components/channel_header.jsx
+++ b/web/react/components/channel_header.jsx
@@ -105,7 +105,7 @@ module.exports = React.createClass({
if (!utils.areStatesEqual(newState, this.state)) {
this.setState(newState);
}
- $('.channel-header__info .description').popover({placement: 'bottom', trigger: 'hover', html: true, delay: {show: 500, hide: 500}});
+ $('.channel-header__info .description').popover({placement: 'bottom', trigger: 'hover click', html: true, delay: {show: 500, hide: 500}});
},
onSocketChange: function(msg) {
if (msg.action === 'new_user') {
diff --git a/web/react/components/channel_info_modal.jsx b/web/react/components/channel_info_modal.jsx
index 18addb52fe..6d999870aa 100644
--- a/web/react/components/channel_info_modal.jsx
+++ b/web/react/components/channel_info_modal.jsx
@@ -32,7 +32,7 @@ module.exports = React.createClass({