-
Notifications
You must be signed in to change notification settings - Fork 2.7k
8272 added the username and icon url in the add and edit pages of outgoing webhook. #1470
Conversation
8fd86fd
to
4ccc8cd
Compare
|
Spinmint test server created at: http:https://i-0e566c7fd2bac4e6b.test.spinmint.com Test Admin Account: Username: Test User Account: Username: Instance ID: i-0e566c7fd2bac4e6b |
Thanks for your work on this @pradeepmurugesan! The UI looks great - Working on getting our test environment set up so I can verify it works as expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a quick look at the code as well -- also looks good! Just a note to revert unexpected package-lock.json
changes.
package-lock.json
Outdated
"lodash": "^4.2.0", | ||
"source-map": "^0.5.0", | ||
"trim-right": "^1.0.1" | ||
"jsesc": "2.5.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file appears to have changes unrelated to this PR -- we usually coordinate our dependency upgrades once per release. Can you revert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed the package-lock.json from the commit
4ccc8cd
to
df2fe48
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
@pradeepmurugesan I tried to setup an outgoing webhook from the test server above (http:https://i-0e566c7fd2bac4e6b.test.spinmint.com). Setting up is all good. However, after inspecting the payload being received by the external server, I'm not getting the overridden username and icon_url. The username I'm getting is the user_name who initiated the post (with trigger). No |
@saturninoabril, unless I'm misunderstanding the feature request here, the settings @pradeepmurugesan have configured are the defaults for when the outgoing webhook server responds back to Mattermost. The resulting post could always specify an overriding username and icon_url, but this allows there to be a default if the payload /returned/ from the outgoing webhook server doesn't specify one explicitly. |
@saturninoabril the response sent by the external server is not overridden. If that payload doesn't contain username or icon_url , then we will override it when creating the post*. *If you have configured the the username and icon_url while setting up and enabled the override option in system console. |
Thanks @lieut-data. |
Ah, yes, that title was a bit misleading. I suspect there's not a lot of use sending the default icon/username to the outgoing webhook as such -- and I don't think slash commands work that way -- so I suspect the ticket was just a bit ambiguous. @wiersgallak, can you confirm the intent? |
@pradeepmurugesan I'm a bit confused with the server code:
I guess even if |
From review of the Jira ticket:
|
Cool, looks good to me. @wiersgallak I tested this out using my simple server setup, and it works as expected. |
This is awesome, thanks @pradeepmurugesan! |
Great! As long as it works as expected it is good from my side as well. Thanks @pradeepmurugesan and team for reviewing! |
Spinmint test server destroyed |
df2fe48
to
532ad79
Compare
Oh sorry for not merging this as soon as possible. |
Summary
Adds the username and profile picture url options in the outgoing webhook.
Has some test's snapshots updated
Ticket Link
mattermost/mattermost#8272
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
make check-style
to check for style errors (required for all pull requests)make test
to ensure unit and component tests passed