From 33319a4f88a7cf56bbe4b0511765cae1679ff2dd Mon Sep 17 00:00:00 2001 From: it33 Date: Wed, 7 Oct 2015 23:26:20 -0700 Subject: [PATCH 01/14] Update and rename Incoming.md to Incoming-Webhooks.md --- .../webhooks/Incoming-Webhooks.md | 74 +++++++++++++++++++ doc/integrations/webhooks/Incoming.md | 62 ---------------- 2 files changed, 74 insertions(+), 62 deletions(-) create mode 100644 doc/integrations/webhooks/Incoming-Webhooks.md delete mode 100644 doc/integrations/webhooks/Incoming.md diff --git a/doc/integrations/webhooks/Incoming-Webhooks.md b/doc/integrations/webhooks/Incoming-Webhooks.md new file mode 100644 index 0000000000..60221bae9b --- /dev/null +++ b/doc/integrations/webhooks/Incoming-Webhooks.md @@ -0,0 +1,74 @@ +# Incoming Webhooks + +Incoming webhooks allow external applications to post messages into Mattermost channels and private groups by sending a specifically formatted JSON payload via HTTP POST request to a secret Mattermost URL generated specifically for each application. + +A couple key points: + +- **Mattermost incoming webhooks are Slack-compatible.** If you've used Slack's incoming webhooks to create integrations, you can copy and paste that code to create Mattermost integrations. Mattermost automatically translates Slack's propretiary JSON payload format into markdown to render in Mattermost messages. +- **Mattermost incoming webhooks support full markdown.** A rich range of formatting unavailable in Slack is made possible through [markdown support](../../usage/Markdown.md) in Mattermost, incuding headings, formatted fonts, tables, inline images and other options supported by [Mattermost Markdown]. + +_Example:_ + +Suppose you wanted to create a notification of the status of a daily build, with a table of total tests run and total tests failed by component category, with links to failed tests by category. You could create the following JSON payload to post to a Mattermost channel using webhooks: + +``` +payload={"text": " +*** +##### Build Break - Project X - December 12, 2015 - 15:32 GMT +0 +| Component | Tests Run | Tests Failed | +|:-----------|:------------|:-----------------------------------------------| +| Server | 948 | :white_check_mark: 0 | +| Web Client | 123 | :warning: [2 (see details)](http://linktologs) | +| iOS Client | 78 | :warning: [3 (see details)](http://linktologs) | +*** +"} +``` +Which would render in a Mattermost message as follows: + +*** +##### Build Break - Project X - December 12, 2015 - 15:32 GMT +0 +| Component | Tests Run | Tests Failed | +|:------------ |:---------------|:-----| +| Server | 948 | :white_check_mark: 0 | +| Web Client | 123 | :warning: [2 (see details)](http://linktologs) | +| iOS Client | 78 | :warning: [3 (see details)](http://linktologs) | +*** + +### Creating Integrations using Incoming Webhooks +You can create a webhook integration to post into Mattermost channels and private groups using these steps: + +1. Enable incoming webhooks from **System Console -> Service Settings** + + 1. Optionally configure the **Enable Overriding of Usernames from Webhooks** option to allow external applications to post messages under any name. If not enabled, the username of the creator of the webhook URL is used to post messages. + 2. Optionally configure the **Enable Overriding of Icon from Webhooks** option to allow external applciations to change the icon of the account posting messages. If not enabled, the icon of the creator of the webhook URL is used to post messages. +2. Create a Mattermost Incoming Webhook URL + 1. Login to your Mattermost team site and go to **Account Settings -> Integrations** + 2. Next to **Incoming Webhooks** click **Edit** + 3. Select the channel or private group to receive webhook payloads, then click **Add** to create the webhook + +3. Write a function to call the URL with a properly formatted JSON payload + 1. To make sure everything works, try a curl command to send a JSON string as the `payload` parameter in a HTTP POST request. + 1. Example: + ``` +curl -i -X POST -d 'payload={"text": "Hello, this is some text."}' http://yourmattermost.com/hooks/xxx-generatedkey-xxx +``` + 2. Incorporate the working webhook into your application to send real time updates to Mattermost channels and private groups. + +Additional Notes: + +1. For the JSON payload, if `Content-Type` is specified as `application/json` in the headers of the HTTP request then the body of the request can be direct JSON. ```{"text": "Hello, this is some text."}``` + +2. You can override the channel specified in the webhook definition by specifying a `channel` parameter in your payload. For example, you might have a single webhook created for _Town Square_, but you can use ```payload={"channel": "off-topic", "text": "Hello, this is some text."}``` to send a message to the _Off-Topic_ channel using the same webhook URL. + +3. Also, as mentioned previously, [markdown](../../usage/Markdown.md) can be used to create richly formatted payloads, for example: ```payload={"text": "# A Header\nThe _text_ below **the** header."}``` creates a messages with a header, a carriage return and bold text for "the". + +4. Just like regular posts, the text will be limited to 4000 characters at maximum. + +### Slack Compatibility + +As mentioned above, Mattermost makes it easy to take integrations written for Slack's propreitary JSON payload format and repurpose them to become Mattermost integrations. The following automatic translations are supported: + +1. Payloads designed for Slack using `<>` to note the need to hyperlink a URL, such as ```payload={"text": ""}```, are translated to the equivalent markdown in Mattermost and rendered the same as you would see in Slack. +2. Similiarly, payloads designed for Slack using `|` within a `<>` to define linked text, such as ```payload={"text": "Click for a link."}```, are also translated to the equivalent markdown in Mattermost and rendered the same as you would see in Slack. + +To learn more about Incoming Webhooks and to see samples and community contributions, please visit diff --git a/doc/integrations/webhooks/Incoming.md b/doc/integrations/webhooks/Incoming.md deleted file mode 100644 index 0814eb420e..0000000000 --- a/doc/integrations/webhooks/Incoming.md +++ /dev/null @@ -1,62 +0,0 @@ -# Incoming Webhooks - -With incoming webhooks practically any external source - once given a URL by you - can post a message to any channel you have access to. This is done through a HTTP POST request with a simple JSON payload. The payload can contain some text, and some simple options to allow the external source to customize the post. - -## Creating the Webhook URL - -To get the incoming webhook URL - where all the HTTP requests will be sent - follow these steps: - -1. Login to your Mattermost account. -2. Open the menu by clicking near your profile picture in the top-left and open Account Settings. -3. Go to the Integrations tab and click the 'Edit' button next to 'Incoming Webhooks'. -4. Use the selector to choose a channel and click the 'Add' button to create the webhook. -5. Your webhook URL will be displayed below in the 'Existing incoming webhooks' section. - - -## Posting a Message - -You can send the message by including a JSON string as the `payload` parameter in a HTTP POST request. -``` -payload={"text": "Hello, this is some text."} -``` - -In addition, if `Content-Type` is specified as `application/json` in the headers of the HTTP request then the body of the request can be direct JSON. -``` -{"text": "Hello, this is some text."} -``` - -It is also possible to post richly formatted messages using [Markdown](../../usage/Markdown.md). -``` -payload={"text": "# A Header\nThe _text_ below **the** header."} -``` - -Just like regular posts, the text will be limited to 4000 characters at maximum. - -## Adding Links - -In addition to including links in the standard Markdown format, links can also be specified by enclosing the URL in `<>` brackets -``` -payload={"text": ""} -``` - -They can also include a `|` character to specify some clickable text. -``` -payload={"text": "Click for a link."} -``` - -## Channel Override - -You can use a single webhook URL to post messages to different channels by overriding the channel. You can do this by adding the channel name - as it is seen in the channel URL - to the request payload. -``` -payload={"channel": "off-topic", "text": "Hello, this is some text."} -``` - -## Finishing up - -Combining everything above, here is an example message made using a curl command: - -``` -curl -i -X POST -d 'payload={"channel": "off-topic", "text": "Hello, this is some text."}' http://yourmattermost.com/hooks/xxxxxxxxxxxxxxxxxxxxxxxxxx -``` - -A post with that text will be made to the Off-Topic channel. From c0e4b1e79715a096dd9aa827e7eda06a7bcc9e52 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Thu, 8 Oct 2015 16:10:27 -0400 Subject: [PATCH 02/14] Creating dockerfiles for release 1.1.0 --- docker/0.7/Dockerrun.aws.zip | Bin 867 -> 0 bytes docker/0.7/config_docker.json | 103 ------------------ docker/{0.7 => 1.1}/Dockerfile | 2 +- docker/1.1/Dockerrun.aws.zip | Bin 0 -> 710 bytes .../.ebextensions/01_files.config | 0 .../Dockerrun.aws/Dockerrun.aws.json | 2 +- docker/1.1/config_docker.json | 92 ++++++++++++++++ docker/{0.7 => 1.1}/docker-entry.sh | 0 8 files changed, 94 insertions(+), 105 deletions(-) delete mode 100644 docker/0.7/Dockerrun.aws.zip delete mode 100644 docker/0.7/config_docker.json rename docker/{0.7 => 1.1}/Dockerfile (93%) create mode 100644 docker/1.1/Dockerrun.aws.zip rename docker/{0.7 => 1.1}/Dockerrun.aws/.ebextensions/01_files.config (100%) rename docker/{0.7 => 1.1}/Dockerrun.aws/Dockerrun.aws.json (75%) create mode 100644 docker/1.1/config_docker.json rename docker/{0.7 => 1.1}/docker-entry.sh (100%) diff --git a/docker/0.7/Dockerrun.aws.zip b/docker/0.7/Dockerrun.aws.zip deleted file mode 100644 index bba04cca523a4669c29c01edbc49d5a52d340238..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 867 zcmWIWW@h1H0D;dA^6p>;l;C5KVbDuWO06hK%`48#&nwms4dG;9?s9$-3c{ro+zgB? zFPIq^SW^iInskl1<60J3F-{PiIcPbolzx#0|_o`cCs( zew??PP{ytis+ihsQx$iSYkqdS;mKWB*DtKP&k%DYkUjLWNqlbfTMhGNR~&^-?(XrN z_QUkDGeklDty5_G!-s`LPId46CUVUEKP?>e{&D)JU*=C8yJX69<46V8x z&3YC|+WwAt{Y78X-oD^sOLMx)zC#HmzwY*4TyalEhIfLktoTwEzc(?r9&#c=&K1C zAExbGtKl&5AXD1nf)6ipbgFy}=U>QX=~tR&yESQ+)KZmiu6FUuLcgp#E1hc6YR!F% z@8#o}5w|$xPX4j)OYnBwz%}jag{NBWEbO-DP3$KXhZdYVD}M9J6Q3)KJ~0P)Gcw6B z<4QjgK)-^30K;2H5RIOiSRtti&94wMait}QnZRVlu%yug!%U2n1+)T`vhY}e894|m h-Zn-7ZNe5+Ky$G~Q-C)s8_1)~K*$f&X~zWO0RXI77p(vQ diff --git a/docker/0.7/config_docker.json b/docker/0.7/config_docker.json deleted file mode 100644 index cbac2ea69c..0000000000 --- a/docker/0.7/config_docker.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "LogSettings": { - "ConsoleEnable": true, - "ConsoleLevel": "INFO", - "FileEnable": true, - "FileLevel": "INFO", - "FileFormat": "", - "FileLocation": "" - }, - "ServiceSettings": { - "SiteName": "Mattermost", - "Mode" : "dev", - "AllowTesting" : true, - "UseSSL": false, - "Port": "80", - "Version": "developer", - "Shards": { - }, - "InviteSalt": "gxHVDcKUyP2y1eiyW8S8na1UYQAfq6J6", - "PublicLinkSalt": "TO3pTyXIZzwHiwyZgGql7lM7DG3zeId4", - "ResetSalt": "IPxFzSfnDFsNsRafZxz8NaYqFKhf9y2t", - "AnalyticsUrl": "", - "UseLocalStorage": true, - "StorageDirectory": "/mattermost/data/", - "AllowedLoginAttempts": 10, - "DisableEmailSignUp": false - }, - "SSOSettings": { - "gitlab": { - "Allow": false, - "Secret" : "", - "Id": "", - "Scope": "", - "AuthEndpoint": "", - "TokenEndpoint": "", - "UserApiEndpoint": "" - } - }, - "SqlSettings": { - "DriverName": "mysql", - "DataSource": "mmuser:mostest@tcp(localhost:3306)/mattermost_test?charset=utf8mb4,utf8", - "DataSourceReplicas": ["mmuser:mostest@tcp(localhost:3306)/mattermost_test?charset=utf8mb4,utf8"], - "MaxIdleConns": 10, - "MaxOpenConns": 10, - "Trace": false, - "AtRestEncryptKey": "Ya0xMrybACJ3sZZVWQC7e31h5nSDWZFS" - }, - "AWSSettings": { - "S3AccessKeyId": "", - "S3SecretAccessKey": "", - "S3Bucket": "", - "S3Region": "" - }, - "ImageSettings": { - "ThumbnailWidth": 120, - "ThumbnailHeight": 100, - "PreviewWidth": 1024, - "PreviewHeight": 0, - "ProfileWidth": 128, - "ProfileHeight": 128, - "InitialFont": "luximbi.ttf" - }, - "EmailSettings": { - "ByPassEmail" : true, - "SMTPUsername": "", - "SMTPPassword": "", - "SMTPServer": "", - "UseTLS": false, - "UseStartTLS": false, - "FeedbackEmail": "", - "FeedbackName": "", - "ApplePushServer": "", - "ApplePushCertPublic": "", - "ApplePushCertPrivate": "" - }, - "RateLimitSettings": { - "UseRateLimiter": true, - "PerSec": 10, - "MemoryStoreSize": 10000, - "VaryByRemoteAddr": true, - "VaryByHeader": "" - }, - "PrivacySettings": { - "ShowEmailAddress": true, - "ShowPhoneNumber": true, - "ShowSkypeId": true, - "ShowFullName": true - }, - "TeamSettings": { - "MaxUsersPerTeam": 150, - "AllowPublicLink": true, - "AllowValetDefault": false, - "TermsLink": "/static/help/configure_links.html", - "PrivacyLink": "/static/help/configure_links.html", - "AboutLink": "/static/help/configure_links.html", - "HelpLink": "/static/help/configure_links.html", - "ReportProblemLink": "/static/help/configure_links.html", - "TourLink": "/static/help/configure_links.html", - "DefaultThemeColor": "#2389D7", - "DisableTeamCreation": false, - "RestrictCreationToDomains": "" - } -} diff --git a/docker/0.7/Dockerfile b/docker/1.1/Dockerfile similarity index 93% rename from docker/0.7/Dockerfile rename to docker/1.1/Dockerfile index 202d42dbc4..600d33308e 100644 --- a/docker/0.7/Dockerfile +++ b/docker/1.1/Dockerfile @@ -34,7 +34,7 @@ VOLUME /var/lib/mysql WORKDIR /mattermost # Copy over files -ADD https://github.com/mattermost/platform/releases/download/v0.7.1/mattermost.tar.gz / +ADD https://github.com/mattermost/platform/releases/download/v1.1.0-rc1/mattermost.tar.gz / RUN tar -zxvf /mattermost.tar.gz --strip-components=1 && rm /mattermost.tar.gz ADD config_docker.json / ADD docker-entry.sh / diff --git a/docker/1.1/Dockerrun.aws.zip b/docker/1.1/Dockerrun.aws.zip new file mode 100644 index 0000000000000000000000000000000000000000..945168a714b636ba64e27d5b5ca47a0bedd2ed00 GIT binary patch literal 710 zcmWIWW@Zs#U|`^2IN0Ffe*E&Wzte%dOF%5dAj9C2pPZdqR8*R$msnn`msOmf7aGFJ zz`W{=SlBKgF0J5ZU}Sm0%)r2s0@R_~vzzOXgMe%G!FrD9?rba1=gO@LN*z%hM;E*n zI`gjO&B+stOxu-8lRqS5qf`XPow+fmBnti6>Dvj3$-6iJo9p6gREPdmQ|4R z^w(283od;2`K(+O@4EiZzlNONdtGX$OSR6-S|yyL&vR{ct}u-Di$<#hU<)A4-3ZuKBBw_xkF6 z&Rfr(SD#llRAya#^L8Uowprpa&y+9|L#r-Fvz|qgw!dRuf6>>pw=cNZ(wwfc?@&U? zue-e$SKO14;hkVBE54M)?@i3DhnxZ4j7)OOxT0MG7&;6Lz~Etc+X!M|O9ZTtM1U3~ n$mU{(HNxB_jgNum5(s&q6<9(&z?+o~ Date: Thu, 8 Oct 2015 16:14:19 -0400 Subject: [PATCH 03/14] Adding release 1.1.0 version --- model/version.go | 1 + 1 file changed, 1 insertion(+) diff --git a/model/version.go b/model/version.go index d03f64ba2f..a61004fdee 100644 --- a/model/version.go +++ b/model/version.go @@ -12,6 +12,7 @@ import ( // It should be maitained in chronological order with most current // release at the front of the list. var versions = []string{ + "1.1.0", "1.0.0", "0.7.1", "0.7.0", From 12cd7c03d6676466f7b10b8e80b4e05edab0cf2a Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Thu, 8 Oct 2015 16:46:45 -0400 Subject: [PATCH 04/14] Fixing broken travis release build --- Makefile | 15 +++++++++++++-- web/templates/head.html | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b03ed5cbae..12b209c847 100644 --- a/Makefile +++ b/Makefile @@ -88,6 +88,11 @@ travis: mkdir -p $(DIST_PATH)/web/static/js cp -L web/static/js/*.min.js $(DIST_PATH)/web/static/js/ + cp -RL web/static/config $(DIST_PATH)/web/static + cp -RL web/static/css $(DIST_PATH)/web/static + cp -RL web/static/fonts $(DIST_PATH)/web/static + cp -RL web/static/help $(DIST_PATH)/web/static + cp -RL web/static/images $(DIST_PATH)/web/static cp -RL web/static/js/jquery-dragster $(DIST_PATH)/web/static/js/ cp -RL web/templates $(DIST_PATH)/web @@ -265,8 +270,14 @@ dist: install cd web/sass-files && compass compile -e production --force - mkdir -p $(DIST_PATH)/web - cp -RL web/static $(DIST_PATH)/web + mkdir -p $(DIST_PATH)/web/static/js + cp -L web/static/js/*.min.js $(DIST_PATH)/web/static/js/ + cp -RL web/static/config $(DIST_PATH)/web/static + cp -RL web/static/css $(DIST_PATH)/web/static + cp -RL web/static/fonts $(DIST_PATH)/web/static + cp -RL web/static/help $(DIST_PATH)/web/static + cp -RL web/static/images $(DIST_PATH)/web/static + cp -RL web/static/js/jquery-dragster $(DIST_PATH)/web/static/js/ cp -RL web/templates $(DIST_PATH)/web mkdir -p $(DIST_PATH)/api diff --git a/web/templates/head.html b/web/templates/head.html index 8039f48a19..e4f1b56b37 100644 --- a/web/templates/head.html +++ b/web/templates/head.html @@ -37,7 +37,7 @@ - + From c11c43170bb9e3c5f4f21d8dcaf6cb09cda4f792 Mon Sep 17 00:00:00 2001 From: it33 Date: Thu, 8 Oct 2015 21:27:41 -0700 Subject: [PATCH 05/14] Create Manage-Team.md --- doc/help/Manage-Team.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 doc/help/Manage-Team.md diff --git a/doc/help/Manage-Team.md b/doc/help/Manage-Team.md new file mode 100644 index 0000000000..b45ea42836 --- /dev/null +++ b/doc/help/Manage-Team.md @@ -0,0 +1,37 @@ +# Manage Team + +The Manage Team menu is used to change the user roles assigned to members belonging to a team. + +## User Roles + +The following user roles are assigned from the **Manage Team** menu option in the team site main menu. + +### System Admin + +The System Administrator is typically a member of the IT staff and has the follow privileges: + +- Access to the System Console from the main menu in any team site. +- Change any setting on the Mattermost server available in the System Console. +- Promote and demote other users to and from the System Admin role. +- This role also has all the privileges of the Team Administrator as described below + +The first user added to a newly installed Mattermost system is assigned the System Admin role. + +### Team Admin + +The Team Administrator is typically a non-technical end user and has the following privileges: + +- Access to the "Team Settings" menu from the team site main menu +- Ability to change the team name and import data from Slack export files +- Access to the "Manage Team" menu and change user roles to the levels of Team Administrator, Member and Inactive + +### Member + +This is the default role given to end users who join the system. Members have basic permissions to use the Mattermost team site. + +### Inactive + +This status is given to users whose accounts are marked inactive. These users can no longer log into the system. + +Because Mattermost is designed as a system-of-record, there is not an option to delete users from the Mattermost system, as such an operation could compromise the integrity of message archives. + From d706f3f686b5a925add7809af56587f02384e463 Mon Sep 17 00:00:00 2001 From: it33 Date: Thu, 8 Oct 2015 21:39:15 -0700 Subject: [PATCH 06/14] Create README.md --- doc/help/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/help/README.md diff --git a/doc/help/README.md b/doc/help/README.md new file mode 100644 index 0000000000..7bc645529d --- /dev/null +++ b/doc/help/README.md @@ -0,0 +1,12 @@ +# Help + +The help section of the Mattermost documentation is intended for use by end users learning about the Mattermost concepts, usage, terminology and user interface. + +_Note: Help documentation is a work-in-progress. Community contributions highly welcome. Please see [guidelines for contributing](https://forum.mattermost.org/t/help-improve-mattermost-documentation/194)._ + +## Team Site Main Menu + +You can access the **Team Site Main Menu** by clicking on the three vertical dots at the top of the left sidebar in a team site. Here we describe the various options available from the menu: + +- [Manage Teams](help/Manage-Team.md) + From d091839f9aaf090f040ae2f10e8a5392b93d7572 Mon Sep 17 00:00:00 2001 From: it33 Date: Thu, 8 Oct 2015 21:41:02 -0700 Subject: [PATCH 07/14] Update README.md --- doc/help/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/help/README.md b/doc/help/README.md index 7bc645529d..d07424c70b 100644 --- a/doc/help/README.md +++ b/doc/help/README.md @@ -8,5 +8,5 @@ _Note: Help documentation is a work-in-progress. Community contributions highly You can access the **Team Site Main Menu** by clicking on the three vertical dots at the top of the left sidebar in a team site. Here we describe the various options available from the menu: -- [Manage Teams](help/Manage-Team.md) +- [Manage Teams](Manage-Team.md) From ae23c201134a0e9a292738aa7f7f06f1b41f1e7e Mon Sep 17 00:00:00 2001 From: it33 Date: Thu, 8 Oct 2015 22:13:27 -0700 Subject: [PATCH 08/14] Update Incoming-Webhooks.md --- doc/integrations/webhooks/Incoming-Webhooks.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/doc/integrations/webhooks/Incoming-Webhooks.md b/doc/integrations/webhooks/Incoming-Webhooks.md index 60221bae9b..645d4861e1 100644 --- a/doc/integrations/webhooks/Incoming-Webhooks.md +++ b/doc/integrations/webhooks/Incoming-Webhooks.md @@ -1,6 +1,6 @@ # Incoming Webhooks -Incoming webhooks allow external applications to post messages into Mattermost channels and private groups by sending a specifically formatted JSON payload via HTTP POST request to a secret Mattermost URL generated specifically for each application. +Incoming webhooks allow external applications, written in the programming language of your choice--to post messages into Mattermost channels and private groups by sending a specifically formatted JSON payload via HTTP POST request to a secret Mattermost URL generated specifically for each application. A couple key points: @@ -41,18 +41,22 @@ You can create a webhook integration to post into Mattermost channels and privat 1. Optionally configure the **Enable Overriding of Usernames from Webhooks** option to allow external applications to post messages under any name. If not enabled, the username of the creator of the webhook URL is used to post messages. 2. Optionally configure the **Enable Overriding of Icon from Webhooks** option to allow external applciations to change the icon of the account posting messages. If not enabled, the icon of the creator of the webhook URL is used to post messages. + 2. Create a Mattermost Incoming Webhook URL 1. Login to your Mattermost team site and go to **Account Settings -> Integrations** 2. Next to **Incoming Webhooks** click **Edit** 3. Select the channel or private group to receive webhook payloads, then click **Add** to create the webhook 3. Write a function to call the URL with a properly formatted JSON payload - 1. To make sure everything works, try a curl command to send a JSON string as the `payload` parameter in a HTTP POST request. - 1. Example: + 1. To make sure everything works, try a curl command from your terminal or command line to send a JSON string as the `payload` parameter in a HTTP POST request. + - _Example:_ ``` curl -i -X POST -d 'payload={"text": "Hello, this is some text."}' http://yourmattermost.com/hooks/xxx-generatedkey-xxx -``` - 2. Incorporate the working webhook into your application to send real time updates to Mattermost channels and private groups. +``` + 2. In addition, with **Enable Overriding of Usernames from Webhooks** turned on, you can also override the username the message posts as by providing a `username` parameter in your JSON payload. For example, you might want your message looking like it came from a robot so you can use ```payload={"username": "robot", "text": "Hello, this is some text."}``` to change the username of the post to robot. Note, to combat any malicious users from trying to use this to perform [phishing attacks](https://en.wikipedia.org/wiki/Phishing) a `BOT` indicator appears next to posts coming from incoming webhooks. + 3. With **Enable Overriding of Icon from Webhooks** turned on, you can similarly change the icon the message posts with by providing a link to an image in the `icon_url` parameter of your payload. For example, ```payload={"icon_url": "http://somewebsite.com/somecoolimage.jpg", "text": "Hello, this is some text."}``` will post using whatever image is located at `http://somewebsite.com/somecoolimage.jpg` as the icon for the post. + + 2. Set up your integration running on your own machine or a hosting service like AWS or Heroku, to start sending real time updates to Mattermost channels and private groups. Additional Notes: @@ -66,9 +70,11 @@ Additional Notes: ### Slack Compatibility -As mentioned above, Mattermost makes it easy to take integrations written for Slack's propreitary JSON payload format and repurpose them to become Mattermost integrations. The following automatic translations are supported: +As mentioned above, Mattermost makes it easy to take integrations written for Slack's proprietary JSON payload format and repurpose them to become Mattermost integrations. The following automatic translations are supported: 1. Payloads designed for Slack using `<>` to note the need to hyperlink a URL, such as ```payload={"text": ""}```, are translated to the equivalent markdown in Mattermost and rendered the same as you would see in Slack. 2. Similiarly, payloads designed for Slack using `|` within a `<>` to define linked text, such as ```payload={"text": "Click for a link."}```, are also translated to the equivalent markdown in Mattermost and rendered the same as you would see in Slack. +3. Like Slack, by overriding the channel name with an @username, such as payload={"text": "Hi", channel: "@jim"}, you can send the message to a user through your direct message chat. +4. Channel names can be prepended with a #, like they are in Slack incoming webhooks, and the message will still be sent to the correct channel. To learn more about Incoming Webhooks and to see samples and community contributions, please visit From 9c5ce4620ec43e86e2b0eecd10e11301978ed3c3 Mon Sep 17 00:00:00 2001 From: it33 Date: Thu, 8 Oct 2015 22:31:45 -0700 Subject: [PATCH 09/14] Update README.md --- doc/README.md | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/doc/README.md b/doc/README.md index 4c7c4cc0e9..a45b670c04 100644 --- a/doc/README.md +++ b/doc/README.md @@ -2,17 +2,23 @@ ## Installation +#### Preview Installation +Get up and running quickly with Docker-based install + - [AWS Elastic Beanstalk Setup](install/Amazon-Elastic-Beanstalk.md) - [Docker Single Container Preview Setup](install/Docker-Single-Container.md) -- [Production Ubuntu Setup](install/Production-Ubuntu.md) -- [Mattermost Release Numbering Scheme](install/Release-Numbering.md) -- [Software and Hardware Requirements](install/Requirements.md) - [SMTP Email Setup](install/SMTP-Email-Setup.md) -## Integrations +#### Production Installation +Set up Mattermost in your data center +- [Software and Hardware Requirements](install/Requirements.md) +- [Production Ubuntu Setup](install/Production-Ubuntu.md) +- [SMTP Email Setup](install/SMTP-Email-Setup.md) -- [GitLab SSO Configuration](integrations/Single-Sign-On/Gitlab.md) -- [Incoming Webhooks](integrations/webhooks/Incoming.md) +#### Configuration and Management +- Configuration Settings Overview + - [GitLab SSO Configuration](integrations/Single-Sign-On/Gitlab.md) +- [Mattermost Release Numbering Scheme](install/Release-Numbering.md) ## Developer Documentation @@ -20,8 +26,15 @@ - [Developer Machine Setup](developer/Setup.md) - [Mattermost Style Guide](developer/Style-Guide.md) - [API Overview](api/Overview.md) + - [Incoming Webhooks](integrations/webhooks/Incoming.md) -## Usage Help +## Help + +- User Interface + - [Manage Team](help/Manage-Team.md) + - Team Settings + - [Slack Import](usage/Slack-Import.md) + +- Messaging + - [Mattermost Markdown Formatting](usage/Markdown.md) -- [Slack Import](usage/Slack-Import.md) -- [Mattermost Markdown Formatting](usage/Markdown.md) From 7906a9067faa87e4c1c96a4ca256aede1ba48721 Mon Sep 17 00:00:00 2001 From: it33 Date: Thu, 8 Oct 2015 23:05:05 -0700 Subject: [PATCH 10/14] Rename doc/usage/Slack-Import.md to doc/help/Slack-Import.md --- doc/{usage => help}/Slack-Import.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/{usage => help}/Slack-Import.md (100%) diff --git a/doc/usage/Slack-Import.md b/doc/help/Slack-Import.md similarity index 100% rename from doc/usage/Slack-Import.md rename to doc/help/Slack-Import.md From db1724fa9f7a4174e5d91f6704f9ba3834159131 Mon Sep 17 00:00:00 2001 From: it33 Date: Thu, 8 Oct 2015 23:05:22 -0700 Subject: [PATCH 11/14] Update README.md --- doc/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/README.md b/doc/README.md index a45b670c04..0505877a73 100644 --- a/doc/README.md +++ b/doc/README.md @@ -33,7 +33,7 @@ Set up Mattermost in your data center - User Interface - [Manage Team](help/Manage-Team.md) - Team Settings - - [Slack Import](usage/Slack-Import.md) + - [Slack Import](help/Slack-Import.md) - Messaging - [Mattermost Markdown Formatting](usage/Markdown.md) From fd375a8ee737b873f3b8de3f695024031b417d3c Mon Sep 17 00:00:00 2001 From: it33 Date: Thu, 8 Oct 2015 23:05:48 -0700 Subject: [PATCH 12/14] Update Slack-Import.md --- doc/help/Slack-Import.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/help/Slack-Import.md b/doc/help/Slack-Import.md index c30de05670..d8d6170c4c 100644 --- a/doc/help/Slack-Import.md +++ b/doc/help/Slack-Import.md @@ -1,4 +1,4 @@ -#### Slack Import (Preview) +#### Slack Import (Alpha) *Note: As a SaaS service, Slack is able to change its export format quickly. If you encounter issues not mentioned in the documentation below, please let us know by [filing an issue](https://github.com/mattermost/platform/issues).* From 05ed5b08999c4d32f200c785b60b931d43b2b628 Mon Sep 17 00:00:00 2001 From: it33 Date: Thu, 8 Oct 2015 23:07:20 -0700 Subject: [PATCH 13/14] Update README.md --- doc/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/README.md b/doc/README.md index 0505877a73..f106cdfc86 100644 --- a/doc/README.md +++ b/doc/README.md @@ -30,6 +30,8 @@ Set up Mattermost in your data center ## Help +_Note: End user help documentation is a new feature being completed for the v1.2 release. The materials below are work in progress._ + - User Interface - [Manage Team](help/Manage-Team.md) - Team Settings From b67bb7e6fe29aa39f5b2976b1ca1f119f459d4c1 Mon Sep 17 00:00:00 2001 From: it33 Date: Fri, 9 Oct 2015 08:53:06 -0700 Subject: [PATCH 14/14] Update README.md --- doc/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/README.md b/doc/README.md index f106cdfc86..fcda4fd089 100644 --- a/doc/README.md +++ b/doc/README.md @@ -26,7 +26,7 @@ Set up Mattermost in your data center - [Developer Machine Setup](developer/Setup.md) - [Mattermost Style Guide](developer/Style-Guide.md) - [API Overview](api/Overview.md) - - [Incoming Webhooks](integrations/webhooks/Incoming.md) + - [Incoming Webhooks](integrations/webhooks/Incoming-Webhooks.md) ## Help