File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/nonebot_plugin_parser/renders Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -61,10 +61,7 @@ def on_error(e: Exception):
6161 case AudioContent ():
6262 yield UniMessage (UniHelper .record_seg (path ))
6363 case ImageContent ():
64- img_seg = UniHelper .img_seg (path )
65- if cont .alt :
66- img_seg += cont .alt
67- forwardable_segs .append (img_seg )
64+ forwardable_segs .append (UniHelper .img_seg (path ))
6865 case DynamicContent ():
6966 dynamic_segs .append (UniHelper .video_seg (path ))
7067
@@ -81,7 +78,10 @@ def on_error(e: Exception):
8178 continue
8279
8380 if path := await cont .path_task .safe_get (on_error ):
84- forwardable_segs .append (UniHelper .img_seg (path ))
81+ img_seg = UniHelper .img_seg (path )
82+ if cont .alt :
83+ img_seg += cont .alt
84+ forwardable_segs .append (img_seg )
8585
8686 if forwardable_segs :
8787 if pconfig .need_forward_contents or len (forwardable_segs ) > 4 :
You can’t perform that action at this time.
0 commit comments