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

Implemented & documented edit functions #294

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

Conversation

Denperidge
Copy link

@Denperidge Denperidge commented Jan 13, 2023

My apologies, I haven't been able to write the tests as of yet (due to inexperience with direct matrix API calls & jest, so any help with the tests would be appreciated). But I thought that either way I'd already send the edit functions themselves!

This would fix #198 !

Example usage

let eventId; 
eventId = await client.sendText(roomId, 'teext')
await client.editText(roomId, eventId, 'text');
        
eventId = await client.sendNotice(roomId, 'nootice')
await client.editNotice(roomId, eventId, 'notice');
        
eventId = await client.sendHtmlNotice(roomId, '<h2>htmlnootice</h2>')
await client.editHtmlNotice(roomId, eventId, '<h2>htmlnotice</h2>');

eventId = await client.sendHtmlText(roomId, '<h2>htmlteext</h2>')
await client.editHtmlText(roomId, eventId, '<h2>htmltext</h2>')

Checklist

  • Tests written for all new code
  • Linter has been satisfied
  • Sign-off given on the changes (see CONTRIBUTING.md)

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

Successfully merging this pull request may close these issues.

Add APIs to edit previously sent messages
1 participant