added a simple implementation of send_message method #20
No reviewers
Labels
No labels
bug
core
documentation
duplicate
enhancement
experiment
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Streigen/echelon!20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "send-message"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I have a nitpick with your comments, can you make them consistent with how me and @flaxeneel2 have done them in the latest comment. The way we did it is by following rustdoc function comments, the syntax is just md, so it should be fairly easy to implement.
The main thing is that you should probably request review again when you complete it rather than trying to PR incomplete code because it's not hooked up to the front-end either so we can't test your code either
Ideally, send message should not be going into the
client_events.rsfile, because, while its an event,client_events.rsis meant more for the events that the client will be listening to (e.g. listening for incoming messages and emitting them to the frontend). For direct client calls you can useuser.rs, it is a file we will soon be refactoring though, since its kind of a mess right now (splitting it into seperate files), but for now it would be preferred if you can put the send code there instead.I understand you have mentioned that this is a simple implementation of plaintext messages, but you might want to look into the
markdownfeature flag of the matrix rust sdk crate, to allow the user to send markdown formatted messages.It might also be worth looking into RoomMessageEventContent::text_html which lets you give both body and formatted body. We will be using this for custom emojis/sticker packs (from the limited research ive done in it).
This PR can be accepted once the feature is fully implemented, with functioning send message of markdown type at the very least.
This feature would also need testing. Were you able to test this code? If so, then what were your testing methods? you dont need to do some fancy test cases, since testing is another thing i need to set up for others to use, but, it would be preferred if you could go through and do a full test by sending a few different kind of messages manually. easiest way to do that would be turning it into a tauri command and calling it through the frontend, since that way you are testing what the frontend's experience would be like of using your code.
Pull request closed