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

Not possible to remove emoji #100

Closed
knedlsepp opened this issue Feb 14, 2019 · 5 comments
Closed

Not possible to remove emoji #100

knedlsepp opened this issue Feb 14, 2019 · 5 comments
Labels
enhancement New feature or request

Comments

@knedlsepp
Copy link
Contributor

knedlsepp commented Feb 14, 2019

It is currently not possible (or documented) to remove emojis sent using e.g.: message.react("pizza")

@attzonko
Copy link
Owner

What do you mean by remove the emoji?

@knedlsepp
Copy link
Contributor Author

knedlsepp commented Feb 16, 2019

When reacting to somebody's message, it's possible to add an emoji (not as a text reply, but marking the message just as the above thumbs up). However I couldn't figure out a way to remove this again.

@attzonko attzonko added the enhancement New feature or request label Feb 23, 2019
@attzonko
Copy link
Owner

I think I better understand the request. As it stands today there is no way to remove a reaction emoji in mmpy_bot, but the Mattermost API supports removal of reactions. I am adding this as an enhancement request. Can you give me a better feel for the use case you have in mind? Are you wanting to remove reactions the bot added, or reactions that other users added?

attzonko added a commit that referenced this issue Feb 23, 2019
Per enhancment request #100 this adds a method to the Message class
called remove_reaction() which takes in the emoji_name to be removed as
a parameter.
@attzonko
Copy link
Owner

Please test pull request #101 and let me know if it works the way you think it should.

@knedlsepp
Copy link
Contributor Author

My use case is a poll system, where a bot reacts to "#poll: a,b,c" by creating a message that reads:

1. a
2. b
3. c

and additionally reacts to this message with the emojis 1️⃣2️⃣3️⃣.
People would then click on the emojis to add their votes. After a certain timeout, I would then like to remove the votes that were cast by the bot itself so the absolute numbers are correct and don't include the bot anymore.

Thanks for the PR, I'll take a look!

attzonko added a commit that referenced this issue Mar 5, 2019
* Adding feature to remove reactions

Per enhancment request #100 this adds a method to the Message class
called remove_reaction() which takes in the emoji_name to be removed as
a parameter.

* Adding '/users/' to reaction delete url
@attzonko attzonko closed this as completed Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants