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

Matrix connector: redact (remove) messages or events #1899

Open
oleg-fiksel opened this issue Apr 12, 2022 · 2 comments
Open

Matrix connector: redact (remove) messages or events #1899

oleg-fiksel opened this issue Apr 12, 2022 · 2 comments

Comments

@oleg-fiksel
Copy link
Contributor

oleg-fiksel commented Apr 12, 2022

Description

Opsdroid (and Matrix connector) doesn't support redacting/removing/deleting events/messages.

Use case

One of the use cases would be a bot asking for a confirmation from the user using Matrix reactions.
It would make sense to limit the time for the reaction. So deleting the source message after this time would be logical action.

Here's the skill, which would benefit from this feature. Currently after expiration is implemented by tracking reactions to a certain message ids.

Steps to Reproduce

response = await matrix_connector.send(Message("Some message, which will wait for reaction from user"))
remove_result = await matrix_connector.remove(event_id=response.even_id, reason="Time for reaction to this event is expired")

Expected Functionality

  • Message deleted

Experienced Functionality

  • Error: Function not implemented on connector abstraction (and Matrix connection)

Versions

  • Opsdroid version: v0.25.0
lucastronova added a commit to lucastronova/opsdroid that referenced this issue May 23, 2023
Added remove method to the Message event class, and function in the Matrix connector.py using this method.

Addresses issue opsdroid#1899
@lucastronova
Copy link

I have a PR open addressing this (#1993)

@oleg-fiksel
Copy link
Contributor Author

Thanks @lucastronova !

Unfortunately I'm AFK for at least 3 weeks, so will not be able to review your PR soon.

Maybe someone from the maintainers will have time to take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants