Skip to content

fix(v12/file): 修正 get_file_name_by_id 中 ffile_list_path 拼写错误 - #139

Merged
This-is-XiaoDeng merged 1 commit into
masterfrom
fix/138-ffile-list-path
Nov 5, 2026
Merged

This-is-XiaoDeng merged 1 commit into
masterfrom
fix/138-ffile-list-path

Conversation

@This-is-XiaoDeng

Copy link
Copy Markdown
Member

修复

close #138

actions/v12/file.py 中 get_file_name_by_id() 把 file_list_path() 误写成 ffile_list_path(),导致 OneBot V12 发送图片(如 Astrbot 表情包管理器经 send_msg 发 image)时抛 NameError,返回 retcode 20002。

测试

新增 tests/test_file_action.py 两个回归用例:

  • 文件列表命中时按 ID 返回文件名;
  • 未知 ID 返回 None。

修复前该测试以 NameError: name 'ffile_list_path' is not defined 失败,修复后通过。

issue #138: sending an image via send_msg raised
NameError: name 'ffile_list_path' is not defined, so meme_manager/Astrbot
image sending failed with retcode 20002.

Add a regression test covering file id lookup.
@github-actions
github-actions Bot requested a review from montmorill November 5, 2026 14:40
@This-is-XiaoDeng
This-is-XiaoDeng merged commit 068b74c into master Nov 5, 2026
2 checks passed
@This-is-XiaoDeng
This-is-XiaoDeng deleted the fix/138-ffile-list-path branch November 5, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(v12/file): actions/v12/file.py 第 241 行變數名稱拼寫錯誤 (ffile_list_path)

1 participant