outbound.reply_to_message splits a Discord reply into pieces and returns the first piece's result. A blank body ('' or only spaces) splits into no pieces, so sent[0] raises IndexError: list index out of range - the owner sees a crash instead of a sentence.
Where: taskuary/outbound.py, the if ch == 'discord': branch of reply_to_message.
Done when a blank body raises a RuntimeError saying there is nothing to send (the way other refusals in this file read), and nothing is posted to Discord.
Test - tests/test_reply_channels.py, next to DiscordReplyTests: with taskuary.devtools.discord_send mocked, reply_to_message(s, msg, ' ') raises RuntimeError and the mock was never called.
Getting started: pip install -e ".[dev]", then python -m pytest -q (offline, a few seconds). UI work: cd website && npm ci && npm test. See CONTRIBUTING.md. One small PR with the change and its test is perfect.
outbound.reply_to_messagesplits a Discord reply into pieces and returns the first piece's result. A blank body (''or only spaces) splits into no pieces, sosent[0]raisesIndexError: list index out of range- the owner sees a crash instead of a sentence.Where:
taskuary/outbound.py, theif ch == 'discord':branch ofreply_to_message.Done when a blank body raises a
RuntimeErrorsaying there is nothing to send (the way other refusals in this file read), and nothing is posted to Discord.Test -
tests/test_reply_channels.py, next toDiscordReplyTests: withtaskuary.devtools.discord_sendmocked,reply_to_message(s, msg, ' ')raisesRuntimeErrorand the mock was never called.Getting started:
pip install -e ".[dev]", thenpython -m pytest -q(offline, a few seconds). UI work:cd website && npm ci && npm test. See CONTRIBUTING.md. One small PR with the change and its test is perfect.