matrix-bot-sdk
matrix-bot-sdk copied to clipboard
Implemented & documented edit functions
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
- [x] Linter has been satisfied
- [x] Sign-off given on the changes (see CONTRIBUTING.md)