[Bug] 知识库不支持图片,未来任务选择send到私聊也会发送到webhook

未关闭
#11,022 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
python
领域
backend

调研方向

The report names the future task flow and the 企业微信 adapter, but gives no source files or tests. Start by locating how scheduled tasks handle the “send to private chat” choice and how the adapter routes those messages; compare that path with webhook delivery. Done when a task configured for private chat reaches the private chat, while a task configured for a group reaches the group.

由索引模型根据 Issue 内容生成。

描述

bug
问题描述

1、知识库不支持图片
2、未来任务选择send到私聊也会发送到webhook群里,是否能实现ui上选择私聊就发送私聊,选择群就发送到群,
没测试出来issues也没找到方法不知道是不是配置问题,最终就让ai写了个插件给patch来实现了

Image
如何复现?

1、打开未来任务,添加任务
2、选择send 推送到私聊
3、不会推送到私聊,还是发送到了配置的webhook

AstrBot 版本

4.29.4

操作系统

Linux

部署方式

uv

使用的消息平台适配器

企业微信

错误日志
14:40:04.226] [Core] [INFO] [runners.tool_loop_agent_runner:1185]: Agent 使用工具: ['astrbot_execute_python', 'astrbot_execute_shell']
[14:40:04.227] [Core] [INFO] [runners.tool_loop_agent_runner:1241]: 使用工具:astrbot_execute_python,参数:{'code': '\nimport json, urllib.request\nfrom datetime import datetime\nfrom zoneinfo import ZoneInfo\n\nlat, lon = 34.7466, 113.6254  # 郑州\nurl = (\n    "https://api.open-meteo.com/v1/forecast"\n    f"?latitude={lat}&longitude={lon}"\n    "&current=temperature_2m,relative_humidity_2m,apparent_temperature,precipitation,weather_code,wind_speed_10m,wind_direction_10m"\n    "&hourly=temperature_2m,precipitation_probability,precipitation"\n    "&daily=weather_code,temperature_2m_max,temperature_2m_min,precipitation_sum,precipitation_probability_max,sunrise,sunset"\n    "&timezone=Asia%2FShanghai&forecast_days=5"\n)\nwith urllib.request.urlopen(url, timeout=20) as r:\n    d = json.load(r)\n\nnow = datetime.now(ZoneInfo("Asia/Shanghai"))\nprint("采集时间:", now.strftime("%Y-%m-%d %H:%M"))\nprint("current:", d["current"])\nprint("daily:")\nfor i in range(len(d["daily"]["time"])):\n    print(d["daily"]["time"][i], "code=",d["daily"]["weather_code"][i],\n          "max=",d["daily"]["temperature_2m_max"][i],"min=",d["daily"]["temperature_2m_min"][i],\n          "prec=",d["daily"]["precipitation_sum"][i],"pop=",d["daily"]["precipitation_probability_max"][i],\n          "sunrise=",d["daily"]["sunrise"][i][-5:],"sunset=",d["daily"]["sunset"][i][-5:])\n# 今日剩余时段\nh = d["hourly"]\ncur_h = now.hour\nprint("hourly today:")\nfor t,tp,pp,pr in zip(h["time"],h["temperature_2m"],h["precipitation_probability"],h["precipitation"]):\n    if t.startswith(d["daily"]["time"][0]) and int(t[11:13]) >= cur_h:\n        print(t[11:16], tp, pp, pr)\n'}
[14:40:05.173] [Core] [INFO] [runners.tool_loop_agent_runner:1438]: Tool `astrbot_execute_python` Result: 采集时间: 2026-11-06 14:40
current: {'time': '2026-11-06T14:30', 'interval': 900, 'temperature_2m': 16.3, 'relative_humidity_2m': 45, 'apparent_temperature': 13.4, 'precipitation': 0.0, 'weather_code': 0, 'wind_speed_10m': 10.1, 'wind_direction_10m': 63}
daily:
2026-11-06 code= 3 max= 16.3 min= 9.3 prec= 0.0 pop= 0 sunrise= 06:50 sunset= 17:27
2026-11-07 code= 61 max= 15.6 min= 7.5 prec= 7.8 pop= 100 sunrise= 06:51 sunset= 17:26
2026-11-08 code= 61 max= 13.2 min= 5.6 prec= 2.2 pop= 98 sunrise= 06:52 sunset= 17:25
2026-11-09 code= 1 max= 12.7 min= 2.5 prec= 0.0 pop= 2 sunrise= 06:53 sunset= 17:25
2026-11-10 code= 0 max= 17.1 min= 2.5 prec= 0.0 pop= 0 sunrise= 06:54 sunset= 17:24
hourly today:
14:00 16.2 0 0.0
15:00 16.2 0 0.0
16:00 15.7 0 0.0
17:00 14.2 0 0.0
18:00 12.7 0 0.0
19:00 11.8 0 0.0
20:00 11.0 0 0.0
21:00 10.4 0 0.0
22:00 9.8 0 0.0
23:00 9.6 0 0.0
辅助信息

No response

检查清单
  • 我已在 Issue 列表中搜索过相关问题仍无法解决,或该问题从未被报告过。
  • 我已尝试过禁用所有插件,排除了可能是因插件导致的问题。
  • 我报告的问题与 AstrBot 本体相关,而非在报告某一插件的问题。
  • 我已阅读并同意本项目的贡献者行为准则。
  • (可选)我愿意提交 PR 以帮助修复该问题。
主要语言
Python
星标
46.4k
派生
3.4k
平均合并
1 天 11 小时
30 天内合并 PR
120

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

AstrBotDevs/AstrBot 的其他 Issue

查看 AstrBotDevs/AstrBot 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。