Repository navigation
feat(tui): add /like to react to the newest message from others - #43
Merged
Merged
Conversation
/like [name] sets the account's reaction on one message of the current chat window: the newest message lazygram holds of that chat that someone other than the account sent (domain.LastFromOthers), so own lines after it are skipped and never more than one message is touched. The name comes from a fixed vocabulary matched without regard to case, each an emoji of Telegram's standard reaction set as the Bot API lists it: like (the default, thumbs up; also +1), dislike (-1), love (heart, U+2764 without U+FE0F), fire, laugh, sad, party (tada), clap, thanks (pray), ok, think, eyes. Tab completes the twelve names. Checks go from the form to the state and send nothing: another name is "/like takes like, dislike, ... think or eyes" in any window; window 0 is the shared chat-window error; a provider without provider.Reactor is "reactions cannot be sent with <provider>"; no target is "no message from someone else in <chat> to react to". Otherwise the status says "reacting E to ada \"first words\"...", then "reacted ..."; reactions the answer carries are applied like a poll's; a failure is "reaction failed: <why>" in the status and window 0. Nothing is focused or read. provider.Reactor is a new optional interface. Telegram sends messages.sendReaction with one reactionEmoji (big and add_to_recent unset, FLOOD_WAIT retried once), returns any updateMessageReactions of the answer, tells the documented refusals in words with their code and takes MESSAGE_NOT_MODIFIED as done. The demo sets the reaction in memory, replacing the account's earlier one and keeping a paid star. Removing a reaction is left out: the API documentation read does not say an empty list removes one (todo). No reaction was sent to a real account: Telegram code is tested with the fake api, the TUI with a fake provider and the offline demo. specs/ui.md (Reactions, Sending a reaction, with decisions; commands table, short forms, Completion, hints), specs/providers.md (Reactor, Telegram sending, demo), docs/usage.md, /help, a start hint, todo and session/2026-11-06-like.md with the RED/GREEN record are updated.
t0d0r
added a commit
that referenced
this pull request
Nov 6, 2026
The Arch / Omarchy recipe builds v0.4.30: only pkgver and the tag tarball's sha256 (87c91787...cda83, the same on two downloads) change; go.mod and go.sum are as in 0.4.29. It was built and tested in Docker on aarch64 and x86_64 (makepkg with check, namcap, pacman -Qkk, the desktop entry, lazygram 0.4.30), and the omarchy-pkgs validators pass against their master bf44164. omacom/omarchy-pkgs#2022 moved to 0.4.30 with 20cc7d0; PR.md names it. session/2026-11-07-release-0430.md records the release: v0.4.30 tagged on master 1c186e3 (/like, #43), published by Release workflow run 42299863267, every asset checked against SHA256SUMS and its provenance verified online and offline, a tampered tarball refused, the latest installer URL installing v0.4.30 into a scratch prefix, and the Homebrew formula at 0.4.30 (tap 49f8b9f, built from source, brew test passed). todo/todo.md, specs/release.md and docs/arch-omarchy.md follow the version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/like [name]to react to the newest received message in the current chat.Verification
make checkgo test -race ./internal/command ./internal/tuiFUZZTIME=2s make fuzzgitleaks git --no-banner .git diff --check origin/master...feature/like