Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement: Add type optional param for create_post(...) function #386

Open
datorr2 opened this issue Mar 29, 2023 · 7 comments
Open

Improvement: Add type optional param for create_post(...) function #386

datorr2 opened this issue Mar 29, 2023 · 7 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@datorr2
Copy link

datorr2 commented Mar 29, 2023

For example: to create an emote, you would create a post with a type of me.

image

@unode
Copy link
Collaborator

unode commented Mar 30, 2023

If you want to reply with a reaction you can use driver.react_to(message, "emoji-name").

@unode
Copy link
Collaborator

unode commented Mar 30, 2023

Additional mattermost driver actions can be found in mattermost-autodriver documentation.

@datorr2
Copy link
Author

datorr2 commented Mar 30, 2023

If you want to reply with a reaction you can use driver.react_to(message, "emoji-name").

The use case I was looking to do was not an emoji reaction, but a /me emote message.

Like, when the bot first starts up, it could do:

/me enters stage left.

And when it shuts down:

/me exits stage right.

@unode
Copy link
Collaborator

unode commented Mar 30, 2023

I can't find much about this type argument.
It seems poorly documented and a little obscure.

I think a pull request adding this feature would be acceptable but I would like to know if this is just for /me or other post types are possible?
And if so, can you provide a link to documentation that lists the post types?

@datorr2
Copy link
Author

datorr2 commented Mar 30, 2023

I can't find much about this type argument. It seems poorly documented and a little obscure.

That is correct. I haven't been able to find much on it. I found it when I was trying to figure out how to have the bot send /me messages.

I think a pull request adding this feature would be acceptable but I would like to know if this is just for /me or other post types are possible? And if so, can you provide a link to documentation that lists the post types?

No documentation found so far, but there's an entire list of types in the mattermost/mattermost-server project:

https://github.com/mattermost/mattermost-server/blob/c943ed6859b1be013e4da92b1952c607a35258bc/model/post.go

Lines 22 through 53.

@unode
Copy link
Collaborator

unode commented Mar 30, 2023

https://github.com/mattermost/mattermost-server/blob/c943ed6859b1be013e4da92b1952c607a35258bc/model/post.go

This is interesting. #377 might benefit from this as well (system_join_channel) even if on the listen side.

If you are able to propose a pull request, I'd happily review.

@unode
Copy link
Collaborator

unode commented Mar 30, 2023

I think this could also be a nice feature to showcase in the documentation. Some screenshots of how the different post types look like. It's surprising how many of them there are. I didn't expect the list to be so extensive.

@unode unode added enhancement New feature or request help wanted Extra attention is needed labels May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants