mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 03:30:48 +08:00
fix(scheduler): isolate scheduled runs and @mention job creator on WhatsApp
Use a fresh execution session per run while keeping source_session_id for delivery only; filter bot JIDs and default scheduled @mentions to the job creator. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
f5cb64a3a4
commit
62ac04c40d
8 changed files with 524 additions and 166 deletions
|
|
@ -552,6 +552,12 @@ class ToolExecutor:
|
|||
tool_args["creator_external_user_id"] = external_uid
|
||||
if push_name and not str(tool_args.get("creator_push_name") or "").strip():
|
||||
tool_args["creator_push_name"] = push_name
|
||||
bot_jid_raw = str(md.get("bot_jid") or raw_block.get("botJid") or "").strip()
|
||||
bot_lid_raw = str(md.get("bot_lid") or md.get("botLid") or raw_block.get("botLid") or "").strip()
|
||||
if bot_jid_raw and not str(tool_args.get("whatsapp_bot_jid") or "").strip():
|
||||
tool_args["whatsapp_bot_jid"] = bot_jid_raw
|
||||
if bot_lid_raw and not str(tool_args.get("whatsapp_bot_lid") or "").strip():
|
||||
tool_args["whatsapp_bot_lid"] = bot_lid_raw
|
||||
raw_mentions = md.get("mentioned_jids") or md.get("mentionedJids") or md.get("mentions") or []
|
||||
mention_list = raw_mentions if isinstance(raw_mentions, list) else []
|
||||
bot_jid = str(md.get("bot_jid") or "").strip().lower()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue