Mattermost-server: Webhook use real username for integration bot name

Created on 25 May 2018  ·  12Comments  ·  Source: mattermost/mattermost-server

Summary

Webhook creator username used instead of declared in payload.

Steps to reproduce

1) Create webhook
2) create integration on GitLab or Redmine
3) Yours username becomes in integration messages as a bot

Expected behavior

If somebody creates a webhook and use it, his user account displayed as bot name. For example, in GitLab or Redmine integration incoming Webhook message wrote under real username.

Observed behavior (that appears unintentional)

2018-05-25 22 54 09

Most helpful comment

Hi @awsom82! Thank you for reaching out.

This document might help: https://docs.mattermost.com/developer/webhooks-incoming.html.

Especially if you take a look at the third note in the middle of the page (if you scroll up right above the "Tips and best practices" section) which says: "Enable integrations to override usernames must be set to true in config.json to override usernames. Enable them from System Console > Integrations > Custom Integrations or ask your System Administrator to do so. If not enabled, the username is set to webhook."

Let me know if this helps or if you have further questions!

All 12 comments

Hi @awsom82! Thank you for reaching out.

This document might help: https://docs.mattermost.com/developer/webhooks-incoming.html.

Especially if you take a look at the third note in the middle of the page (if you scroll up right above the "Tips and best practices" section) which says: "Enable integrations to override usernames must be set to true in config.json to override usernames. Enable them from System Console > Integrations > Custom Integrations or ask your System Administrator to do so. If not enabled, the username is set to webhook."

Let me know if this helps or if you have further questions!

@amyblais Big thanks. I triple try to find some information, but fail with it. Sorry, for misreporting.
PS Maybe its better to enable this opts by default?

No worries at all, glad to hear the issue is resolved! Let us know if you encounter any other issues / bugs.

@amyblais I noticed if you enable the integrations for the username and the profile picture. There is still an issue that the account info attached to the webhook will pop up if you click on the image next to the webhook post. Is there an open issue for this or will a bug have to be posted?

It looks like the username override disables the popover info for the user but the image doesn't seem to disable the popover.

Hi @TSachs19,

I believe if you're an admin you'll see the account details, but non-admins don't. Also, I just tested and wasn't able to repro the issue where the image override doesn't seem to disable the popover contact info. What Mattermost version are you on?

@amyblais 5.5.0-rc1

Are you seeing this issue as an admin or non-admin (or both)?

I tested it out with admin and non-admin and the popover happens with both users.

Hi @TSachs19, I verified with our team and I created a bug ticket for this: https://mattermost.atlassian.net/browse/MM-13023. Thank you for reporting it!

Sorry to comment on an old issue but I am seeing the same thing with the OpsGenie setup. Webhook is setup and set to override username and image. When the message is posted the image is overridden as expected however the username is not. I have confirmed my config.json is set correctly?

Hi @mojowill, can you help with more details on your environment?

their is any webhook option with same features to github personal like github organisation. If possible give any solution to common webhook for entire personal account to auto trigger any pulls or pushs like...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alanmoo picture alanmoo  ·  30Comments

esethna picture esethna  ·  28Comments

shochdoerfer picture shochdoerfer  ·  31Comments

kkirsche picture kkirsche  ·  37Comments

hjek picture hjek  ·  31Comments