mmctl icon indicating copy to clipboard operation
mmctl copied to clipboard

[ Feature Request ] `mmctl ping` to send a DM

Open icelander opened this issue 3 years ago • 3 comments

I have a bash script that I use to send me a Mattermost notification to let me know that long processes have completed. It would be great to have this in mmctl. Here's how I see it working:

make dist; mmctl ping "make dist complete"

It would also be nice to be able to append STDIN as a code block to the message that's sent, e.g.:

tail -n3 mattermost.log > mmctl ping "Here's the last three lines of the Mattermost log:"

Would produce a post like this:

Here's the last three lines of the Mattermost log:

```
2021-08-12T23:07:45.163Z	debug	wsapi/websocket_handler.go:25	Websocket request	{"action": "ping"}
2021-08-12T23:08:00.923Z	debug	web/handlers.go:107	Received HTTP request	{"method": "POST", "url": "/api/v4/users/status/ids", "request_id": "ggk78sfk6brp8rukihp4myt1cc", "host": "mattermost.example.com", "scheme": "https", "status_code": "200"}
2021-08-12T23:08:15.163Z	debug	wsapi/websocket_handler.go:25	Websocket request	{"action": "ping"}
```

Usage: mmctl ping [message] [flags]

Examples:

ping 'Time to make the donuts!'

ping 'Open the pod bay doors' -u hal

Flags: -u, --user The username or ID of the user to whom to send the direct message

icelander avatar Aug 12 '21 23:08 icelander

Added a ticket to send a DM with a much straightforward fashion. https://mattermost.atlassian.net/browse/MM-40525

isacikgoz avatar Dec 07 '21 12:12 isacikgoz

@icelander Please can you share the script

ChandanChainani avatar Oct 12 '22 18:10 ChandanChainani

@isacikgoz This seem related issue to https://github.com/mattermost/mattermost-server/issues/19914

ChandanChainani avatar Apr 04 '23 14:04 ChandanChainani

Tracking via https://github.com/mattermost/mattermost/issues/19914

hanzei avatar Apr 25 '24 09:04 hanzei