Skip to content

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