chore (backend-rs): add comment

This commit is contained in:
naskya 2024-04-26 06:30:30 +09:00
parent 1cfe3bfb73
commit 8534154792
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -13,12 +13,15 @@ pub enum ChatEvent {
Typing,
}
// We want to merge `kind` and `object` into a single enum
// https://github.com/napi-rs/napi-rs/issues/2036
#[crate::export(js_name = "publishToChatStream")]
pub fn publish(
sender_user_id: String,
receiver_user_id: String,
kind: ChatEvent,
object: &serde_json::Value, // TODO?: change this to enum
object: &serde_json::Value,
) -> Result<(), Error> {
publish_to_stream(
&Stream::Chat {