Skip to content

Commit

Permalink
🐛 version 0.30.1
Browse files Browse the repository at this point in the history
fix feishu image send
  • Loading branch information
RF-Tar-Railt committed Oct 23, 2023
1 parent 86cd6dd commit 83a5faf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/nonebot_plugin_alconna/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
from .consts import ALCONNA_EXEC_RESULT as ALCONNA_EXEC_RESULT
from .extension import add_global_extension as add_global_extension

__version__ = "0.30.0"
__version__ = "0.30.1"

__plugin_meta__ = PluginMetadata(
name="Alconna 插件",
Expand Down
2 changes: 1 addition & 1 deletion src/nonebot_plugin_alconna/uniseg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from .params import UniversalMessage as UniversalMessage
from .params import UniversalSegment as UniversalSegment

__version__ = "0.30.0"
__version__ = "0.30.1"

__plugin_meta__ = PluginMetadata(
name="Universal Segment 插件",
Expand Down
4 changes: 2 additions & 2 deletions src/nonebot_plugin_alconna/uniseg/adapters/feishu.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ async def image(self, seg: Image, bot: Bot) -> "MessageSegment":
elif seg.path:
image = Path(seg.path).read_bytes()
elif seg.raw:
image = seg.raw
image = seg.raw_bytes
else:
raise SerializeFailed(lang.require("nbp-uniseg", "invalid_segment").format(type="image", seg=seg))
data = {"image_type": "message"}
files = {"image": ("file", image.raw_bytes)}
files = {"image": ("file", image)}
params = {"method": "POST", "data": data, "files": files}
result = await bot.call_api("im/v1/images", **params)
file_key = result["image_key"]
Expand Down

0 comments on commit 83a5faf

Please sign in to comment.