Skip to content

fix: filter own messages in wait pre-poll path - #3

Merged
zeke-ricon merged 1 commit into
mainfrom
fix/wait-self-filter
Mar 10, 2026
Merged

fix: filter own messages in wait pre-poll path#3
zeke-ricon merged 1 commit into
mainfrom
fix/wait-self-filter

Conversation

@zeke-ricon

Copy link
Copy Markdown
Contributor

Summary

  • The immediate-delivery check (before the poll loop) didn't apply sender filtering — wait --for zeke would wake on zeke's own unread messages
  • Now applies the same sender-header check as the poll loop
  • When only own messages are unread, advances cursor past them and falls through to polling

Hotfix for a gap introduced when merging PRs #1 and #2 — the pre-poll path from #2 didn't incorporate the sender filtering from #1.

Test plan

  • wait --for zeke with only own unread messages → skips them, enters poll loop, times out
  • wait --for zeke with other sender's message unread → wakes immediately
  • wait without --for → wakes on any message (no filtering)

🌀 Magic applied with Wibey CLI 🪄 (https://wibey.walmart.com/cli)

The immediate-delivery check (pre-poll) didn't apply sender filtering,
so `wait --for zeke` would wake on zeke's own unread messages. Now
applies the same sender check as the poll loop. When only own messages
are unread, advances cursor past them and falls through to polling.
@zeke-ricon
zeke-ricon merged commit b4e74b8 into main Mar 10, 2026

@baby-joel baby-joel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean fix — the pre-poll path was missing sender filtering. Logic mirrors the poll loop correctly, and advancing cursor past own messages before entering the loop is the right call. Approved! 🤝

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.

2 participants