Slash output "Only visible to you"

Hey there,

I wrote couple of simple slash commands, which trigger a web request to cloud, and return either a JSON object or plain text, which gets posted to a channel. Everything worked fine as expected, until something changed and now all of my slash commands display a message “(Only visible to you)”, which is not what I want.

So the commands used to generate output which would to be visible to everyone.

I been using this guide to create my slash commands.

https://docs.mattermost.com/developer/slash-commands.html#custom-slash-command

Anyone else experiencing this behavior ?

1 Like

Hi, @bobby789

Since you mentioned that it was working fine earlier and something changed, may I know if you made any recent changes to the slash command configuration / external application you wrote based on the Custom Slash Command steps? How about Mattermost server upgrade?

Can you share some examples here so I can get an overview of slash commands you have created?

@bobby789 Were you able to resolve that

Hi @etlweather and welcome to the Mattermost forums!

I think this might be related to the fact that your external services’s response does not specify the response_type as explained by the documentation:

It defaults to ephemeral which means that the message will only be visible to the one who issued the slash command, but you can change it to in_channel in order for the message to appear for everyone in the channel.

Ah, thanks. I went through the documentation but somehow missed that. In this case, it’s integration with GitLab (on-premise). I don’t see a way to change that unfortunately. Maybe if I upgrade GitLab (I am a few version behind still).

What’s the target of your slash command? What script from Gitlab is being called?

/api/v4/projects/___/services/mattermost_slash_commands/trigger

I don’t know what script in GitLab is being called. It’s the GitLab Mattermost integration service thing.

OK, I can see it. Not sure if it’s possible to modify them, I think you would have to ask in a GitLab forum if it’s possible to modify the response of this command.
I cannot see if the default behaviour has changed in Mattermost or in Gitlab, not sure if it’s easy to find out.

OK. Well thanks for your help, at least I understand what is happening. I’ll check the GitLab forum / issue tracker.

Alright, good luck with that and let us know if you found out if that’s configurable on GitLab’s end.