Skip to content

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 nbsp and theomonnom 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.

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

@lukasIO lukasIO merged commit 7044ba5 into main Oct 10, 2024
@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.

4 participants