In internal/cli/app.go, neoirc-cli writes its own line when it sends a message, joins or parts (*** Joined #chan, *** Left #chan, its own message text), and drops the server's event when it comes from its own nick (handlePrivmsgEvent, and with #183 also handlePartEvent). Its own JOIN event is not dropped, so a join shows twice: *** Joined #chan, then *** nick has joined #chan. Dropping by nick also drops what the same session sends or does from another client (the web client or an IRC listener connection), which README.md (Multi-Client Model) says every client of the session receives. Read from the code on d539b4c and #183.
With #183, the HTTP API queues the sender's own PRIVMSG, NOTICE, JOIN and PART to every client of its session, the sending client included, so the server's event is the one copy.
Fix: neoirc-cli shows its own PRIVMSG, NOTICE, JOIN and PART from the server's event, as it shows everyone else's, and stops writing its own copy when it sends; nothing is dropped by nick. Error lines for a failed send, join or part stay. A part made from neoirc-cli does not mark the channel it left as unread. Change nothing else.
Definition of done
A message, join or part made from neoirc-cli shows exactly once in its buffer.
A message, join or part the same session makes from another client shows once in neoirc-cli.
The channel neoirc-cli parts is not marked unread.
Tests in internal/cli for items 1 to 3.
One reviewed PR against next, cut after #183 has landed.
Model: opus-5-5
In `internal/cli/app.go`, neoirc-cli writes its own line when it sends a message, joins or parts (`*** Joined #chan`, `*** Left #chan`, its own message text), and drops the server's event when it comes from its own nick (`handlePrivmsgEvent`, and with https://git.eeqj.de/sneak/neoirc/pulls/183 also `handlePartEvent`). Its own `JOIN` event is not dropped, so a join shows twice: `*** Joined #chan`, then `*** nick has joined #chan`. Dropping by nick also drops what the same session sends or does from another client (the web client or an IRC listener connection), which `README.md` (Multi-Client Model) says every client of the session receives. Read from the code on `d539b4c` and https://git.eeqj.de/sneak/neoirc/pulls/183.
With https://git.eeqj.de/sneak/neoirc/pulls/183, the HTTP API queues the sender's own PRIVMSG, NOTICE, JOIN and PART to every client of its session, the sending client included, so the server's event is the one copy.
Fix: neoirc-cli shows its own PRIVMSG, NOTICE, JOIN and PART from the server's event, as it shows everyone else's, and stops writing its own copy when it sends; nothing is dropped by nick. Error lines for a failed send, join or part stay. A part made from neoirc-cli does not mark the channel it left as unread. Change nothing else.
## Definition of done
1. A message, join or part made from neoirc-cli shows exactly once in its buffer.
2. A message, join or part the same session makes from another client shows once in neoirc-cli.
3. The channel neoirc-cli parts is not marked unread.
4. Tests in `internal/cli` for items 1 to 3.
5. One reviewed PR against `next`, cut after https://git.eeqj.de/sneak/neoirc/pulls/183 has landed.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
In
internal/cli/app.go, neoirc-cli writes its own line when it sends a message, joins or parts (*** Joined #chan,*** Left #chan, its own message text), and drops the server's event when it comes from its own nick (handlePrivmsgEvent, and with #183 alsohandlePartEvent). Its ownJOINevent is not dropped, so a join shows twice:*** Joined #chan, then*** nick has joined #chan. Dropping by nick also drops what the same session sends or does from another client (the web client or an IRC listener connection), whichREADME.md(Multi-Client Model) says every client of the session receives. Read from the code ond539b4cand #183.With #183, the HTTP API queues the sender's own PRIVMSG, NOTICE, JOIN and PART to every client of its session, the sending client included, so the server's event is the one copy.
Fix: neoirc-cli shows its own PRIVMSG, NOTICE, JOIN and PART from the server's event, as it shows everyone else's, and stops writing its own copy when it sends; nothing is dropped by nick. Error lines for a failed send, join or part stay. A part made from neoirc-cli does not mark the channel it left as unread. Change nothing else.
Definition of done
internal/clifor items 1 to 3.next, cut after #183 has landed.Model: opus-5-5