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

Add chat API #436

Merged
merged 17 commits into from
Oct 10, 2024
Merged

Add chat API #436

merged 17 commits into from
Oct 10, 2024

Conversation

lukasIO
Copy link
Contributor

@lukasIO lukasIO commented Sep 20, 2024

No description provided.

@lukasIO lukasIO marked this pull request as ready for review September 25, 2024 09:12
@lukasIO lukasIO changed the title Add chat APIs - wip Add chat API Sep 25, 2024
@lukasIO lukasIO requested review from theomonnom and nbsp September 25, 2024 13:41
include!("livekit.proto.rs");

impl From<ChatMessage> for RoomChatMessage {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently defining these conversions both in livekit-ffi and in livekit, which feels wrong, but couldn't make it work otherwise.

@@ -40,3 +40,4 @@ futures-util = { version = "0.3", default-features = false, features = ["sink"]
thiserror = "1.0"
lazy_static = "1.4"
log = "0.4"
chrono = "0.4.38"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed for timestamping chat messages

Copy link
Contributor

@bcherry bcherry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes sense to me

Copy link
Member

@theomonnom theomonnom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

message EditChatMessageRequest {
uint64 local_participant_handle = 1;
string edit_text = 2;
ChatMessage original_message = 3;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the whole ChatMessage? Is it possible to just use the message_id?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in an ideal world, yeah, the ID would be enough.
We don't have a central authority for chat messages though. So for an edited message we'd still want to keep the e.g. original timestamp of the message, so passing the whole message seemed like the best idea.
But would be happy about alternative suggestions

livekit-ffi/src/proto.rs Outdated Show resolved Hide resolved
@lukasIO lukasIO merged commit 7044ba5 into main Oct 10, 2024
11 of 17 checks passed
@lukasIO lukasIO deleted the lukas/chat-api branch October 10, 2024 10:58
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.

3 participants