Commit graph

2 commits

Author SHA1 Message Date
057ed0ed45 feat(journal): passive matcher for robust multi-line entries
`@command.new` silently drops `!journal\n<content>` because
maubot's parser only treats a *space* as the command/args
delimiter — when a newline immediately follows the command
name, the parser fails to recognise the command at all (no
handler invoked, no error). Real users WILL paste:

    !journal
    - thing one
    - thing two

and lose the entry without any feedback.

Switching to `@command.passive` with a regex that admits
[ \t\r\n] as the delimiter catches every form. Subcommand
dispatch (show/today) moves into the handler body — small
loss of decorator ergonomics, big gain in robustness for the
dominant use case (freeform multi-line entries).

Bumped to 0.2.0 since the structural change warrants a minor
bump (not a fix-level patch).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 09:32:22 +02:00
153b164284 feat(journal): farm-journal maubot plugin
Records what people did each day, scoped per-room/sender/timestamp.
Stored in maubot's per-instance SQLite plugin DB.

Commands:
- !journal <text>     record an entry
- !journal show [@u]  last 10 entries, optionally filtered by user
- !journal today      everything logged today (UTC)

The command shape requires @command.new(arg_fallthrough=False) so
the parent's pass_raw=True `text` argument doesn't swallow
subcommand keywords like "show" and "today" — same pattern the
upstream maubot reminder plugin uses.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 23:47:10 +02:00