diff options
| author | elioat <elioat@tilde.institute> | 2025-11-15 21:14:32 -0500 |
|---|---|---|
| committer | elioat <elioat@tilde.institute> | 2025-11-15 21:14:32 -0500 |
| commit | 951e643a88bd0e4afa2cf03351400ca1ebc7d7d6 (patch) | |
| tree | e278302dbb481c5d652cd573529ed065070fea59 | |
| parent | c88b806a9f0af91ebeee57d0dac4e21e8ecd0bb4 (diff) | |
| download | tour-951e643a88bd0e4afa2cf03351400ca1ebc7d7d6.tar.gz | |
Remove timestamps from message display
Timestamps were adding visual noise. Now messages display in the clean
format: [sender] message
This reduces line clutter and makes the chat easier to read.
| -rw-r--r-- | gleam/gossip/src/client.gleam | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/gleam/gossip/src/client.gleam b/gleam/gossip/src/client.gleam index 0ca3e61..805d8c9 100644 --- a/gleam/gossip/src/client.gleam +++ b/gleam/gossip/src/client.gleam @@ -23,20 +23,20 @@ pub fn start() -> process.Subject(messages.Message) { /// Main client loop - blocks waiting for ChatMessages and displays them. /// /// Receives ChatMessages from the registry and prints them in the format: -/// HH:MM:SS [SenderName] message text +/// [SenderName] message text /// /// Ignores all other message types (they're handled by the registry). fn loop(subject: process.Subject(messages.Message)) -> Nil { - let msg = process.receive_forever(subject) - - case msg { - messages.ChatMessage(from, text, timestamp) -> { - io.println(timestamp <> " [" <> from <> "] " <> text) - loop(subject) - } - _ -> { - // Ignore non-ChatMessage types (they're for the registry, not the client) - loop(subject) - } - } + let msg = process.receive_forever(subject) + + case msg { + messages.ChatMessage(from, text, _timestamp) -> { + io.println("[" <> from <> "] " <> text) + loop(subject) + } + _ -> { + // Ignore non-ChatMessage types (they're for the registry, not the client) + loop(subject) + } + } } |