mattermost / mattermost

Mattermost is an open source platform for secure collaboration across the entire software development lifecycle..
https://mattermost.com
Other
30.15k stars 7.22k forks source link

Support relative URLs as icon_url in slash command response #13590

Closed mattermod closed 1 year ago

mattermod commented 4 years ago

Integrations using slash command can overwrite the icon of the created post. This is done by setting IconURL in the slash command response. This field should report a relative URL, e.g. /plugins/github/some/path to make plugin responses independent of the siteURL. For more information about slash commands see https://docs.mattermost.com/developer/slash-commands.html#custom-slash-command.

This needs to be changed on both the webapp and mobile app.


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

JIRA: https://mattermost.atlassian.net/browse/MM-21593

rdsedmundo commented 4 years ago

I tried to work on this, created a custom slash command and returned a response with a relative path and it worked perfectly on the webapp. I'm not sure if I understood what is the expectation here.

Screen Shot 2020-02-17 at 20 03 16
hanzei commented 4 years ago

Hi @rdsedmundo,

Thanks for you interest in this issue. :+1:

"Relative URLs" in this context refer to relativ URLs that point to a plugin like /plugins/github/some/path not generic relative URLs. Does this make it more clear?

rdsedmundo commented 4 years ago

I'm sorry, but no, this didn't help at all. From what I can tell I'm already able to set up a path in the format /plugins/github/some/path.

hanzei commented 4 years ago

Good catch, I didn't noticed this is already possible. A couple of edge cases that might not work yet are:

Would you be interested in checking if these cases are also already fixed?

larkox commented 1 year ago

This should be solved.