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

RoomMessageEvent Edit Helpers #831

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

nvrWhere
Copy link
Collaborator

Add some helper functions to allow the editing of the message type and plain body. This is useful as for example in NeoChat we have slash commands where these are modified and I want to do it after event creation

…d plain body. This is useful as for example in NeoChat we have slash commands where these are modified and I want to do it after event creation
@KitsuneRal KitsuneRal added the enhancement A feature or change request for the library label Nov 17, 2024
Copy link
Member

@KitsuneRal KitsuneRal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setPlainBody() I can understand, but setMsgType() looks rather scary. If I replace the m.text message type with m.image, I would expect the whole event to be remade.

@nvrWhere
Copy link
Collaborator Author

You're not wrong thinking about it. The main one is changing a text to emote which would be legal. Let me have a think and I'll reign it in a bit or just remove and assume a new event is created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A feature or change request for the library
Projects
Status: 0.10(?) - To Do
Development

Successfully merging this pull request may close these issues.

2 participants