A Zulip bot agent to sit in our Black Sun. Ever evolving

Pass event-level flags through to bot handlers

Zulip puts flags like "mentioned" on the event envelope, not the
message object. Previously the handler had no access to these flags,
causing mention detection to fail for display-name mentions like
@**Poe**. Thread the flags as a string list through the handler type
so handlers can check them directly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+2 -4
+2 -4
lib/handler.ml
··· 485 485 List.mem sender_email config.Config.admin_emails 486 486 487 487 let make_handler env config = 488 - fun ~storage ~identity msg -> 488 + fun ~storage ~identity ~flags msg -> 489 489 let bot_email = identity.Zulip_bot.Bot.email in 490 490 let sender_email = Zulip_bot.Message.sender_email msg in 491 491 (* Ignore messages from the bot itself *) 492 492 if sender_email = bot_email then Zulip_bot.Response.silent 493 493 else 494 494 let scope = Session.scope_of_message msg in 495 - (* Use Zulip's "mentioned" flag rather than pattern matching on email - 496 - the flag correctly handles display name mentions like @**Poe** *) 497 - let is_mentioned = List.mem "mentioned" (Zulip_bot.Message.flags msg) in 495 + let is_mentioned = List.mem "mentioned" flags in 498 496 let is_private = Zulip_bot.Message.is_private msg in 499 497 500 498 (* Check if this is a message we should respond to *)