mirror of
https://github.com/logos-messaging/libchat.git
synced 2026-06-30 21:20:09 +00:00
A PrivateV1 conversation is an out-of-band X3DH intro that binds no sender credential, so its messages carry an empty credential. The client's `decode_sender` returns `Missing` for an empty credential, and the event emitters dropped any message whose sender could not be decoded. A PrivateV1 conversation therefore surfaced `ConversationStarted` but never the message content, for both the initial message and every reply. Deliver these messages with no sender instead of dropping them: - `Event::MessageReceived.sender` becomes `Option<MessageSender>`; `None` marks an anonymous PrivateV1 message. - `ConvoOutcome` carries the conversation `class` (mirroring `InboxOutcome`), so the client can tell a legitimately credential-less PrivateV1 message from a group message that is missing one. - A new `message_sender` helper gates the anonymous case on `class == Private`; a missing credential on any group class is still dropped, preserving the invariant that group messages must be attributable. Covered by a new `private_v1_integration` test exercising both the inbox (initial message) and convo (reply) receive paths.
libchat
Supporting library for Logos-chat
Example app
bin/chat-cli is an end-to-end encrypted CLI chat app
built on this library. By default it uses logos-delivery
(Waku-based) as the transport so two users anywhere in the world can chat by
sharing an intro bundle. A local file transport is also bundled in; pick at
runtime with --transport <logos-delivery|file>.
# Build logos-delivery with Nix
nix build .#logos-delivery
# Build chat-cli with Cargo
LOGOS_DELIVERY_LIB_DIR=./result/lib cargo build --release -p chat-cli
# Run binary (defaults to --transport logos-delivery)
./target/release/chat-cli --name alice
See bin/chat-cli/README.md for full build,
run, and test instructions.
Description
Languages
Rust
99.5%
Nix
0.5%